diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2017-06-02 12:24:31 -0400 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2017-06-02 12:24:31 -0400 |
commit | 62d316c6d88595940d6da08b3e6c97f9ca2aec1d (patch) | |
tree | 49ae0076ff12a85d588857ef2864dbf1dd09cc81 /railties | |
parent | feefa9fc9803780713f61c6eded0785e3844a681 (diff) | |
parent | f7388635f246b97a1aa0be54579339c6659fb865 (diff) | |
download | rails-62d316c6d88595940d6da08b3e6c97f9ca2aec1d.tar.gz rails-62d316c6d88595940d6da08b3e6c97f9ca2aec1d.tar.bz2 rails-62d316c6d88595940d6da08b3e6c97f9ca2aec1d.zip |
Merge branch 'master' into unlock-minitest
Diffstat (limited to 'railties')
7 files changed, 10 insertions, 11 deletions
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index e8b104a0b2..8429b6c7b8 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -349,7 +349,7 @@ module Rails if defined?(JRUBY_VERSION) GemfileEntry.version "therubyrhino", nil, comment else - GemfileEntry.new "therubyracer", nil, comment, { platforms: :ruby }, true + GemfileEntry.new "mini_racer", nil, comment, { platforms: :ruby }, true end end diff --git a/railties/lib/rails/generators/rails/app/templates/bin/setup.tt b/railties/lib/rails/generators/rails/app/templates/bin/setup.tt index 560cc64a3f..ee9d077c30 100644 --- a/railties/lib/rails/generators/rails/app/templates/bin/setup.tt +++ b/railties/lib/rails/generators/rails/app/templates/bin/setup.tt @@ -1,9 +1,8 @@ -require 'pathname' require 'fileutils' include FileUtils # path to your application root. -APP_ROOT = Pathname.new File.expand_path('..', __dir__) +APP_ROOT = File.expand_path('..', __dir__) def system!(*args) system(*args) || abort("\n== Command #{args} failed ==") diff --git a/railties/lib/rails/generators/rails/app/templates/bin/update.tt b/railties/lib/rails/generators/rails/app/templates/bin/update.tt index 0aedf0d6e2..5b6e50883e 100644 --- a/railties/lib/rails/generators/rails/app/templates/bin/update.tt +++ b/railties/lib/rails/generators/rails/app/templates/bin/update.tt @@ -1,9 +1,8 @@ -require 'pathname' require 'fileutils' include FileUtils # path to your application root. -APP_ROOT = Pathname.new File.expand_path('..', __dir__) +APP_ROOT = File.expand_path('..', __dir__) def system!(*args) system(*args) || abort("\n== Command #{args} failed ==") diff --git a/railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt b/railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt index 9c4a77fd1d..d44331a888 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt +++ b/railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt @@ -36,8 +36,8 @@ Rails.application.configure do config.assets.compile = false # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb - <%- end -%> + <%- end -%> # Enable serving of images, stylesheets, and JavaScripts from an asset server. # config.action_controller.asset_host = 'http://assets.example.com' @@ -50,8 +50,8 @@ Rails.application.configure do # config.action_cable.mount_path = nil # config.action_cable.url = 'wss://example.com/cable' # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ] - <%- end -%> + <%- end -%> # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. # config.force_ssl = true @@ -68,14 +68,15 @@ Rails.application.configure do # Use a real queuing backend for Active Job (and separate queues per environment) # config.active_job.queue_adapter = :resque # config.active_job.queue_name_prefix = "<%= app_name %>_#{Rails.env}" + <%- unless options.skip_action_mailer? -%> config.action_mailer.perform_caching = false # Ignore bad email addresses and do not raise email delivery errors. # Set this to true and configure the email server for immediate delivery to raise delivery errors. # config.action_mailer.raise_delivery_errors = false - <%- end -%> + <%- end -%> # Enable locale fallbacks for I18n (makes lookups for any locale fall back to # the I18n.default_locale when a translation cannot be found). config.i18n.fallbacks = true diff --git a/railties/lib/rails/secrets.rb b/railties/lib/rails/secrets.rb index 20c20cb9f1..c7a8676d7b 100644 --- a/railties/lib/rails/secrets.rb +++ b/railties/lib/rails/secrets.rb @@ -42,7 +42,7 @@ module Rails <<-end_of_template.strip_heredoc # See `secrets.yml` for tips on generating suitable keys. # production: - # external_api_key: 1466aac22e6a869134be3d09b9e89232fc2c2289… + # external_api_key: 1466aac22e6a869134be3d09b9e89232fc2c2289 end_of_template end diff --git a/railties/test/commands/secrets_test.rb b/railties/test/commands/secrets_test.rb index fb8fd2325e..be610f3b47 100644 --- a/railties/test/commands/secrets_test.rb +++ b/railties/test/commands/secrets_test.rb @@ -23,7 +23,7 @@ class Rails::Command::SecretsCommandTest < ActiveSupport::TestCase # Run twice to ensure encrypted secrets can be reread after first edit pass. 2.times do - assert_match(/external_api_key: 1466aac22e6a869134be3d09b9e89232fc2c2289…/, run_edit_command) + assert_match(/external_api_key: 1466aac22e6a869134be3d09b9e89232fc2c2289/, run_edit_command) end end diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 31a5efb1b7..8a8c9a35ce 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -468,7 +468,7 @@ class AppGeneratorTest < Rails::Generators::TestCase if defined?(JRUBY_VERSION) assert_gem "therubyrhino" else - assert_file "Gemfile", /# gem 'therubyracer', platforms: :ruby/ + assert_file "Gemfile", /# gem 'mini_racer', platforms: :ruby/ end end |