Skip to content

Instantly share code, notes, and snippets.

@yuya-matsushima
Last active June 16, 2019 12:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuya-matsushima/827903535cd97894df74c385fcdc30b4 to your computer and use it in GitHub Desktop.
Save yuya-matsushima/827903535cd97894df74c385fcdc30b4 to your computer and use it in GitHub Desktop.
template.rb
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