0.0
No commit activity in last 3 years
No release in over 3 years
Sets up a rails application using the default Flatiron School stack.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 4.0.0
 Project Readme

#Presto for Rails

Presto Logs were used to power the steam locomotive that pushed the DeLorean time machine up to 88 mph."

-- Futurepedia

Presto Rails, on the other hand, accelerates the initial setup of your amazing rails application.

##Installation

$ gem install presto-rails

##Usage

$ presto <your-rails-app-name>

##Details

Presto sets up the following defaults based on a commonly used stack at The Flatiron School:

####1) Generates a new rails app without mini-test

$ rails new <your-rails-app-name> -T

####2) Adds development and testing gems

group :test, :development do
  gem 'rspec-rails'
  gem 'capybara'
  gem 'selenium-webdriver'
  gem 'better_errors'
  gem 'binding_of_caller'
  gem 'terminal-notifier-guard'
  gem 'factory_girl_rails'
  gem 'simplecov'
  gem 'database_cleaner'
  gem 'guard', '>=2.1.0'
  gem 'guard-rspec'
end

####3) Initializes RSpec for the app

$ rails g rspec:install

####4) Configures spec_helper.rb

a. Adds SimpleCov

require 'simplecov'
SimpleCov.start 'rails'

b. Comments out fixtures in favor of factory_girl

# config.fixture_path = "#{::Rails.root}/spec/fixtures"

c. Disables transactional fixtures

config.use_transactional_fixtures = false

d. Adds Database Cleaner

config.before(:suite) do
  DatabaseCleaner.strategy = :transaction
  DatabaseCleaner.clean_with(:truncation)
end

config.before(:each) do
  DatabaseCleaner.start
end

config.after(:each) do
  DatabaseCleaner.clean
end

####5) Provisions specs for features

a. Adds features directory

$ mkdir -p spec/features

b. Adds spec/feature_helper.rb

require 'spec_helper'
require 'capybara/rails'

####6) Creates Guardfile

guard 'rspec' do
  watch(%r{^spec/.+_spec\.rb$})
  watch(%r{^lib/(.+)\.rb$})     { |m| "spec/lib/#{m[1]}_spec.rb" }
  watch('spec/spec_helper.rb')  { "spec" }

  # Rails example
  watch(%r{^app/(.+)\.rb$})                           { |m| "spec/#{m[1]}_spec.rb" }
  watch(%r{^app/(.*)(\.erb|\.haml)$})                 { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
  watch(%r{^app/controllers/(.+)_(controller)\.rb$})  { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
  watch(%r{^spec/support/(.+)\.rb$})                  { "spec" }
  watch('config/routes.rb')                           { "spec/routing" }
  watch('app/controllers/application_controller.rb')  { "spec/controllers" }

  # Capybara features specs
  watch(%r{^app/views/(.+)/.*\.(erb|haml)$})          { |m| "spec/features/#{m[1]}_spec.rb" }

end

###Authors Manuel Neuhauser

Josh Scaglione

Logan Hasson

###License MIT