Class: Hatate::AppBuilder
- Inherits:
-
Rails::AppBuilder
- Object
- Rails::AppBuilder
- Hatate::AppBuilder
- Defined in:
- lib/hatate/app_builder.rb
Instance Method Summary collapse
- #database_config ⇒ Object
- #dependencies ⇒ Object
- #gemfile ⇒ Object
- #github_actions ⇒ Object
- #leftovers ⇒ Object
- #readme ⇒ Object
- #ruby_version ⇒ Object
- #test_helpers ⇒ Object
Instance Method Details
#database_config ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/hatate/app_builder.rb', line 16 def database_config inject_into_file( "config/database.yml", postgres_test_config, after: "database: #{app_name}_test" ) end |
#dependencies ⇒ Object
24 25 26 27 28 |
# File 'lib/hatate/app_builder.rb', line 24 def dependencies bundle_command "install" bundle_command "lock --add-platform x86_64-linux" rails_command "tailwindcss:install" end |
#gemfile ⇒ Object
7 8 9 |
# File 'lib/hatate/app_builder.rb', line 7 def gemfile template "Gemfile.erb", "Gemfile" end |
#github_actions ⇒ Object
30 31 32 33 |
# File 'lib/hatate/app_builder.rb', line 30 def github_actions template "lint.yml", ".github/workflows/lint.yml" template "test.yml", ".github/workflows/test.yml" end |
#leftovers ⇒ Object
11 12 13 14 |
# File 'lib/hatate/app_builder.rb', line 11 def leftovers bundle_command "exec standardrb --fix-unsafely" initial_commit end |
#readme ⇒ Object
3 4 5 |
# File 'lib/hatate/app_builder.rb', line 3 def readme template "README.md.erb", "README.md" end |
#ruby_version ⇒ Object
46 47 48 |
# File 'lib/hatate/app_builder.rb', line 46 def ruby_version create_file ".ruby-version", "#{Hatate::RUBY_VERSION}\n" end |
#test_helpers ⇒ Object
35 36 37 38 39 40 41 42 43 44 |
# File 'lib/hatate/app_builder.rb', line 35 def test_helpers template "spec/.rspec", ".rspec" template "spec/spec_helper.rb", "spec/spec_helper.rb" template "spec/rails_helper.rb", "spec/rails_helper.rb" template "spec/support/cuprite.rb", "spec/support/cuprite.rb" template "spec/support/system.rb", "spec/support/system.rb" template "spec/support/factory_bot.rb", "spec/support/factory_bot.rb" template "spec/support/freeze_time.rb", "spec/support/freeze_time.rb" template "spec/support/i18n.rb", "spec/support/i18n.rb" end |