lib/suspenders/app_builder.rb in welaika-suspenders-2.13.0 vs lib/suspenders/app_builder.rb in welaika-suspenders-2.15.0

- old
+ new

@@ -44,11 +44,11 @@ template "bin_setup.erb", "bin/setup", port_number: port, force: true run "chmod a+x bin/setup" end def provide_dev_prime_task - copy_file 'development_seeds.rb', 'lib/tasks/development_seeds.rake' + copy_file 'dev.rake', 'lib/tasks/dev.rake' end def configure_generators config = <<-RUBY @@ -99,11 +99,11 @@ config.action_mailer.delivery_method = :smtp config.action_mailer.smtp_settings = SMTP_SETTINGS RUBY inject_into_file 'config/environments/production.rb', config, - :after => 'config.action_mailer.raise_delivery_errors = false' + after: "config.action_mailer.raise_delivery_errors = false" end def enable_rack_canonical_host config = <<-RUBY @@ -133,11 +133,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", ENV.fetch("HOST"))' + 'config.action_controller.asset_host = ENV.fetch("ASSET_HOST", ENV.fetch("APPLICATION_HOST"))' replace_in_file 'config/initializers/assets.rb', "config.assets.version = '1.0'", 'config.assets.version = (ENV["ASSETS_VERSION"] || "1.0")' @@ -234,12 +234,12 @@ remove_file "spec/spec_helper.rb" copy_file "rails_helper.rb", "spec/rails_helper.rb" copy_file "spec_helper.rb", "spec/spec_helper.rb" end - def configure_travis - template 'travis.yml.erb', '.travis.yml' + def configure_ci + template "circle.yml.erb", "circle.yml" end def configure_i18n_for_test_environment copy_file "i18n.rb", "spec/support/i18n.rb" end @@ -323,12 +323,12 @@ def generate_rspec generate 'rspec:install' end - def configure_unicorn - copy_file 'unicorn.rb', 'config/unicorn.rb' + def configure_puma + copy_file "puma.rb", "config/puma.rb" end def setup_foreman copy_file 'sample.env', '.sample.env' copy_file 'Procfile', 'Procfile' @@ -374,10 +374,14 @@ run "mkdir #{dir}" run "touch #{dir}/.keep" end end + def copy_dotfiles + directory("dotfiles", ".") + end + def init_git run 'git init' end def create_staging_heroku_app(flags) @@ -482,10 +486,10 @@ <meta name="ROBOTS" content="NOODP" /> <meta name="viewport" content="initial-scale=1" /> EOS %w(500 404 422).each do |page| - inject_into_file "public/#{page}.html", meta_tags, :after => "<head>\n" + inject_into_file "public/#{page}.html", meta_tags, after: "<head>\n" replace_in_file "public/#{page}.html", /<!--.+-->\n/, '' end end def remove_routes_comment_lines