A Ruby on Rails app to manage workshops
| Branch | Travis CI | Code Analysis | Heroku Deploy |
|---|---|---|---|
| production | |||
| dev |
When all tests succeed on Travis CI, the application is deployed to Heroku. Click the badges for detailed info.
bundle installInstall the required Ruby gem dependencies defined in the Gemfilecp database.sqlite.yml database.ymlSelect database config (for development we recommend SQLite)rake db:create db:migrate db:seedSetup database, run migrations, seed the database with defaultsrails sStart the Rails development server (By default runs on localhost:3000)rspecRun all the tests (using the RSpec test framework)
If you want to use a VM to setup the project (e.g. when on Windows), we recommend Vagrant. Please keep in mind that this method may lead to a loss in performance, due to the added abstraction layer.
vagrant up # bring up the VM
vagrant ssh # login using SSH
cd hpi-swt2
echo "gem: --no-document" >> ~/.gemrc # disable docs for gems
bundle install # install dependencies
gem install pg # required for Postgres usage
cp config/database.psql.yml config/database.yml # in case you want to use Postgres
cp config/database.sqlite.yml config/database.yml # in case you want to use SQLite
exit # restart the session, required step
vagrant ssh # reconnect to the VM
cd hpi-swt2
rails s -b 0 # start the rails server
# the -b part is necessary since the app is running in a VM and would
# otherwise drop the requests coming from the host OS
bundle exec <command>Run command within the context of the current gemsetrspec spec/controller/expenses_controller_spec.rbSpecify a folder or test file to runrails cRun the Rails consolerails c --sandboxTest out some code without changing any datarails g migration DoSomethingCreate migration _db/migrate/*DoSomething.rb.rails dbconsoleStarts the CLI of the database you're usingrake routesShow all the routes (and their names) of the applicationrails assets:precompilePrecompile the assets in app/assets to public/assetsrake aboutShow stats on current Rails installation, including version numbersrspec --profileexamine how much time individual tests take