railties 6.0.2.2 → 6.0.3.rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +43 -0
  3. data/README.rdoc +1 -1
  4. data/lib/rails/application.rb +9 -3
  5. data/lib/rails/application/bootstrap.rb +2 -2
  6. data/lib/rails/application/configuration.rb +1 -1
  7. data/lib/rails/application/default_middleware_stack.rb +1 -2
  8. data/lib/rails/application/routes_reloader.rb +0 -1
  9. data/lib/rails/application_controller.rb +0 -1
  10. data/lib/rails/code_statistics.rb +2 -0
  11. data/lib/rails/command/behavior.rb +1 -1
  12. data/lib/rails/command/spellchecker.rb +0 -1
  13. data/lib/rails/configuration.rb +13 -8
  14. data/lib/rails/engine.rb +2 -3
  15. data/lib/rails/gem_version.rb +2 -2
  16. data/lib/rails/generators.rb +0 -1
  17. data/lib/rails/generators/actions.rb +0 -1
  18. data/lib/rails/generators/actions/create_migration.rb +0 -1
  19. data/lib/rails/generators/app_base.rb +0 -1
  20. data/lib/rails/generators/base.rb +3 -3
  21. data/lib/rails/generators/erb.rb +0 -1
  22. data/lib/rails/generators/erb/mailer/mailer_generator.rb +0 -1
  23. data/lib/rails/generators/erb/scaffold/scaffold_generator.rb +0 -1
  24. data/lib/rails/generators/generated_attribute.rb +0 -1
  25. data/lib/rails/generators/rails/app/app_generator.rb +2 -4
  26. data/lib/rails/generators/rails/app/templates/Gemfile.tt +1 -1
  27. data/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt +2 -1
  28. data/lib/rails/generators/rails/app/templates/gitignore.tt +5 -0
  29. data/lib/rails/generators/rails/controller/controller_generator.rb +0 -1
  30. data/lib/rails/generators/rails/encrypted_file/encrypted_file_generator.rb +6 -2
  31. data/lib/rails/generators/rails/generator/generator_generator.rb +0 -1
  32. data/lib/rails/generators/rails/plugin/plugin_generator.rb +0 -1
  33. data/lib/rails/generators/rails/scaffold_controller/scaffold_controller_generator.rb +0 -1
  34. data/lib/rails/generators/test_unit/generator/generator_generator.rb +0 -1
  35. data/lib/rails/generators/test_unit/integration/integration_generator.rb +0 -1
  36. data/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb +0 -1
  37. data/lib/rails/generators/testing/behaviour.rb +0 -1
  38. data/lib/rails/info_controller.rb +0 -1
  39. data/lib/rails/paths.rb +0 -2
  40. data/lib/rails/rack/logger.rb +0 -1
  41. data/lib/rails/railtie.rb +0 -2
  42. data/lib/rails/railtie/configurable.rb +0 -1
  43. data/lib/rails/railtie/configuration.rb +0 -1
  44. data/lib/rails/tasks/framework.rake +1 -1
  45. data/lib/rails/tasks/zeitwerk.rake +6 -3
  46. metadata +15 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9af01762f6347a67ab6dcaf70a417f6827eea5bd0a72a27c6d4aae7a72a8d2a8
4
- data.tar.gz: 828ce0bbab33e144104f7d2331ecdc26da648ca747fe7a416ed171cc08c4e174
3
+ metadata.gz: b83a45a2b9d60385194ad941d651acfbb3bdaa441d31bb21b59ae2f1f4adb6ff
4
+ data.tar.gz: 6bd164b7e3e9dc1c6defd7560948966d9087a7e40b7ddd33d093e89cd6a92b6d
5
5
  SHA512:
6
- metadata.gz: bbfcf6a212b8e21bf93b94399b275a714c42c37e5aed0ddb21cb6be033e9a7c106193159869ab35f9b5f22ab7218c84714404e55ec50d8fdb1459e0423ed8d51
7
- data.tar.gz: 643053fa1030d29ef53d1fb09c4a24e99daa7fb3c437d8c8bf9ac37f496a9b6f767f9611b0f812671885d0ac43a15d76b05ec8853403ef54ad331d39535c05bc
6
+ metadata.gz: 18a1a48f261c300e60b00a0b2acc1b674a836a29a376ef22e14166749650ba6f01e7828c3c0f666ad6dcc0622c31052477b45b66ce4e7c7292025187f030ee94
7
+ data.tar.gz: f11e798f061a0cde07105d3be04c4f0efd851c9603d0ccf1dbc1711f9b45f6f1f54f8772fff1ce3f1875ccb92ee39d2725c602ae0b8c95cd9c4eb1d102fcc846
@@ -1,3 +1,46 @@
1
+ ## Rails 6.0.3.rc1 (April 30, 2020) ##
2
+
3
+ * Cache compiled view templates when running tests by default
4
+
5
+ When generating a new app without `--skip-spring`, caching classes is
6
+ disabled in `environments/test.rb`. This implicitly disables caching
7
+ view templates too. This change will enable view template caching by
8
+ adding this to the generated `environments/test.rb`:
9
+
10
+ ````ruby
11
+ config.action_view.cache_template_loading = true
12
+ ````
13
+
14
+ *Jorge Manrubia*
15
+
16
+ * `Rails::Application#eager_load!` is available again to load application code
17
+ manually as it was possible in previous versions.
18
+
19
+ Please, note this is not integrated with the whole eager loading logic that
20
+ runs when Rails boots with eager loading enabled, you can think of this
21
+ method as a vanilla recursive code loader.
22
+
23
+ This ability has been restored because there are some use cases for it, such
24
+ as indexers that need to have all application classes and modules in memory.
25
+
26
+ *Xavier Noria*
27
+
28
+ * Generators that inherit from NamedBase respect `--force` option
29
+
30
+ *Josh Brody*
31
+
32
+ * Regression fix: The Rake task `zeitwerk:check` supports eager loaded
33
+ namespaces which do not have eager load paths, like the recently added
34
+ `i18n`. These namespaces are only required to respond to `eager_load!`.
35
+
36
+ *Xavier Noria*
37
+
38
+
39
+ ## Rails 6.0.2.2 (March 19, 2020) ##
40
+
41
+ * No changes.
42
+
43
+
1
44
  ## Rails 6.0.2.1 (December 18, 2019) ##
2
45
 
3
46
  * No changes.
@@ -37,4 +37,4 @@ Bug reports can be filed for the Ruby on Rails project here:
37
37
 
38
38
  Feature requests should be discussed on the rails-core mailing list here:
39
39
 
40
- * https://groups.google.com/forum/?fromgroups#!forum/rubyonrails-core
40
+ * https://discuss.rubyonrails.org/c/rubyonrails-core
@@ -501,8 +501,16 @@ module Rails
501
501
  ordered_railties.flatten - [self]
502
502
  end
503
503
 
504
- protected
504
+ # Eager loads the application code.
505
+ def eager_load!
506
+ if Rails.autoloaders.zeitwerk_enabled?
507
+ Rails.autoloaders.each(&:eager_load)
508
+ else
509
+ super
510
+ end
511
+ end
505
512
 
513
+ protected
506
514
  alias :build_middleware_stack :app
507
515
 
508
516
  def run_tasks_blocks(app) #:nodoc:
@@ -582,7 +590,6 @@ module Rails
582
590
  end
583
591
 
584
592
  private
585
-
586
593
  def generate_development_secret
587
594
  if secrets.secret_key_base.nil?
588
595
  key_file = Rails.root.join("tmp/development_secret.txt")
@@ -624,7 +631,6 @@ module Rails
624
631
  end
625
632
 
626
633
  private
627
-
628
634
  def convert_key(key)
629
635
  unless key.kind_of?(Symbol)
630
636
  ActiveSupport::Deprecation.warn(<<~MESSAGE.squish)
@@ -26,7 +26,7 @@ config.eager_load is set to nil. Please update your config/environments/*.rb fil
26
26
  * test - set it to false (unless you use a tool that preloads your test environment)
27
27
  * production - set it to true
28
28
 
29
- INFO
29
+ INFO
30
30
  config.eager_load = config.cache_classes
31
31
  end
32
32
  end
@@ -56,7 +56,7 @@ INFO
56
56
  # Initialize cache early in the stack so railties can make use of it.
57
57
  initializer :initialize_cache, group: :all do
58
58
  unless Rails.cache
59
- Rails.cache = ActiveSupport::Cache.lookup_store(config.cache_store)
59
+ Rails.cache = ActiveSupport::Cache.lookup_store(*config.cache_store)
60
60
 
61
61
  if Rails.cache.respond_to?(:middleware)
62
62
  config.middleware.insert_before(::Rack::Runtime, Rails.cache.middleware)
@@ -31,7 +31,7 @@ module Rails
31
31
  @filter_parameters = []
32
32
  @filter_redirect = []
33
33
  @helpers_paths = []
34
- @hosts = Array(([IPAddr.new("0.0.0.0/0"), IPAddr.new("::/0"), ".localhost"] if Rails.env.development?))
34
+ @hosts = Array(([".localhost", IPAddr.new("0.0.0.0/0"), IPAddr.new("::/0")] if Rails.env.development?))
35
35
  @public_file_server = ActiveSupport::OrderedOptions.new
36
36
  @public_file_server.enabled = true
37
37
  @public_file_server.index_name = "index"
@@ -16,7 +16,7 @@ module Rails
16
16
  middleware.use ::ActionDispatch::HostAuthorization, config.hosts, config.action_dispatch.hosts_response_app
17
17
 
18
18
  if config.force_ssl
19
- middleware.use ::ActionDispatch::SSL, config.ssl_options
19
+ middleware.use ::ActionDispatch::SSL, **config.ssl_options
20
20
  end
21
21
 
22
22
  middleware.use ::Rack::Sendfile, config.action_dispatch.x_sendfile_header
@@ -79,7 +79,6 @@ module Rails
79
79
  end
80
80
 
81
81
  private
82
-
83
82
  def load_rack_cache
84
83
  rack_cache = config.action_dispatch.rack_cache
85
84
  return unless rack_cache
@@ -25,7 +25,6 @@ module Rails
25
25
  end
26
26
 
27
27
  private
28
-
29
28
  def updater
30
29
  @updater ||= ActiveSupport::FileUpdateChecker.new(paths) { reload! }
31
30
  end
@@ -12,7 +12,6 @@ class Rails::ApplicationController < ActionController::Base # :nodoc:
12
12
  end
13
13
 
14
14
  private
15
-
16
15
  def require_local!
17
16
  unless local_request?
18
17
  render html: "<p>For security purposes, this information is only available to local requests.</p>".html_safe, status: :forbidden
@@ -8,6 +8,8 @@ class CodeStatistics #:nodoc:
8
8
  "Helper tests",
9
9
  "Model tests",
10
10
  "Mailer tests",
11
+ "Mailbox tests",
12
+ "Channel tests",
11
13
  "Job tests",
12
14
  "Integration tests",
13
15
  "System tests"]
@@ -44,7 +44,7 @@ module Rails
44
44
  require path
45
45
  return
46
46
  rescue LoadError => e
47
- raise unless e.message =~ /#{Regexp.escape(path)}$/
47
+ raise unless /#{Regexp.escape(path)}$/.match?(e.message)
48
48
  rescue Exception => e
49
49
  warn "[WARNING] Could not load #{command_type} #{path.inspect}. Error: #{e.message}.\n#{e.backtrace.join("\n")}"
50
50
  end
@@ -13,7 +13,6 @@ module Rails
13
13
  end
14
14
 
15
15
  private
16
-
17
16
  # This code is based directly on the Text gem implementation.
18
17
  # Copyright (c) 2006-2013 Paul Battley, Michael Neumann, Tim Fletcher.
19
18
  #
@@ -41,34 +41,39 @@ module Rails
41
41
  end
42
42
 
43
43
  def insert_before(*args, &block)
44
- @operations << [__method__, args, block]
44
+ @operations << -> middleware { middleware.send(__method__, *args, &block) }
45
45
  end
46
+ ruby2_keywords(:insert_before) if respond_to?(:ruby2_keywords, true)
46
47
 
47
48
  alias :insert :insert_before
48
49
 
49
50
  def insert_after(*args, &block)
50
- @operations << [__method__, args, block]
51
+ @operations << -> middleware { middleware.send(__method__, *args, &block) }
51
52
  end
53
+ ruby2_keywords(:insert_after) if respond_to?(:ruby2_keywords, true)
52
54
 
53
55
  def swap(*args, &block)
54
- @operations << [__method__, args, block]
56
+ @operations << -> middleware { middleware.send(__method__, *args, &block) }
55
57
  end
58
+ ruby2_keywords(:swap) if respond_to?(:ruby2_keywords, true)
56
59
 
57
60
  def use(*args, &block)
58
- @operations << [__method__, args, block]
61
+ @operations << -> middleware { middleware.send(__method__, *args, &block) }
59
62
  end
63
+ ruby2_keywords(:use) if respond_to?(:ruby2_keywords, true)
60
64
 
61
65
  def delete(*args, &block)
62
- @delete_operations << [__method__, args, block]
66
+ @delete_operations << -> middleware { middleware.send(__method__, *args, &block) }
63
67
  end
64
68
 
65
69
  def unshift(*args, &block)
66
- @operations << [__method__, args, block]
70
+ @operations << -> middleware { middleware.send(__method__, *args, &block) }
67
71
  end
72
+ ruby2_keywords(:unshift) if respond_to?(:ruby2_keywords, true)
68
73
 
69
74
  def merge_into(other) #:nodoc:
70
- (@operations + @delete_operations).each do |operation, args, block|
71
- other.send(operation, *args, &block)
75
+ (@operations + @delete_operations).each do |operation|
76
+ operation.call(other)
72
77
  end
73
78
 
74
79
  other
@@ -470,7 +470,8 @@ module Rails
470
470
  end
471
471
 
472
472
  def eager_load!
473
- # Already done by Zeitwerk::Loader.eager_load_all in the finisher.
473
+ # Already done by Zeitwerk::Loader.eager_load_all. We need this guard to
474
+ # easily provide a compatible API for both zeitwerk and classic modes.
474
475
  return if Rails.autoloaders.zeitwerk_enabled?
475
476
 
476
477
  config.eager_load_paths.each do |load_path|
@@ -654,14 +655,12 @@ module Rails
654
655
  end
655
656
 
656
657
  protected
657
-
658
658
  def run_tasks_blocks(*) #:nodoc:
659
659
  super
660
660
  paths["lib/tasks"].existent.sort.each { |ext| load(ext) }
661
661
  end
662
662
 
663
663
  private
664
-
665
664
  def load_config_initializer(initializer) # :doc:
666
665
  ActiveSupport::Notifications.instrument("load_config_initializer.railties", initializer: initializer) do
667
666
  load(initializer)
@@ -9,8 +9,8 @@ module Rails
9
9
  module VERSION
10
10
  MAJOR = 6
11
11
  MINOR = 0
12
- TINY = 2
13
- PRE = "2"
12
+ TINY = 3
13
+ PRE = "rc1"
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
@@ -287,7 +287,6 @@ module Rails
287
287
  end
288
288
 
289
289
  private
290
-
291
290
  def print_list(base, namespaces) # :doc:
292
291
  namespaces = namespaces.reject { |n| hidden_namespaces.include?(n) }
293
292
  super
@@ -268,7 +268,6 @@ module Rails
268
268
  end
269
269
 
270
270
  private
271
-
272
271
  # Define log for backwards compatibility. If just one argument is sent,
273
272
  # invoke say, otherwise invoke say_status. Differently from say and
274
273
  # similarly to say_status, this method respects the quiet? option given.
@@ -40,7 +40,6 @@ module Rails
40
40
  alias :exists? :existing_migration
41
41
 
42
42
  private
43
-
44
43
  def on_conflict_behavior # :doc:
45
44
  options = base.options.merge(config)
46
45
  if identical?
@@ -108,7 +108,6 @@ module Rails
108
108
  end
109
109
 
110
110
  private
111
-
112
111
  def gemfile_entry(name, *args) # :doc:
113
112
  options = args.extract_options!
114
113
  version = args.first
@@ -249,11 +249,11 @@ module Rails
249
249
  end
250
250
 
251
251
  private
252
-
253
252
  # Check whether the given class names are already taken by user
254
253
  # application or Ruby on Rails.
255
254
  def class_collisions(*class_names)
256
255
  return unless behavior == :invoke
256
+ return if options.force?
257
257
 
258
258
  class_names.flatten.each do |class_name|
259
259
  class_name = class_name.to_s
@@ -266,8 +266,8 @@ module Rails
266
266
 
267
267
  if last && last.const_defined?(last_name.camelize, false)
268
268
  raise Error, "The name '#{class_name}' is either already used in your application " \
269
- "or reserved by Ruby on Rails. Please choose an alternative and run " \
270
- "this generator again."
269
+ "or reserved by Ruby on Rails. Please choose an alternative or use " \
270
+ "--force to skip this check and run this generator again."
271
271
  end
272
272
  end
273
273
  end
@@ -6,7 +6,6 @@ module Erb # :nodoc:
6
6
  module Generators # :nodoc:
7
7
  class Base < Rails::Generators::NamedBase #:nodoc:
8
8
  private
9
-
10
9
  def formats
11
10
  [format]
12
11
  end
@@ -29,7 +29,6 @@ module Erb # :nodoc:
29
29
  end
30
30
 
31
31
  private
32
-
33
32
  def formats
34
33
  [:text, :html]
35
34
  end
@@ -24,7 +24,6 @@ module Erb # :nodoc:
24
24
  end
25
25
 
26
26
  private
27
-
28
27
  def available_views
29
28
  %w(index edit show new _form)
30
29
  end
@@ -39,7 +39,6 @@ module Rails
39
39
  end
40
40
 
41
41
  private
42
-
43
42
  # parse possible attribute options like :limit for string/text/binary/integer, :precision/:scale for decimals or :polymorphic for references/belongs_to
44
43
  # when declaring options curly brackets should be used
45
44
  def parse_type_and_options(type)
@@ -68,7 +68,7 @@ module Rails
68
68
 
69
69
  def version_control
70
70
  if !options[:skip_git] && !options[:pretend]
71
- run "git init", capture: options[:quiet]
71
+ run "git init", capture: options[:quiet], abort_on_failure: false
72
72
  end
73
73
  end
74
74
 
@@ -79,7 +79,7 @@ module Rails
79
79
  def app
80
80
  directory "app"
81
81
 
82
- keep_file "app/assets/images"
82
+ empty_directory_with_keep_file "app/assets/images"
83
83
 
84
84
  keep_file "app/controllers/concerns"
85
85
  keep_file "app/models/concerns"
@@ -494,7 +494,6 @@ module Rails
494
494
  end
495
495
 
496
496
  private
497
-
498
497
  # Define file as an alias to create_file for backwards compatibility.
499
498
  def file(*args, &block)
500
499
  create_file(*args, &block)
@@ -539,7 +538,6 @@ module Rails
539
538
  end
540
539
 
541
540
  private
542
-
543
541
  def handle_version_request!(argument)
544
542
  if ["--version", "-v"].include?(argument)
545
543
  require "rails/version"
@@ -53,7 +53,7 @@ group :development do
53
53
  <%- end -%>
54
54
  <%- end -%>
55
55
  <% if depend_on_listen? -%>
56
- gem 'listen', '>= 3.0.5', '< 3.2'
56
+ gem 'listen', '~> 3.2'
57
57
  <% end -%>
58
58
  <% if spring_install? -%>
59
59
  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
@@ -6,9 +6,10 @@
6
6
  Rails.application.configure do
7
7
  # Settings specified here will take precedence over those in config/application.rb.
8
8
 
9
- <%-# Spring executes the reloaders when files change. %>
9
+ <%-# Spring executes the reloaders when files change. -%>
10
10
  <%- if spring_install? -%>
11
11
  config.cache_classes = false
12
+ config.action_view.cache_template_loading = true
12
13
  <%- else -%>
13
14
  config.cache_classes = true
14
15
  <%- end -%>
@@ -20,6 +20,11 @@
20
20
  <% if keeps? -%>
21
21
  !/log/.keep
22
22
  !/tmp/.keep
23
+
24
+ # Ignore pidfiles, but keep the directory.
25
+ /tmp/pids/*
26
+ !/tmp/pids/
27
+ !/tmp/pids/.keep
23
28
  <% end -%>
24
29
 
25
30
  <% unless skip_active_storage? -%>
@@ -25,7 +25,6 @@ module Rails
25
25
  end
26
26
 
27
27
  private
28
-
29
28
  def file_name
30
29
  @_file_name ||= remove_possible_suffix(super)
31
30
  end
@@ -8,8 +8,12 @@ module Rails
8
8
  class EncryptedFileGenerator < Base # :nodoc:
9
9
  def add_encrypted_file_silently(file_path, key_path, template = encrypted_file_template)
10
10
  unless File.exist?(file_path)
11
- setup = { content_path: file_path, key_path: key_path, env_key: "RAILS_MASTER_KEY", raise_if_missing_key: true }
12
- ActiveSupport::EncryptedFile.new(setup).write(template)
11
+ ActiveSupport::EncryptedFile.new(
12
+ content_path: file_path,
13
+ key_path: key_path,
14
+ env_key: "RAILS_MASTER_KEY",
15
+ raise_if_missing_key: true
16
+ ).write(template)
13
17
  end
14
18
  end
15
19
 
@@ -15,7 +15,6 @@ module Rails
15
15
  hook_for :test_framework
16
16
 
17
17
  private
18
-
19
18
  def generator_dir
20
19
  if options[:namespace]
21
20
  File.join("lib", "generators", regular_class_path, file_name)
@@ -269,7 +269,6 @@ task default: :test
269
269
  end
270
270
 
271
271
  private
272
-
273
272
  def create_dummy_app(path = nil)
274
273
  dummy_path(path) if path
275
274
 
@@ -34,7 +34,6 @@ module Rails
34
34
  end
35
35
 
36
36
  private
37
-
38
37
  def permitted_params
39
38
  attachments, others = attributes_names.partition { |name| attachments?(name) }
40
39
  params = others.map { |name| ":#{name}" }
@@ -15,7 +15,6 @@ module TestUnit # :nodoc:
15
15
  end
16
16
 
17
17
  private
18
-
19
18
  def generator_path
20
19
  if options[:namespace]
21
20
  File.join("generators", regular_class_path, file_name, "#{file_name}_generator")
@@ -12,7 +12,6 @@ module TestUnit # :nodoc:
12
12
  end
13
13
 
14
14
  private
15
-
16
15
  def file_name
17
16
  @_file_name ||= super.sub(/_test\z/i, "")
18
17
  end
@@ -38,7 +38,6 @@ module TestUnit # :nodoc:
38
38
  end
39
39
 
40
40
  private
41
-
42
41
  def attributes_string
43
42
  attributes_hash.map { |k, v| "#{k}: #{v}" }.join(", ")
44
43
  end
@@ -88,7 +88,6 @@ module Rails
88
88
  end
89
89
 
90
90
  private
91
-
92
91
  def destination_root_is_set?
93
92
  raise "You need to configure your Rails::Generators::TestCase destination root." unless destination_root
94
93
  end
@@ -33,7 +33,6 @@ class Rails::InfoController < Rails::ApplicationController # :nodoc:
33
33
  end
34
34
 
35
35
  private
36
-
37
36
  def match_route
38
37
  _routes.routes.select { |route|
39
38
  yield route.path
@@ -98,7 +98,6 @@ module Rails
98
98
  end
99
99
 
100
100
  private
101
-
102
101
  def filter_by(&block)
103
102
  all_paths.find_all(&block).flat_map { |path|
104
103
  paths = path.existent
@@ -223,7 +222,6 @@ module Rails
223
222
  alias to_a expanded
224
223
 
225
224
  private
226
-
227
225
  def files_in(path)
228
226
  Dir.chdir(path) do
229
227
  files = Dir.glob(@glob)
@@ -30,7 +30,6 @@ module Rails
30
30
  end
31
31
 
32
32
  private
33
-
34
33
  def call_app(request, env) # :doc:
35
34
  instrumenter = ActiveSupport::Notifications.instrumenter
36
35
  instrumenter.start "request.action_dispatch", request: request
@@ -228,7 +228,6 @@ module Rails
228
228
  end
229
229
 
230
230
  protected
231
-
232
231
  def run_console_blocks(app) #:nodoc:
233
232
  each_registered_block(:console) { |block| block.call(app) }
234
233
  end
@@ -247,7 +246,6 @@ module Rails
247
246
  end
248
247
 
249
248
  private
250
-
251
249
  # run `&block` in every registered block in `#register_block_for`
252
250
  def each_registered_block(type, &block)
253
251
  klass = self.class
@@ -27,7 +27,6 @@ module Rails
27
27
  end
28
28
 
29
29
  private
30
-
31
30
  def method_missing(*args, &block)
32
31
  instance.send(*args, &block)
33
32
  end
@@ -87,7 +87,6 @@ module Rails
87
87
  end
88
88
 
89
89
  private
90
-
91
90
  def method_missing(name, *args, &blk)
92
91
  if name.to_s =~ /=$/
93
92
  @@options[$`.to_sym] = args.first
@@ -8,7 +8,7 @@ namespace :app do
8
8
  task template: :environment do
9
9
  template = ENV["LOCATION"]
10
10
  raise "No LOCATION value given. Please set LOCATION either as path to a file or a URL" if template.blank?
11
- template = File.expand_path(template) if template !~ %r{\A[A-Za-z][A-Za-z0-9+\-\.]*://}
11
+ template = File.expand_path(template) if !%r{\A[A-Za-z][A-Za-z0-9+\-\.]*://}.match?(template)
12
12
  require "rails/generators"
13
13
  require "rails/generators/rails/app/app_generator"
14
14
  generator = Rails::Generators::AppGenerator.new [Rails.root], {}, { destination_root: Rails.root }
@@ -14,8 +14,8 @@ end
14
14
  report_not_checked = ->(not_checked) do
15
15
  puts
16
16
  puts <<~EOS
17
- WARNING: The files in these directories cannot be checked because they
18
- are not eager loaded:
17
+ WARNING: The following directories will only be checked if you configure
18
+ them to be eager loaded:
19
19
  EOS
20
20
  puts
21
21
 
@@ -53,8 +53,11 @@ namespace :zeitwerk do
53
53
  end
54
54
  end
55
55
 
56
+ require "active_support/core_ext/object/try"
56
57
  eager_load_paths = Rails.configuration.eager_load_namespaces.map do |eln|
57
- eln.config.eager_load_paths if eln.respond_to?(:config)
58
+ # Quick regression fix for 6.0.3 to support namespaces that do not have
59
+ # eager load paths, like the recently added i18n. I'll rewrite this task.
60
+ eln.try(:config).try(:eager_load_paths)
58
61
  end.compact.flatten
59
62
 
60
63
  not_checked = ActiveSupport::Dependencies.autoload_paths - eager_load_paths
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: railties
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.2.2
4
+ version: 6.0.3.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-03-19 00:00:00.000000000 Z
11
+ date: 2020-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 6.0.2.2
19
+ version: 6.0.3.rc1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 6.0.2.2
26
+ version: 6.0.3.rc1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: actionpack
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 6.0.2.2
33
+ version: 6.0.3.rc1
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 6.0.2.2
40
+ version: 6.0.3.rc1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -92,14 +92,14 @@ dependencies:
92
92
  requirements:
93
93
  - - '='
94
94
  - !ruby/object:Gem::Version
95
- version: 6.0.2.2
95
+ version: 6.0.3.rc1
96
96
  type: :development
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - '='
101
101
  - !ruby/object:Gem::Version
102
- version: 6.0.2.2
102
+ version: 6.0.3.rc1
103
103
  description: 'Rails internals: application bootup, plugins, generators, and rake tasks.'
104
104
  email: david@loudthinking.com
105
105
  executables:
@@ -432,10 +432,10 @@ licenses:
432
432
  - MIT
433
433
  metadata:
434
434
  bug_tracker_uri: https://github.com/rails/rails/issues
435
- changelog_uri: https://github.com/rails/rails/blob/v6.0.2.2/railties/CHANGELOG.md
436
- documentation_uri: https://api.rubyonrails.org/v6.0.2.2/
437
- mailing_list_uri: https://groups.google.com/forum/#!forum/rubyonrails-talk
438
- source_code_uri: https://github.com/rails/rails/tree/v6.0.2.2/railties
435
+ changelog_uri: https://github.com/rails/rails/blob/v6.0.3.rc1/railties/CHANGELOG.md
436
+ documentation_uri: https://api.rubyonrails.org/v6.0.3.rc1/
437
+ mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
438
+ source_code_uri: https://github.com/rails/rails/tree/v6.0.3.rc1/railties
439
439
  post_install_message:
440
440
  rdoc_options:
441
441
  - "--exclude"
@@ -449,11 +449,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
449
449
  version: 2.5.0
450
450
  required_rubygems_version: !ruby/object:Gem::Requirement
451
451
  requirements:
452
- - - ">="
452
+ - - ">"
453
453
  - !ruby/object:Gem::Version
454
- version: '0'
454
+ version: 1.3.1
455
455
  requirements: []
456
- rubygems_version: 3.0.3
456
+ rubygems_version: 3.1.2
457
457
  signing_key:
458
458
  specification_version: 4
459
459
  summary: Tools for creating, working with, and running Rails applications.