lib/suspenders/app_builder.rb in welaika-suspenders-2.7.0 vs lib/suspenders/app_builder.rb in welaika-suspenders-2.7.1

- old
+ new

@@ -10,19 +10,15 @@ replace_in_file 'config/environments/development.rb', 'raise_delivery_errors = false', 'raise_delivery_errors = true' end def configure_letter_opener - config = <<-RUBY - - config.action_mailer.delivery_method = :letter_opener - RUBY - - # this method must be called after `raise_on_delivery_errors` - # because the `after` clause search for `raise_delivery_errors = true` - inject_into_file 'config/environments/development.rb', config, - :after => 'config.action_mailer.raise_delivery_errors = true' + inject_into_file( + "config/environments/development.rb", + "\n config.action_mailer.delivery_method = :letter_opener", + after: "config.action_mailer.raise_delivery_errors = true", + ) end def raise_on_unpermitted_parameters config = <<-RUBY config.action_controller.action_on_unpermitted_parameters = :raise @@ -97,11 +93,11 @@ end def setup_asset_host replace_in_file 'config/environments/production.rb', "# config.action_controller.asset_host = 'http://assets.example.com'", - 'config.action_controller.asset_host = ENV.fetch("ASSET_HOST")' + 'config.action_controller.asset_host = ENV.fetch("ASSET_HOST", ENV.fetch("HOST"))' replace_in_file 'config/initializers/assets.rb', "config.assets.version = '1.0'", 'config.assets.version = (ENV["ASSETS_VERSION"] || "1.0")' @@ -224,10 +220,15 @@ def configure_action_mailer_in_specs copy_file 'action_mailer.rb', 'spec/support/action_mailer.rb' end + def configure_locales + remove_file "config/locales/en.yml" + template "config_locales_it.yml.erb", "config/locales/it.yml" + end + def configure_rack_timeout copy_file 'rack_timeout.rb', 'config/initializers/rack_timeout.rb' end def configure_slim @@ -371,9 +372,10 @@ $ ./bin/deploy staging $ ./bin/deploy production MARKDOWN append_file "README.md", instructions + run "chmod a+x bin/deploy" end def create_github_repo(repo_name) path_addition = override_path_for_tests run "#{path_addition} hub create #{repo_name}"