This is a Rails app that includes everything we want before we start rapid prototyping during a Market Sprint.
First, make sure you have the rails executable and that it is at the same version as that used by this template (4.1.0):
$ gem install rails -v 4.1.0
$ rails new my_app_name -m https://raw.githubusercontent.com/adaptivelab/market_sprint_rails_template/master/template.rb
$ bundle exec rake rails:template LOCATION=https://raw.githubusercontent.com/adaptivelab/market_sprint_rails_template/master/template.rb
Feature | Description |
---|---|
Ruby 2.0.0 | Ruby version that comes with our current Boxen. |
Rails 4.1.0 | An out-of-date version of Rails |
Devise | User authentication |
Active Admin | Administration interface |
User model | A basic user model (email + password) |
Rspec | For unit tests |
Cucumber | For feature tests |
FactoryGirl | For creating models easily |
Selenium | For viewing feature tests in browser |
Timecop | For mocking out time |
Heroku-ready | Adds rails_12factor, unicorn and postgres to be Heroku-ready out of the box |
Launchy | Useful for seeing what your integration test is seeeing (using the save_and_open_page helper method or the 'And show me the page' cucumber helper) |
VCR | For testing calls to third party URIs |
PhantomJS | So that integration tests work on Travis |
Selenium Webdriver | Which you can use to visually see integration tests |
Better Errors | For seeing better errors in development |
Binding of Caller | Allows you to interrogate the local variables at the place where your app exceptioned |
Editor Config | To ensure a consensus of pedantry |
Bootstrap CSS | For generic-looking interfaces |
Less | Because Bootstrap |
Haml | For easier markup |
No CoffeeScript | So they don't get generated by generators |
Travis | For continuous integration |
Pages model & controller | Allows us to whack in static images as pages, willy nilly. See down there for more information |
Admin lives at the relative URL, '/admin'. At first, the admin user is '[email protected]' and the password is 'password'. You should probably alter that if you make anything public.
To add in a page that's just a static image (or even a chain of pages), you can use the Pages tab in the (admin)[#admin] section.
The page slug determines the URL it will live at. The relative URL will be "/pages/my-slug", where 'my-slug' is your slug. Obvs. Using that knowledge, you can chain pages of static images together, by entering another /pages/{slug} URL in as the next_url. Simples!
To deploy using travis you will need to fill in the heroku app you want to deploy to and the name and branch of the git repo you want to deploy from.
For Example
app: adplatform-staging
on:
repo: adaptivelab/adplatform
branch: staging
Make sure you set the following environment variables:
SECRET_KEY_BASE
Pull request! Make changes to this app, ensure they work. Then update the template.rb file if you need to. To speed up trying out chages, you can use the local path to the template.rb instead of the URL when applying the template.
Adaptive Lab's Rails Skeleton by Adaptive Lab is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Based on a work at https://github.com/adaptivelab/market_sprint_rails_template.