Skip to content

Instantly share code, notes, and snippets.

@chiastolite
Last active December 26, 2015 18:49
Show Gist options
  • Save chiastolite/7197619 to your computer and use it in GitHub Desktop.
Save chiastolite/7197619 to your computer and use it in GitHub Desktop.
rails-templates
doctype 5
html
head
title = content_for?(:title) ? yield(:title) : (controller.controller_name + " : " + controller.action_name)
= stylesheet_link_tag :application
= javascript_include_tag :application
= csrf_meta_tags
/[ if lt IE 9 ]
script src="//html5shiv.googlecode.com/svn/trunk/html5.js"
body
= yield
return unless yes?('Use Template?')
gem 'slim-rails', github: 'slim-template/slim-rails'
gem_group :development do
gem 'awesome_print'
gem 'guard-bundler'
gem 'guard-rails'
gem 'guard-rspec'
gem 'hirb'
gem 'hirb-unicode'
gem 'pry-byebug'
gem 'pry-doc'
gem 'pry-rails', group: :test
gem 'pry-stack_explorer'
gem 'quiet_assets'
gem 'seed-fu', group: :test
gem 'tapp'
end
gem_group :test do
gem 'annotate'
gem 'capybara'
gem 'database_rewinder'
gem 'factory_girl_rails', group: :development
gem 'launchy'
gem 'poltergeist'
gem 'pry-doc'
gem 'pry-stack_explorer'
gem 'rspec-rails', group: :development
gem 'timecop'
end
if yes('use rails assets?')
add_source('https://rails-assets.org')
gem 'rails-assets-bootstrap' if yes('use bootstrap?')
end
application <<-GENERATORS
config.generators do |g|
g.template_engine :slim
g.test_framework :rspec
g.fixture_replacement :factory_girl
g.view_specs false
end
GENERATORS
run 'bundle install'
remove_file './app/views/layouts/application.html.erb'
get 'https://gist.github.com/chiastolite/7197619/raw/application.html.slim', './app/views/layouts/application.html.slim'
generate 'rspec:install'
git :init
git :add => '.'
git :commit => '-am "Initial commit"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment