Last active
August 21, 2019 14:34
-
-
Save 0x7466/a7893cc591b065772ec4bb216718f5b6 to your computer and use it in GitHub Desktop.
Rails 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
--database=postgresql | |
--template=https://gist.githubusercontent.com/tobiasfeistmantl/a7893cc591b065772ec4bb216718f5b6/raw/5653f31fbcc960f711349632b98f7d0ebbecc090/rails_template.rb | |
--skip-coffee |
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
2.6.3 |
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
after_bundle do | |
git :init | |
git add: '-A' | |
git commit: '-m "Initial commit"' | |
gem_group :development, :test do | |
gem 'rspec-rails' | |
gem 'factory_bot_rails' | |
gem 'ffaker' | |
gem 'dotenv-rails' | |
gem 'shoulda-matchers' | |
gem 'growl' | |
gem 'rubocop', require: false | |
end | |
gem_group :development do | |
gem 'guard' | |
gem 'guard-rspec', require: false | |
gem 'rails-erd' | |
end | |
run 'bundle install' | |
after_bundle do | |
generate 'rspec:install' | |
file 'spec/support/factory_bot.rb', <<-CODE | |
RSpec.configure do |config| | |
config.include FactoryBot::Syntax::Methods | |
end | |
CODE | |
run 'touch .env' | |
file 'spec/support/shoulda_matchers.rb', <<-CODE | |
Shoulda::Matchers.configure do |config| | |
config.integrate do |with| | |
with.test_framework :rspec | |
with.library :rails | |
end | |
end | |
CODE | |
run 'guard init rspec' | |
file '.gitignore', <<-CODE | |
*.rbc | |
capybara-*.html | |
.rspec | |
/db/*.sqlite3 | |
/db/*.sqlite3-journal | |
/public/system | |
/coverage/ | |
/spec/tmp | |
*.orig | |
rerun.txt | |
pickle-email-*.html | |
# Ignore all logfiles and tempfiles. | |
/log/* | |
/tmp/* | |
!/log/.keep | |
!/tmp/.keep | |
# TODO Comment out this rule if you are OK with secrets being uploaded to the repo | |
config/initializers/secret_token.rb | |
config/master.key | |
# Only include if you have production secrets in this file, which is no longer a Rails default | |
# config/secrets.yml | |
# dotenv | |
# TODO Comment out this rule if environment variables can be committed | |
.env | |
## Environment normalization: | |
/.bundle | |
/vendor/bundle | |
# these should all be checked in to normalize the environment: | |
# Gemfile.lock, .ruby-version, .ruby-gemset | |
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this: | |
.rvmrc | |
# if using bower-rails ignore default bower_components path bower.json files | |
/vendor/assets/bower_components | |
*.bowerrc | |
bower.json | |
# Ignore pow environment settings | |
.powenv | |
# Ignore Byebug command history file. | |
.byebug_history | |
# Ignore node_modules | |
node_modules/ | |
# Ignore precompiled javascript packs | |
/public/packs | |
/public/packs-test | |
/public/assets | |
# Ignore yarn files | |
/yarn-error.log | |
yarn-debug.log* | |
.yarn-integrity | |
# Ignore uploaded files in development | |
/storage/* | |
!/storage/.keep | |
CODE | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment