Skip to content

Instantly share code, notes, and snippets.

@bellatrix988
Last active June 11, 2022 14:59
Show Gist options
  • Save bellatrix988/25023f4274f13b99b9701d00bc2ae809 to your computer and use it in GitHub Desktop.
Save bellatrix988/25023f4274f13b99b9701d00bc2ae809 to your computer and use it in GitHub Desktop.
Rails initialisation templates
--database=postgresql
--skip-action-cable
--skip-action-mailer
--skip-bundle
--skip-javascript
--skip-keeps
--skip-test
require:
- rubocop-rails
#-- Overrides --------------------------------------------------------------------------------------
Layout/LineLength:
Max: 120
Layout/FirstHashElementIndentation:
EnforcedStyle: consistent
Metrics/MethodLength:
CountComments: false
Max: 20
#-- Disabled ---------------------------------------------------------------------------------------
Style/Documentation:
Enabled: false
#-- Exceptions -------------------------------------------------------------------------------------
AllCops:
NewCops: enable
Exclude:
- 'db/schema.rb'
- 'db/migrate/*'

Rails initialisation templates

# GEMs most
gem 'rails', '~> 7.0.0'
gem 'pg'
# gem 'devise'
# gem 'administrate'
gem_group :development, :test do
gem 'rspec-rails'
gem 'factory_bot_rails'
gem 'faker'
end
gem_group :development do
gem 'awesome_print'
gem 'pry-rails'
gem 'bullet'
gem 'rubocop', require: false
# gem 'annotate'
end
gem_group :test do
gem 'shoulda-matchers', '~> 3.1'
gem 'database_cleaner'
gem 'simplecov', require: false
end
run "bundle install"
file 'app/services/base_service.rb', <<-CODE
class BaseService
class << self
def call(*args)
new(*args).call
end
end
end
CODE
after_bundle do
git :init
git add: "."
git commit: %Q{ -m 'Initial commit' }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment