Skip to content

adaptivelab/market_sprint_rails_template

Repository files navigation

Rails Market Sprint App Skeleton

This is a Rails app that includes everything we want before we start rapid prototyping during a Market Sprint.

Creating a new application from this template

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

Applying or re-applying this template to an existing app

$ bundle exec rake rails:template LOCATION=https://raw.githubusercontent.com/adaptivelab/market_sprint_rails_template/master/template.rb

What's in the box?

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

Admin lives at the relative URL, '/admin'. At first, the admin user is 'admin@example.com' and the password is 'password'. You should probably alter that if you make anything public.

Pages

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!

Travis

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

Production checklist

Make sure you set the following environment variables:

SECRET_KEY_BASE

What if I want to add to this template?

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.

License

Creative Commons Licence
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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages