Skip to content

Instantly share code, notes, and snippets.

@takai
Created July 2, 2012 20:53
Show Gist options
  • Save takai/3035643 to your computer and use it in GitHub Desktop.
Save takai/3035643 to your computer and use it in GitHub Desktop.
#
# rails new templ-app --database postgresql --skip-gemfile --skip-test-unit -m /path/to/rails-template.rb
#
create_file 'Gemfile'
add_source :rubygems
gem 'rails', '3.2.6'
gem 'jquery-rails', '~> 2.0.2'
gem 'pg', '~> 0.14.0'
gem 'haml', '~> 3.1.6'
gem 'haml-rails', '~> 0.3.4'
gem_group :development, :test do
gem 'rspec-rails'
gem 'machinist'
gem 'simplecov'
gem 'guard'
gem 'guard-livereload'
gem 'guard-rails'
gem 'guard-rspec'
gem 'guard-spork'
gem 'pry'
gem 'pry-nav'
gem 'pry-rails'
gem 'pry-remote'
end
gem_group :assets do
gem 'coffee-rails'
gem 'uglifier'
gem 'therubyracer'
gem 'less-rails'
end
gem_group :cap do
gem 'capistrano'
gem 'capistrano_colors'
gem 'capistrano_rsync_with_remote_cache'
end
run 'bundle install'
# less-rails
application <<-END
config.app_generators.stylesheet_engine :less
END
# rspec
generate 'rspec:install'
# machinist
generate 'machinist:install'
append_to_file 'spec/spec_helper.rb', <<-END
RSpec.configure do |config|
config.use_transactional_fixtures = true
end
END
# simplecov
prepend_to_file 'spec/spec_helper.rb', <<-END
require 'simplecov'
SimpleCov.start 'rails
END
# guard
run 'guard init'
capify!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment