Companies have lots of applications with lots of different setups. There should be a QUICK AND EASY way to step into an unfamiliar app.
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
Is your database engine installed? (here's how to install it) Is some_required_application running? (here's how to run it)
bundle install \
--binstubs \
--local \
--path=vendor/gems \
--without=production
rake db:create
rake db:migrate
- pull database from production app
rake db:seed
script/replicate-repo
404, 500
python, c, erlang...
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.
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
.
export RACK_ROOT=["..."]
export RACK_ENV=["test"]
script/bootstrap
bin/rake
BOOM!
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.