Skip to content

Instantly share code, notes, and snippets.

@gogvale
Created January 25, 2024 18:50
Show Gist options
  • Save gogvale/ff3609e2dfc811f612c6bf6fd87fd1bd to your computer and use it in GitHub Desktop.
Save gogvale/ff3609e2dfc811f612c6bf6fd87fd1bd to your computer and use it in GitHub Desktop.
Rails template with my favorite gems (and authentication setup with rodauth)
gem 'bcrypt', '~> 3.1'
gem_group :development, :test do
gem 'faker', '~> 3.0'
gem 'json_spec', '~> 1.1'
gem 'parallel_tests', '~> 4.0'
gem 'rspec-rails', '~> 6.0'
gem 'shoulda-matchers', '~> 5.2'
gem 'webmock'
end
gem_group :development do
gem 'rubocop', '~> 1.40'
end
gem_group :canary, :production do
gem 'fog-aws', '~> 3.16'
end
gem 'blueprinter', '~> 0.25'
gem 'factory_bot_rails', '~> 6.2'
gem 'figaro', '~> 1.2'
gem 'httparty', '~> 0.21'
gem 'jwt', '~> 2.5'
gem 'kaminari', '~> 1.2'
gem 'oj', '~> 3.13'
gem 'pg_search', '~> 2.3', '>= 2.3.6'
gem 'rodauth-i18n', '~> 0.5.2'
gem 'rodauth-rails', '~> 1.6'
# Add additional configurations to development.rb
inject_into_file 'config/environments/development.rb', after: "Rails.application.configure do\n" do
<<-RUBY
# Additional configurations
config.action_mailer.default_url_options = { host: "localhost", port: 3000 }
config.generators do |g|
g.orm :active_record, primary_key_type: :uuid
end
RUBY
end
# Setup Rodauth generators and migrations
after_bundle do
# Change the generator to use --jwt
generate 'rodauth:install --jwt'
# Migrate the database
rails_command 'db:create'
rails_command 'db:migrate'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment