-
-
Save yuya-matsushima/827903535cd97894df74c385fcdc30b4 to your computer and use it in GitHub Desktop.
template.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem 'slim-rails', '~> 3.2' | |
gem_group :development, :test do | |
gem 'rspec-rails', '~> 3.8' | |
gem 'rubocop-rails', '~> 2.0' | |
end | |
gem_group :development do | |
gem 'capistrano' | |
gem 'capistrano-rails' | |
gem 'html2slim' | |
end | |
gem_group :test do | |
gem 'webdrivers' | |
end | |
gsub_file 'Gemfile', /^gem\s+['']coffee-rails[''].*$/, '' | |
gsub_file 'Gemfile', /^\s+gem\s+['']chromedriver-helper[''].*$/, '' | |
initializer 'generators.rb', <<-CODE | |
Rails.application.config.generators do |g| | |
g.assets false | |
g.helper false | |
g.jbuilder false | |
g.template_engine = :slim | |
g.test_framework :rspec, controller_specs: false, view_specs: false, routing_specs: false, request_specs: false | |
end | |
CODE | |
initializer 'sass.rb', <<-CODE | |
Rails.application.config.sass.preferred_syntax = :sass | |
CODE | |
file '.rubocop.yml', <<-CODE | |
require: rubocop-rails | |
Rails/UnknownEnv: | |
Environments: | |
- production | |
- development | |
- test | |
- staging | |
Style/AsciiComments: | |
Enabled: false | |
Style/ClassAndModuleChildren: | |
Enabled: false | |
Style/Documentation: | |
Enabled: false | |
Metrics/LineLength: | |
Max: 120 | |
Metrics/MethodLength: | |
Max: 20 | |
CODE | |
after_bundle do | |
generate 'rspec:install' | |
run 'bundle exec erb2slim app/views app/views -d' | |
run 'bundle exec rubocop --auto-gen-config' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment