Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/calebhearth/bootstrap
Bootstrapping: Making your app newbie-proof
https://github.com/calebhearth/bootstrap
Last synced: 27 days ago
JSON representation
Bootstrapping: Making your app newbie-proof
- Host: GitHub
- URL: https://github.com/calebhearth/bootstrap
- Owner: calebhearth
- Created: 2012-03-02T14:57:20.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2012-03-05T03:01:56.000Z (almost 13 years ago)
- Last Synced: 2024-10-15T19:43:41.975Z (2 months ago)
- Language: Shell
- Homepage: http://zachholman.com/talk/ruby-patterns
- Size: 93.8 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Bootstrapping: Making your app newbie-proof
Companies have lots of applications with lots of different setups. There should
be a QUICK AND EASY way to step into an unfamiliar app.## Enter script/bootstrap
Put a file called `bootstrap` in the `script/` directory. The purpose of this
file will be to allow anyone to easily jump into a project and start
contributing.script/bootstrap takes care of:
* dependency checks
* bundler
* db creation
* db migration
* db seeding
* static page compilation
* language compilation### dependency checks
Is your database engine installed? (here's how to install it)
Is some_required_application running? (here's how to run it)### bundler
```
bundle install \
--binstubs \
--local \
--path=vendor/gems \
--without=production
```### db creation
`rake db:create`
### db migration
`rake db:migrate`
### db seeding
* pull database from production app
* `rake db:seed`
* `script/replicate-repo`### static page compilation
404, 500
### language compilation
python, c, erlang...
## But running script/bootstrap takes forever...
**cache bootstrap results**
```
md5 << File.read('Gemfile')
checksum = md5.hexdigest
installed = File.read('.bundle/checksum').strip
```Running `script/bootstrap` should be fast, straightforward, and require no
knowledge of the underlying language or app setup.## What else can I use script/bootstrap for?
You can also run script/bootstrap during any process that loads the environment,
like `script/server`.You can even use `script/bootstrap` in your testing environment.
Add `script/cibuild` to your projects. This will allow you to keep test config
in the repository.Your CI server only needs to ever run `script/cibuild`.
### cibuild? What's this noise?
```
export RACK_ROOT=["..."]
export RACK_ENV=["test"]script/bootstrap
bin/rake
```BOOM!
## License
MIT License
Copyright (C) 2012 Caleb Thompson
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.