Coder Social home page Coder Social logo

waffle-iron / boxcar Goto Github PK

View Code? Open in Web Editor NEW

This project forked from smashingboxes/boxcar-generator-archive

0.0 1.0 0.0 111 KB

A Rails template for generating Rails applications with the best practices of the Smashing Boxes team.

Shell 10.76% Ruby 88.76% Gherkin 0.48%

boxcar's Introduction

Build Status

Boxcar

Boxcar is the Rails application template used at Smashing Boxes according to our best practices.

Requirements

This template is compatible with:

  • Rails 5.0.0
  • Rails 4.2.7.1

The template currently assumes:

  • PostgreSQL

and that the application will be deployed using:

  • Taperole
  • Unicorn

NOTE: Taperole is not yet compatible with Rails 5.

Installation

To create a new Rails app with this template, do the following:

git clone https://github.com/smashingboxes/boxcar.git

To use Rails 5, do the following:

rails new [app_name] -m boxcar/template.rb -B

To use Rails 4, do the following:

rails _4.2.7.1_ new [app_name] -m boxcar/template.rb -B

If you run into an issue with Rails 4.2.7.1, run gem install rails -v 4.2.7.1 to ensure you have access to this version of Rails.

Note that the -B is optional and equivalent to --skip-bundle. Since there is a bundle install command inside the template, the final bundle when creating a new Rails app is unnecessary.

Note that this command will be updated when the template is compatible with Rails 5.

Options

When using this template, you will be asked one or more questions to determine what type of Rails app to generate. There are 3 types of apps you can select:

  1. API Only
  • Answer 'y' to the question "Is this an API app? (y/n)".
  • Answer 'n' to the question "Does this API app have an admin interface? (y/n)"
  1. API with Admin Interface
  • Answer 'y' to the question "Is this an API app? (y/n)".
  • Answer 'y' to the question "Does this API app have an admin interface? (y/n)"
  1. Interactive
  • Answer 'n' to the question "Is this an API app? (y/n)".

What does it do?

The template will generate a Rails app using rails new, and then will customize the app according to the template. Depending on the type of template you are generating, the template will modify the following:

  1. API Only
  • Modify the Gemfile
  • Remove files from the app directory, including helpers, views, and assets > javascripts and stylesheets
  • Modify the application_controller.rb file for an API
  • Option to install the gem 'devise_token_auth'
  • Option to install the gem 'smashing_docs'
  1. API with Admin Interface
  • Modify the Gemfile
  • Remove Turbolinks
  • Option to install the gem 'devise_token_auth'
  • Option to install the gems 'cucumber-rails' and 'capybara'
  • Option to install the gem 'smashing_docs'
  1. Interactive
  • Modify the Gemfile
  • Remove Turbolinks
  • Option to install the gem 'devise'
  • Option to install the gems 'cucumber-rails' and 'capybara'

Once these app-type dependent modifications are complete, the template will modify the following:

  • Create database.yml configured for postgresql
  • Create database.example.yml and secrets.example.yml
  • Create .rubocop.yml file for local linting
  • Create .travis.yml file correctly configured
  • Append .gitignore with secret_token.rb, secrets.yml and database.yml
  • Bundle install and installation of gem configs:
    • rspec
    • factory_girl_rails
    • database_cleaner
    • shoulda_matchers
    • codeclimate-test-reporter
    • taperole
  • Installation of optional gem configs:
    • smashing_docs
    • devise
    • devise_token_auth
    • cucumber-rails
    • capybara
  • Cleanup of auto-generated files that fail local linting
  • Remove test directory
  • Generate README.md
  • Create development and test databases
  • Initialize git

Gemfile

Boxcar contains application gems including:

NOTE: For now, the template will only install and set up taperole if using Rails 4. When taperole is compatible with Rails 5, we will add this functionality back.

And development gems including:

And testing gems including:

boxcar's People

Contributors

brandonmathis avatar ru-t avatar dkniffin avatar tylerrockwell avatar dacur avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.