TODO: Add badges!
Live project: ACCOUNT.SERVER.uberspace.de
Recommended environment:
Setup:
$ git clone git@github.com:GITHUB/PROJECT.git$ cd PROJECT$ bundle install$ cp config/secrets.example.yml config/secrets.yml- Open
config/secrets.ymland edit it $ rails db:setup$ rails db:test:prepare
You can use direnv to automatically add bin to your $PATH. Otherwise you should always use bundle exec to run commands.
- Pandoc for advanced Markdown capabilities:
$ brew install pandoc - ImageMagick for image manipulation:
$ brew install imagemagick
- In one terminal, enter
$ serverto start the development server using rerun (which will take care of restarting the server upon changes of important config files) - In a second terminal, enter
$ guardto start Guard, which automatically takes care of:- executing tests using Guard-RSpec
- live reloading the page (HTML, JS and CSS) using Guard-LiveReload
- bundling using Guard-Bundler
- annotating models using Guard-Annotate
- migrating the DB using Guard-Migrate
- Open http://localhost:PORT in your browser (use whatever port you specified in
config/boot.rb)
Make sure that:
- All authorization is done through cancancan
- The ability.rb file is thoroughly tested
- Every action has a correlating feature spec file (nest them in folders similar to the nested routes' structure)
- Every navigation item has a correlating spec in navigation_spec.rb
- Run
$ i18n-tasks normalize - Run
$ rakeand make sure, no specs are pending/failing
The i18n-tasks gem makes handling translations easily. It helps finding unused and not yet translated keys, and normalizes (e.g. sorts) the translation files.
$ i18n-tasks normalize, then commit$ i18n-tasks unused, then remove unused keys and commit$ i18n-tasks add-missing -v 'TRANSLATE: %{value}', then translate everything (do a project search forTRANSLATE:) and commit
- Use
driver: :chrometo visually run feature tests in Chrome.
To learn more about setting up deployment on a server, see Deployment.
Be sure you have committed and pushed all wanted changes, then execute $ cap production deploy.
That's all, folks!