railties 6.0.0.rc1 → 6.0.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +22 -1
- data/lib/rails/application.rb +2 -1
- data/lib/rails/application/bootstrap.rb +2 -10
- data/lib/rails/application/configuration.rb +20 -3
- data/lib/rails/application/dummy_erb_compiler.rb +2 -3
- data/lib/rails/application/finisher.rb +9 -3
- data/lib/rails/engine.rb +8 -5
- data/lib/rails/gem_version.rb +1 -1
- data/lib/rails/generators/app_base.rb +2 -2
- data/lib/rails/generators/erb/scaffold/templates/show.html.erb.tt +1 -1
- data/lib/rails/generators/named_base.rb +0 -1
- data/lib/rails/generators/rails/app/templates/config/databases/jdbcsqlite3.yml.tt +1 -1
- data/lib/rails/generators/rails/app/templates/config/databases/sqlite3.yml.tt +1 -1
- data/lib/rails/generators/rails/app/templates/config/initializers/content_security_policy.rb.tt +3 -0
- data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_6_0.rb.tt +7 -0
- data/lib/rails/generators/rails/app/templates/public/robots.txt +1 -1
- data/lib/rails/generators/rails/scaffold_controller/scaffold_controller_generator.rb +9 -3
- data/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb +7 -2
- data/lib/rails/source_annotation_extractor.rb +5 -5
- data/lib/rails/tasks/zeitwerk.rake +42 -54
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 675e7410955b3db15a67651cf4e38f4d57855bd10bd08464a3d5948060c564c2
|
4
|
+
data.tar.gz: 595646ed9429a025598744f2dd9dabf7d273662e044e8de5aabe7529afc7a4ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a789a9816b7c53b1a5891b1bec4b23a009c66a0a1e11866e2b73afb5ad4e19d776654211bae88d1d495f793592d6bdf4c3f00a69767df874b71c4653719ca69
|
7
|
+
data.tar.gz: fdaf816aeba243f1e45c34db27ab3a0742636dc07ff4f21a4c8cf3ea414516f910854da9269c7e636195f56745c93b11dedbf5d117570eb85176d5c6e0a1d8d8
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,24 @@
|
|
1
|
+
## Rails 6.0.0.rc2 (July 22, 2019) ##
|
2
|
+
|
3
|
+
* No changes.
|
4
|
+
|
5
|
+
|
6
|
+
## (Unreleased)
|
7
|
+
|
8
|
+
* The new configuration point `config.add_autoload_paths_to_load_path` allows
|
9
|
+
users to opt-out from adding autoload paths to `$LOAD_PATH`. This flag is
|
10
|
+
`true` by default, but it is recommended to be set to `false` in `:zeitwerk`
|
11
|
+
mode early, in `config/application.rb`.
|
12
|
+
|
13
|
+
Zeitwerk uses only absolute paths internally, and applications running in
|
14
|
+
`:zeitwerk` mode do not need `require_dependency`, so models, controllers,
|
15
|
+
jobs, etc. do not need to be in `$LOAD_PATH`. Setting this to `false` saves
|
16
|
+
Ruby from checking these directories when resolving `require` calls with
|
17
|
+
relative paths, and saves Bootsnap work and RAM, since it does not need to
|
18
|
+
build an index for them.
|
19
|
+
|
20
|
+
*Xavier Noria*
|
21
|
+
|
1
22
|
## Rails 6.0.0.rc1 (April 24, 2019) ##
|
2
23
|
|
3
24
|
* Applications upgrading to Rails 6 can run the command
|
@@ -172,7 +193,7 @@
|
|
172
193
|
Rails.application.config.hosts << "product.com"
|
173
194
|
|
174
195
|
The host of a request is checked against the `hosts` entries with the case
|
175
|
-
operator (`#===`), which lets `hosts` support entries of type `
|
196
|
+
operator (`#===`), which lets `hosts` support entries of type `Regexp`,
|
176
197
|
`Proc` and `IPAddr` to name a few. Here is an example with a regexp.
|
177
198
|
|
178
199
|
# Allow requests from subdomains like `www.product.com` and
|
data/lib/rails/application.rb
CHANGED
@@ -270,7 +270,8 @@ module Rails
|
|
270
270
|
"action_dispatch.use_cookies_with_metadata" => config.action_dispatch.use_cookies_with_metadata,
|
271
271
|
"action_dispatch.content_security_policy" => config.content_security_policy,
|
272
272
|
"action_dispatch.content_security_policy_report_only" => config.content_security_policy_report_only,
|
273
|
-
"action_dispatch.content_security_policy_nonce_generator" => config.content_security_policy_nonce_generator
|
273
|
+
"action_dispatch.content_security_policy_nonce_generator" => config.content_security_policy_nonce_generator,
|
274
|
+
"action_dispatch.content_security_policy_nonce_directives" => config.content_security_policy_nonce_directives
|
274
275
|
)
|
275
276
|
end
|
276
277
|
end
|
@@ -34,20 +34,12 @@ INFO
|
|
34
34
|
# Initialize the logger early in the stack in case we need to log some deprecation.
|
35
35
|
initializer :initialize_logger, group: :all do
|
36
36
|
Rails.logger ||= config.logger || begin
|
37
|
-
|
38
|
-
unless File.exist? File.dirname path
|
39
|
-
FileUtils.mkdir_p File.dirname path
|
40
|
-
end
|
41
|
-
|
42
|
-
f = File.open path, "a"
|
43
|
-
f.binmode
|
44
|
-
f.sync = config.autoflush_log # if true make sure every write flushes
|
45
|
-
|
46
|
-
logger = ActiveSupport::Logger.new f
|
37
|
+
logger = ActiveSupport::Logger.new(config.default_log_file)
|
47
38
|
logger.formatter = config.log_formatter
|
48
39
|
logger = ActiveSupport::TaggedLogging.new(logger)
|
49
40
|
logger
|
50
41
|
rescue StandardError
|
42
|
+
path = config.paths["log"].first
|
51
43
|
logger = ActiveSupport::TaggedLogging.new(ActiveSupport::Logger.new(STDERR))
|
52
44
|
logger.level = ActiveSupport::Logger::WARN
|
53
45
|
logger.warn(
|
@@ -18,8 +18,8 @@ module Rails
|
|
18
18
|
:session_options, :time_zone, :reload_classes_only_on_change,
|
19
19
|
:beginning_of_week, :filter_redirect, :x, :enable_dependency_loading,
|
20
20
|
:read_encrypted_secrets, :log_level, :content_security_policy_report_only,
|
21
|
-
:content_security_policy_nonce_generator, :
|
22
|
-
:disable_sandbox
|
21
|
+
:content_security_policy_nonce_generator, :content_security_policy_nonce_directives,
|
22
|
+
:require_master_key, :credentials, :disable_sandbox, :add_autoload_paths_to_load_path
|
23
23
|
|
24
24
|
attr_reader :encoding, :api_only, :loaded_config_version, :autoloader
|
25
25
|
|
@@ -60,6 +60,7 @@ module Rails
|
|
60
60
|
@content_security_policy = nil
|
61
61
|
@content_security_policy_report_only = false
|
62
62
|
@content_security_policy_nonce_generator = nil
|
63
|
+
@content_security_policy_nonce_directives = nil
|
63
64
|
@require_master_key = false
|
64
65
|
@loaded_config_version = nil
|
65
66
|
@credentials = ActiveSupport::OrderedOptions.new
|
@@ -67,6 +68,7 @@ module Rails
|
|
67
68
|
@credentials.key_path = default_credentials_key_path
|
68
69
|
@autoloader = :classic
|
69
70
|
@disable_sandbox = false
|
71
|
+
@add_autoload_paths_to_load_path = true
|
70
72
|
end
|
71
73
|
|
72
74
|
def load_defaults(target_version)
|
@@ -128,6 +130,7 @@ module Rails
|
|
128
130
|
|
129
131
|
if respond_to?(:action_dispatch)
|
130
132
|
action_dispatch.use_cookies_with_metadata = true
|
133
|
+
action_dispatch.return_only_media_type_on_content_type = false
|
131
134
|
end
|
132
135
|
|
133
136
|
if respond_to?(:action_mailer)
|
@@ -141,6 +144,8 @@ module Rails
|
|
141
144
|
if respond_to?(:active_storage)
|
142
145
|
active_storage.queues.analysis = :active_storage_analysis
|
143
146
|
active_storage.queues.purge = :active_storage_purge
|
147
|
+
|
148
|
+
active_storage.replace_on_assign_to_many = true
|
144
149
|
end
|
145
150
|
|
146
151
|
if respond_to?(:active_record)
|
@@ -204,7 +209,7 @@ module Rails
|
|
204
209
|
yaml = Pathname.new(path)
|
205
210
|
erb = DummyERB.new(yaml.read)
|
206
211
|
|
207
|
-
YAML.load(erb.result)
|
212
|
+
YAML.load(erb.result) || {}
|
208
213
|
else
|
209
214
|
{}
|
210
215
|
end
|
@@ -308,6 +313,18 @@ module Rails
|
|
308
313
|
end
|
309
314
|
end
|
310
315
|
|
316
|
+
def default_log_file
|
317
|
+
path = paths["log"].first
|
318
|
+
unless File.exist? File.dirname path
|
319
|
+
FileUtils.mkdir_p File.dirname path
|
320
|
+
end
|
321
|
+
|
322
|
+
f = File.open path, "a"
|
323
|
+
f.binmode
|
324
|
+
f.sync = autoflush_log # if true make sure every write flushes
|
325
|
+
f
|
326
|
+
end
|
327
|
+
|
311
328
|
class Custom #:nodoc:
|
312
329
|
def initialize
|
313
330
|
@configurations = Hash.new
|
@@ -39,8 +39,14 @@ module Rails
|
|
39
39
|
example = autoloaded.first
|
40
40
|
example_klass = example.constantize.class
|
41
41
|
|
42
|
-
|
43
|
-
|
42
|
+
if config.autoloader == :zeitwerk
|
43
|
+
ActiveSupport::DescendantsTracker.clear
|
44
|
+
ActiveSupport::Dependencies.clear
|
45
|
+
|
46
|
+
unload_message = "#{these} autoloaded #{constants} #{have} been unloaded."
|
47
|
+
else
|
48
|
+
unload_message = "`config.autoloader` is set to `#{config.autoloader}`. #{these} autoloaded #{constants} would have been unloaded if `config.autoloader` had been set to `:zeitwerk`."
|
49
|
+
end
|
44
50
|
|
45
51
|
ActiveSupport::Deprecation.warn(<<~WARNING)
|
46
52
|
Initialization autoloaded the #{constants} #{enum}.
|
@@ -52,7 +58,7 @@ module Rails
|
|
52
58
|
initialization does not run again. So, if you reload #{example}, for example,
|
53
59
|
the expected changes won't be reflected in that stale #{example_klass} object.
|
54
60
|
|
55
|
-
#{
|
61
|
+
#{unload_message}
|
56
62
|
|
57
63
|
Please, check the "Autoloading and Reloading Constants" guide for solutions.
|
58
64
|
WARNING
|
data/lib/rails/engine.rb
CHANGED
@@ -559,9 +559,8 @@ module Rails
|
|
559
559
|
end
|
560
560
|
end
|
561
561
|
|
562
|
-
|
563
|
-
|
564
|
-
_all_load_paths.reverse_each do |path|
|
562
|
+
initializer :set_load_path, before: :bootstrap_hook do |app|
|
563
|
+
_all_load_paths(app.config.add_autoload_paths_to_load_path).reverse_each do |path|
|
565
564
|
$LOAD_PATH.unshift(path) if File.directory?(path)
|
566
565
|
end
|
567
566
|
$LOAD_PATH.uniq!
|
@@ -709,8 +708,12 @@ module Rails
|
|
709
708
|
@_all_autoload_paths ||= (config.autoload_paths + config.eager_load_paths + config.autoload_once_paths).uniq
|
710
709
|
end
|
711
710
|
|
712
|
-
def _all_load_paths
|
713
|
-
@_all_load_paths ||=
|
711
|
+
def _all_load_paths(add_autoload_paths_to_load_path)
|
712
|
+
@_all_load_paths ||= begin
|
713
|
+
load_paths = config.paths.load_paths
|
714
|
+
load_paths += _all_autoload_paths if add_autoload_paths_to_load_path
|
715
|
+
load_paths.uniq
|
716
|
+
end
|
714
717
|
end
|
715
718
|
|
716
719
|
def build_request(env)
|
data/lib/rails/gem_version.rb
CHANGED
@@ -282,7 +282,7 @@ module Rails
|
|
282
282
|
]
|
283
283
|
elsif options.edge?
|
284
284
|
[
|
285
|
-
GemfileEntry.github("rails", "rails/rails")
|
285
|
+
GemfileEntry.github("rails", "rails/rails", "6-0-stable")
|
286
286
|
]
|
287
287
|
else
|
288
288
|
[GemfileEntry.version("rails",
|
@@ -322,7 +322,7 @@ module Rails
|
|
322
322
|
|
323
323
|
def jbuilder_gemfile_entry
|
324
324
|
comment = "Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder"
|
325
|
-
GemfileEntry.new "jbuilder", "~> 2.
|
325
|
+
GemfileEntry.new "jbuilder", "~> 2.7", comment, {}, options[:api]
|
326
326
|
end
|
327
327
|
|
328
328
|
def javascript_gemfile_entry
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<p>
|
5
5
|
<strong><%= attribute.human_name %>:</strong>
|
6
6
|
<% if attribute.attachment? -%>
|
7
|
-
<%%= link_to @<%= singular_table_name %>.<%= attribute.column_name %>.filename, @<%= singular_table_name %>.<%= attribute.column_name %> %>
|
7
|
+
<%%= link_to @<%= singular_table_name %>.<%= attribute.column_name %>.filename, @<%= singular_table_name %>.<%= attribute.column_name %> if @<%= singular_table_name %>.<%= attribute.column_name %>.attached? %>
|
8
8
|
<% elsif attribute.attachments? -%>
|
9
9
|
<%% @<%= singular_table_name %>.<%= attribute.column_name %>.each do |<%= attribute.singular_name %>| %>
|
10
10
|
<div><%%= link_to <%= attribute.singular_name %>.filename, <%= attribute.singular_name %> %></div>
|
@@ -187,7 +187,6 @@ module Rails
|
|
187
187
|
|
188
188
|
def attributes_names # :doc:
|
189
189
|
@attributes_names ||= attributes.each_with_object([]) do |a, names|
|
190
|
-
next if a.attachments?
|
191
190
|
names << a.column_name
|
192
191
|
names << "password_confirmation" if a.password_digest?
|
193
192
|
names << "#{a.name}_type" if a.polymorphic?
|
data/lib/rails/generators/rails/app/templates/config/initializers/content_security_policy.rb.tt
CHANGED
@@ -23,6 +23,9 @@
|
|
23
23
|
# If you are using UJS then enable automatic nonce generation
|
24
24
|
# Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) }
|
25
25
|
|
26
|
+
# Set the nonce only to specific directives
|
27
|
+
# Rails.application.config.content_security_policy_nonce_directives = %w(script-src)
|
28
|
+
|
26
29
|
# Report CSP violations to a specified URI
|
27
30
|
# For further information see the following documentation:
|
28
31
|
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
|
data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_6_0.rb.tt
CHANGED
@@ -16,6 +16,9 @@
|
|
16
16
|
# It's best enabled when your entire app is migrated and stable on 6.0.
|
17
17
|
# Rails.application.config.action_dispatch.use_cookies_with_metadata = true
|
18
18
|
|
19
|
+
# Change the return value of `ActionDispatch::Response#content_type` to Content-Type header without modification.
|
20
|
+
# Rails.application.config.action_dispatch.return_only_media_type_on_content_type = true
|
21
|
+
|
19
22
|
# Return false instead of self when enqueuing is aborted from a callback.
|
20
23
|
# Rails.application.config.active_job.return_false_on_aborted_enqueue = true
|
21
24
|
|
@@ -23,6 +26,10 @@
|
|
23
26
|
# Rails.application.config.active_storage.queues.analysis = :active_storage_analysis
|
24
27
|
# Rails.application.config.active_storage.queues.purge = :active_storage_purge
|
25
28
|
|
29
|
+
# When assigning to a collection of attachments declared via `has_many_attached`, replace existing
|
30
|
+
# attachments instead of appending. Use #attach to add new attachments without replacing existing ones.
|
31
|
+
# Rails.application.config.active_storage.replace_on_assign_to_many = true
|
32
|
+
|
26
33
|
# Use ActionMailer::MailDeliveryJob for sending parameterized and normal mail.
|
27
34
|
#
|
28
35
|
# The default delivery jobs (ActionMailer::Parameterized::DeliveryJob, ActionMailer::DeliveryJob),
|
@@ -1 +1 @@
|
|
1
|
-
# See
|
1
|
+
# See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
|
@@ -36,9 +36,15 @@ module Rails
|
|
36
36
|
private
|
37
37
|
|
38
38
|
def permitted_params
|
39
|
-
|
40
|
-
params
|
41
|
-
params
|
39
|
+
attachments, others = attributes_names.partition { |name| attachments?(name) }
|
40
|
+
params = others.map { |name| ":#{name}" }
|
41
|
+
params += attachments.map { |name| "#{name}: []" }
|
42
|
+
params.join(", ")
|
43
|
+
end
|
44
|
+
|
45
|
+
def attachments?(name)
|
46
|
+
attribute = attributes.find { |attr| attr.name == name }
|
47
|
+
attribute&.attachments?
|
42
48
|
end
|
43
49
|
end
|
44
50
|
end
|
@@ -49,16 +49,21 @@ module TestUnit # :nodoc:
|
|
49
49
|
attributes_names.map do |name|
|
50
50
|
if %w(password password_confirmation).include?(name) && attributes.any?(&:password_digest?)
|
51
51
|
["#{name}", "'secret'"]
|
52
|
-
|
52
|
+
elsif !virtual?(name)
|
53
53
|
["#{name}", "@#{singular_table_name}.#{name}"]
|
54
54
|
end
|
55
|
-
end.sort.to_h
|
55
|
+
end.compact.sort.to_h
|
56
56
|
end
|
57
57
|
|
58
58
|
def boolean?(name)
|
59
59
|
attribute = attributes.find { |attr| attr.name == name }
|
60
60
|
attribute&.type == :boolean
|
61
61
|
end
|
62
|
+
|
63
|
+
def virtual?(name)
|
64
|
+
attribute = attributes.find { |attr| attr.name == name }
|
65
|
+
attribute&.virtual?
|
66
|
+
end
|
62
67
|
end
|
63
68
|
end
|
64
69
|
end
|
@@ -2,11 +2,6 @@
|
|
2
2
|
|
3
3
|
require "active_support/deprecation"
|
4
4
|
|
5
|
-
# Remove this deprecated class in the next minor version
|
6
|
-
#:nodoc:
|
7
|
-
SourceAnnotationExtractor = ActiveSupport::Deprecation::DeprecatedConstantProxy.
|
8
|
-
new("SourceAnnotationExtractor", "Rails::SourceAnnotationExtractor")
|
9
|
-
|
10
5
|
module Rails
|
11
6
|
# Implements the logic behind <tt>Rails::Command::NotesCommand</tt>. See <tt>rails notes --help</tt> for usage information.
|
12
7
|
#
|
@@ -160,3 +155,8 @@ module Rails
|
|
160
155
|
end
|
161
156
|
end
|
162
157
|
end
|
158
|
+
|
159
|
+
# Remove this deprecated class in the next minor version
|
160
|
+
#:nodoc:
|
161
|
+
SourceAnnotationExtractor = ActiveSupport::Deprecation::DeprecatedConstantProxy.
|
162
|
+
new("SourceAnnotationExtractor", "Rails::SourceAnnotationExtractor")
|
@@ -1,78 +1,66 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
abort
|
6
|
-
Please, enable temporarily :classic mode:
|
7
|
-
|
8
|
-
# config/application.rb
|
9
|
-
config.autoloader = :classic
|
10
|
-
|
11
|
-
and try again. When all is good, you can delete that line.
|
12
|
-
EOS
|
3
|
+
ensure_zeitwerk_mode = ->() do
|
4
|
+
unless Rails.autoloaders.zeitwerk_enabled?
|
5
|
+
abort "Please, enable :zeitwerk mode in config/application.rb and try again."
|
13
6
|
end
|
14
7
|
end
|
15
8
|
|
16
9
|
eager_load = ->() do
|
17
|
-
|
10
|
+
puts "Hold on, I am eager loading the application."
|
11
|
+
Zeitwerk::Loader.eager_load_all
|
18
12
|
end
|
19
13
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
next if parent == Object && entry == "concerns"
|
14
|
+
report_not_checked = ->(not_checked) do
|
15
|
+
puts
|
16
|
+
puts <<~EOS
|
17
|
+
WARNING: The files in these directories cannot be checked because they
|
18
|
+
are not eager loaded:
|
19
|
+
EOS
|
20
|
+
puts
|
28
21
|
|
29
|
-
|
22
|
+
not_checked.each { |dir| puts " #{dir}" }
|
23
|
+
puts
|
30
24
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
check_directory[abspath, parent.const_get(cname)]
|
37
|
-
end
|
38
|
-
else
|
39
|
-
mismatches << [abspath, parent, cname]
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
25
|
+
puts <<~EOS
|
26
|
+
You may verify them manually, or add them to config.eager_load_paths
|
27
|
+
in config/application.rb and run zeitwerk:check again.
|
28
|
+
EOS
|
29
|
+
puts
|
43
30
|
end
|
44
31
|
|
45
|
-
report = ->() do
|
46
|
-
|
47
|
-
|
48
|
-
puts "
|
49
|
-
puts "Please, remember to delete `config.autoloader = :classic` from config/application.rb."
|
32
|
+
report = ->(not_checked) do
|
33
|
+
if not_checked.any?
|
34
|
+
report_not_checked[not_checked]
|
35
|
+
puts "Otherwise, all is good!"
|
50
36
|
else
|
51
|
-
|
52
|
-
relpath = abspath.sub(%r{\A#{Regexp.escape(Rails.root.to_path)}/}, "")
|
53
|
-
cpath = parent == Object ? cname : "#{parent.name}::#{cname}"
|
54
|
-
puts "expected #{relpath} to define #{cpath}"
|
55
|
-
end
|
56
|
-
puts
|
57
|
-
puts <<~EOS
|
58
|
-
Please revise the reported mismatches. You can normally fix them by adding
|
59
|
-
acronyms to config/initializers/inflections.rb or renaming the constants.
|
60
|
-
EOS
|
37
|
+
puts "All is good!"
|
61
38
|
end
|
62
39
|
end
|
63
40
|
|
64
41
|
namespace :zeitwerk do
|
65
42
|
desc "Checks project structure for Zeitwerk compatibility"
|
66
43
|
task check: :environment do
|
67
|
-
|
68
|
-
eager_load[]
|
44
|
+
ensure_zeitwerk_mode[]
|
69
45
|
|
70
|
-
|
71
|
-
|
72
|
-
|
46
|
+
begin
|
47
|
+
eager_load[]
|
48
|
+
rescue NameError => e
|
49
|
+
if e.message =~ /expected file .*? to define constant \S+/
|
50
|
+
abort $&.sub(/#{Regexp.escape(Rails.root.to_s)}./, "")
|
51
|
+
else
|
52
|
+
raise
|
53
|
+
end
|
73
54
|
end
|
74
|
-
puts
|
75
55
|
|
76
|
-
|
56
|
+
eager_load_paths = Rails.configuration.eager_load_namespaces.map do |eln|
|
57
|
+
eln.config.eager_load_paths if eln.respond_to?(:config)
|
58
|
+
end.compact.flatten
|
59
|
+
|
60
|
+
not_checked = ActiveSupport::Dependencies.autoload_paths - eager_load_paths
|
61
|
+
not_checked.select! { |dir| Dir.exist?(dir) }
|
62
|
+
not_checked.reject! { |dir| Dir.empty?(dir) }
|
63
|
+
|
64
|
+
report[not_checked]
|
77
65
|
end
|
78
66
|
end
|
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.0.
|
4
|
+
version: 6.0.0.rc2
|
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: 2019-
|
11
|
+
date: 2019-07-22 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.0.
|
19
|
+
version: 6.0.0.rc2
|
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.0.
|
26
|
+
version: 6.0.0.rc2
|
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.0.
|
33
|
+
version: 6.0.0.rc2
|
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.0.
|
40
|
+
version: 6.0.0.rc2
|
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.0.
|
95
|
+
version: 6.0.0.rc2
|
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.0.
|
102
|
+
version: 6.0.0.rc2
|
103
103
|
description: 'Rails internals: application bootup, plugins, generators, and rake tasks.'
|
104
104
|
email: david@loudthinking.com
|
105
105
|
executables:
|
@@ -431,8 +431,8 @@ homepage: https://rubyonrails.org
|
|
431
431
|
licenses:
|
432
432
|
- MIT
|
433
433
|
metadata:
|
434
|
-
source_code_uri: https://github.com/rails/rails/tree/v6.0.0.
|
435
|
-
changelog_uri: https://github.com/rails/rails/blob/v6.0.0.
|
434
|
+
source_code_uri: https://github.com/rails/rails/tree/v6.0.0.rc2/railties
|
435
|
+
changelog_uri: https://github.com/rails/rails/blob/v6.0.0.rc2/railties/CHANGELOG.md
|
436
436
|
post_install_message:
|
437
437
|
rdoc_options:
|
438
438
|
- "--exclude"
|