Rails Application Template
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
# Use this template by running: | |
# | |
# $ rails new my_application --api --webpack=vue -m https://gist.githubusercontent.com/redconfetti/011aac614ebe3bd7d798b431fe789f5a/raw/6b917017d2f0ede9f183107f6c9db8cf821a59b3/template.rb | |
# | |
# Configure Rspec | |
puts "-- Configuring Rspec --" | |
gem_group :development, :test do | |
gem "rspec-rails" | |
end | |
run "bundle install" | |
rails_command "generate rspec:install" | |
run "rm -rf test" if yes?("Do you want to remove the /test directory?") | |
# Add EditorConfig Configuration | |
puts "-- Configuring EditorConfig --" | |
if File.exists? ".editorconfig" | |
puts ".editorconfig already exists, aborting editorconfig setup" | |
return | |
end | |
create_file '.editorconfig' do <<~EOF | |
# EditorConfig is awesome: http://EditorConfig.org | |
root = true | |
[*] | |
end_of_line = lf | |
insert_final_newline = true | |
indent_style = space | |
indent_size = 2 | |
[*.{js,rb,erb,html}] | |
charset = utf-8 | |
EOF | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment