diff options
author | Joel Hawksley <joelhawksley@github.com> | 2019-06-03 08:27:09 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-03 08:27:09 -0600 |
commit | 60af9db3745f994e8a4bd7afe9dfa6ea8be7bb7c (patch) | |
tree | 99c9199bf71835f18e2c746b04abe70569e5baed /railties | |
parent | a85c372798723b900762c27e62c35689905327aa (diff) | |
parent | c926ca46280aee795b98206dd0707a96b9423cc5 (diff) | |
download | rails-60af9db3745f994e8a4bd7afe9dfa6ea8be7bb7c.tar.gz rails-60af9db3745f994e8a4bd7afe9dfa6ea8be7bb7c.tar.bz2 rails-60af9db3745f994e8a4bd7afe9dfa6ea8be7bb7c.zip |
Merge pull request #2 from rails/master
merge master
Diffstat (limited to 'railties')
3 files changed, 25 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb index f2f46d6e25..7336e235f6 100644 --- a/railties/lib/rails/generators/rails/app/app_generator.rb +++ b/railties/lib/rails/generators/rails/app/app_generator.rb @@ -243,7 +243,10 @@ module Rails # can change in Ruby 1.8.7 when we FileUtils.cd. RAILS_DEV_PATH = File.expand_path("../../../../../..", __dir__) - class AppGenerator < AppBase # :nodoc: + class AppGenerator < AppBase + + # :stopdoc: + WEBPACKS = %w( react vue angular elm stimulus ) add_shared_options_for "application" @@ -492,6 +495,8 @@ module Rails "rails new #{arguments.map(&:usage).join(' ')} [options]" end + # :startdoc: + private # Define file as an alias to create_file for backwards compatibility. diff --git a/railties/lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb.tt b/railties/lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb.tt index 9a7267c783..b8c1f21c0b 100644 --- a/railties/lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb.tt +++ b/railties/lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb.tt @@ -6,7 +6,7 @@ <%%= csp_meta_tag %> <%- if options[:skip_javascript] -%> - <%%= stylesheet_link_tag 'application', media: 'all' %> + <%%= stylesheet_link_tag 'application', media: 'all' %> <%- else -%> <%- unless options[:skip_turbolinks] -%> <%%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> diff --git a/railties/test/application/test_runner_test.rb b/railties/test/application/test_runner_test.rb index 1ab45abcd0..7fc918898b 100644 --- a/railties/test/application/test_runner_test.rb +++ b/railties/test/application/test_runner_test.rb @@ -564,6 +564,24 @@ module ApplicationTests assert_no_match "create_table(:users)", output end + def test_run_in_parallel_with_process_worker_crash + exercise_parallelization_regardless_of_machine_core_count(with: :processes) + + file_name = app_file("test/models/parallel_test.rb", <<-RUBY) + require 'test_helper' + + class ParallelTest < ActiveSupport::TestCase + def test_crash + Kernel.exit 1 + end + end + RUBY + + output = run_test_command(file_name) + + assert_match %r{Queue not empty, but all workers have finished. This probably means that a worker crashed and 1 tests were missed.}, output + end + def test_run_in_parallel_with_threads exercise_parallelization_regardless_of_machine_core_count(with: :threads) |