railties 6.1.0.rc2 → 6.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1 -6
- data/lib/rails/application/configuration.rb +14 -0
- data/lib/rails/engine.rb +11 -19
- data/lib/rails/gem_version.rb +1 -1
- data/lib/rails/generators/rails/app/templates/bin/rails.tt +3 -0
- data/lib/rails/generators/rails/app/templates/bin/rake.tt +3 -0
- data/lib/rails/generators/rails/app/templates/bin/spring.tt +8 -6
- data/lib/rails/generators/rails/app/templates/bin/yarn.tt +7 -5
- data/lib/rails/generators/rails/app/templates/config/boot.rb.tt +0 -6
- data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_6_1.rb.tt +15 -0
- data/lib/rails/railtie.rb +3 -7
- data/lib/rails/tasks/yarn.rake +9 -1
- metadata +13 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1adfe379d94049a35a1306f22a5d1368e3b88455d57bb1e4764b845f7ec7e0c5
|
4
|
+
data.tar.gz: 1ff026a5d1cc46e2cb543b15568fb2f12915d468a3c3723efd2daa18d70fc04a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b297610d901f515027eb7bb31b3bf912437ccc0643276ba5b166216fe41f8f6e74b42783002d8bd1a904fa512b18ffbcb258375d019299918a21c5b6c220cf6
|
7
|
+
data.tar.gz: 9b1c0e55db347c811b93edb2e68dee00b99cd476e917de5e138c09faa4eaaaa1df3a374bc54b09934895c22993080e327d530129ba4163f209cd42d438deaabe
|
data/CHANGELOG.md
CHANGED
@@ -1,9 +1,4 @@
|
|
1
|
-
## Rails 6.1.0
|
2
|
-
|
3
|
-
* No changes.
|
4
|
-
|
5
|
-
|
6
|
-
## Rails 6.1.0.rc1 (November 02, 2020) ##
|
1
|
+
## Rails 6.1.0 (December 09, 2020) ##
|
7
2
|
|
8
3
|
* Added `Railtie#server` hook called when Rails starts a server.
|
9
4
|
This is useful in case your application or a library needs to run
|
@@ -185,6 +185,20 @@ module Rails
|
|
185
185
|
action_view.form_with_generates_remote_forms = false
|
186
186
|
end
|
187
187
|
|
188
|
+
if respond_to?(:active_storage)
|
189
|
+
active_storage.queues.analysis = nil
|
190
|
+
active_storage.queues.purge = nil
|
191
|
+
end
|
192
|
+
|
193
|
+
if respond_to?(:action_mailbox)
|
194
|
+
action_mailbox.queues.incineration = nil
|
195
|
+
action_mailbox.queues.routing = nil
|
196
|
+
end
|
197
|
+
|
198
|
+
if respond_to?(:action_mailer)
|
199
|
+
action_mailer.deliver_later_queue_name = nil
|
200
|
+
end
|
201
|
+
|
188
202
|
ActiveSupport.utc_to_local_returns_utc_offset_times = true
|
189
203
|
else
|
190
204
|
raise "Unknown version #{target_version.to_s.inspect}"
|
data/lib/rails/engine.rb
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require "rails/railtie"
|
4
4
|
require "rails/engine/railties"
|
5
|
+
require "active_support/callbacks"
|
5
6
|
require "active_support/core_ext/module/delegation"
|
6
7
|
require "active_support/core_ext/object/try"
|
7
8
|
require "pathname"
|
@@ -422,6 +423,9 @@ module Rails
|
|
422
423
|
end
|
423
424
|
end
|
424
425
|
|
426
|
+
include ActiveSupport::Callbacks
|
427
|
+
define_callbacks :load_seed
|
428
|
+
|
425
429
|
delegate :middleware, :root, :paths, to: :config
|
426
430
|
delegate :engine_name, :isolated?, to: :class
|
427
431
|
|
@@ -559,13 +563,7 @@ module Rails
|
|
559
563
|
# Blog::Engine.load_seed
|
560
564
|
def load_seed
|
561
565
|
seed_file = paths["db/seeds.rb"].existent.first
|
562
|
-
|
563
|
-
|
564
|
-
if config.try(:active_job)&.queue_adapter == :async
|
565
|
-
with_inline_jobs { load(seed_file) }
|
566
|
-
else
|
567
|
-
load(seed_file)
|
568
|
-
end
|
566
|
+
run_callbacks(:load_seed) { load(seed_file) } if seed_file
|
569
567
|
end
|
570
568
|
|
571
569
|
initializer :load_environment_config, before: :load_environment_hook, group: :all do
|
@@ -637,6 +635,12 @@ module Rails
|
|
637
635
|
end
|
638
636
|
end
|
639
637
|
|
638
|
+
initializer :wrap_executor_around_load_seed do |app|
|
639
|
+
self.class.set_callback(:load_seed, :around) do |engine, seeds_block|
|
640
|
+
app.executor.wrap(&seeds_block)
|
641
|
+
end
|
642
|
+
end
|
643
|
+
|
640
644
|
initializer :engines_blank_point do
|
641
645
|
# We need this initializer so all extra initializers added in engines are
|
642
646
|
# consistently executed after all the initializers above across all engines.
|
@@ -678,18 +682,6 @@ module Rails
|
|
678
682
|
end
|
679
683
|
end
|
680
684
|
|
681
|
-
def with_inline_jobs
|
682
|
-
queue_adapter = config.active_job.queue_adapter
|
683
|
-
ActiveSupport.on_load(:active_job) do
|
684
|
-
self.queue_adapter = :inline
|
685
|
-
end
|
686
|
-
yield
|
687
|
-
ensure
|
688
|
-
ActiveSupport.on_load(:active_job) do
|
689
|
-
self.queue_adapter = queue_adapter
|
690
|
-
end
|
691
|
-
end
|
692
|
-
|
693
685
|
def has_migrations?
|
694
686
|
paths["db/migrate"].existent.any?
|
695
687
|
end
|
data/lib/rails/gem_version.rb
CHANGED
@@ -1,7 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
if !defined?(Spring) && [nil, "development", "test"].include?(ENV["RAILS_ENV"])
|
2
|
+
# Load Spring without loading other gems in the Gemfile, for speed.
|
3
|
+
require "bundler"
|
4
|
+
Bundler.locked_gems.specs.find { |spec| spec.name == "spring" }&.tap do |spring|
|
5
|
+
Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
|
6
|
+
gem "spring", spring.version
|
7
|
+
require "spring/binstub"
|
8
|
+
end
|
7
9
|
end
|
@@ -8,9 +8,11 @@ Dir.chdir(APP_ROOT) do
|
|
8
8
|
normalized_path != __dir__ && File.executable?(Pathname.new(normalized_path).join('yarn'))
|
9
9
|
end
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
11
|
+
if executable_path
|
12
|
+
exec File.expand_path(Pathname.new(executable_path).join('yarn')), *ARGV
|
13
|
+
else
|
14
|
+
$stderr.puts "Yarn executable was not detected in the system."
|
15
|
+
$stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
|
16
|
+
exit 1
|
17
|
+
end
|
16
18
|
end
|
@@ -1,10 +1,4 @@
|
|
1
1
|
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
|
2
|
-
<% if spring_install? -%>
|
3
|
-
|
4
|
-
if !defined?(Spring) && [nil, "development", "test"].include?(ENV["RAILS_ENV"])
|
5
|
-
load File.expand_path("../bin/spring", __dir__)
|
6
|
-
end
|
7
|
-
<% end -%>
|
8
2
|
|
9
3
|
require "bundler/setup" # Set up gems listed in the Gemfile.
|
10
4
|
<% if depend_on_bootsnap? -%>
|
data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_6_1.rb.tt
CHANGED
@@ -46,3 +46,18 @@
|
|
46
46
|
|
47
47
|
# Make `form_with` generate non-remote forms by default.
|
48
48
|
# Rails.application.config.action_view.form_with_generates_remote_forms = false
|
49
|
+
|
50
|
+
# Set the default queue name for the analysis job to the queue adapter default.
|
51
|
+
# Rails.application.config.active_storage.queues.analysis = nil
|
52
|
+
|
53
|
+
# Set the default queue name for the purge job to the queue adapter default.
|
54
|
+
# Rails.application.config.active_storage.queues.purge = nil
|
55
|
+
|
56
|
+
# Set the default queue name for the incineration job to the queue adapter default.
|
57
|
+
# Rails.application.config.action_mailbox.queues.incineration = nil
|
58
|
+
|
59
|
+
# Set the default queue name for the routing job to the queue adapter default.
|
60
|
+
# Rails.application.config.action_mailbox.queues.routing = nil
|
61
|
+
|
62
|
+
# Set the default queue name for the mail deliver job to the queue adapter default.
|
63
|
+
# Rails.application.config.action_mailer.deliver_later_queue_name = nil
|
data/lib/rails/railtie.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "rails/initializable"
|
4
|
+
require "active_support/descendants_tracker"
|
4
5
|
require "active_support/inflector"
|
5
6
|
require "active_support/core_ext/module/introspection"
|
6
7
|
require "active_support/core_ext/module/delegation"
|
@@ -135,6 +136,7 @@ module Rails
|
|
135
136
|
class Railtie
|
136
137
|
autoload :Configuration, "rails/railtie/configuration"
|
137
138
|
|
139
|
+
extend ActiveSupport::DescendantsTracker
|
138
140
|
include Initializable
|
139
141
|
|
140
142
|
ABSTRACT_RAILTIES = %w(Rails::Railtie Rails::Engine Rails::Application)
|
@@ -144,13 +146,7 @@ module Rails
|
|
144
146
|
delegate :config, to: :instance
|
145
147
|
|
146
148
|
def subclasses
|
147
|
-
|
148
|
-
end
|
149
|
-
|
150
|
-
def inherited(base)
|
151
|
-
unless base.abstract_railtie?
|
152
|
-
subclasses << base
|
153
|
-
end
|
149
|
+
super.reject(&:abstract_railtie?)
|
154
150
|
end
|
155
151
|
|
156
152
|
def rake_tasks(&blk)
|
data/lib/rails/tasks/yarn.rake
CHANGED
@@ -8,7 +8,15 @@ namespace :yarn do
|
|
8
8
|
node_env = ENV.fetch("NODE_ENV") do
|
9
9
|
valid_node_envs.include?(Rails.env) ? Rails.env : "production"
|
10
10
|
end
|
11
|
-
|
11
|
+
|
12
|
+
yarn_flags =
|
13
|
+
if `#{Rails.root}/bin/yarn --version`.start_with?("1")
|
14
|
+
"--no-progress --frozen-lockfile"
|
15
|
+
else
|
16
|
+
"--immutable"
|
17
|
+
end
|
18
|
+
|
19
|
+
system({ "NODE_ENV" => node_env }, "#{Rails.root}/bin/yarn install #{yarn_flags}")
|
12
20
|
end
|
13
21
|
end
|
14
22
|
|
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.1.0
|
4
|
+
version: 6.1.0
|
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-12-
|
11
|
+
date: 2020-12-09 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.1.0
|
19
|
+
version: 6.1.0
|
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.1.0
|
26
|
+
version: 6.1.0
|
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.1.0
|
33
|
+
version: 6.1.0
|
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.1.0
|
40
|
+
version: 6.1.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - '='
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 6.1.0
|
89
|
+
version: 6.1.0
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - '='
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 6.1.0
|
96
|
+
version: 6.1.0
|
97
97
|
description: 'Rails internals: application bootup, plugins, generators, and rake tasks.'
|
98
98
|
email: david@loudthinking.com
|
99
99
|
executables:
|
@@ -426,10 +426,10 @@ licenses:
|
|
426
426
|
- MIT
|
427
427
|
metadata:
|
428
428
|
bug_tracker_uri: https://github.com/rails/rails/issues
|
429
|
-
changelog_uri: https://github.com/rails/rails/blob/v6.1.0
|
430
|
-
documentation_uri: https://api.rubyonrails.org/v6.1.0
|
429
|
+
changelog_uri: https://github.com/rails/rails/blob/v6.1.0/railties/CHANGELOG.md
|
430
|
+
documentation_uri: https://api.rubyonrails.org/v6.1.0/
|
431
431
|
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
432
|
-
source_code_uri: https://github.com/rails/rails/tree/v6.1.0
|
432
|
+
source_code_uri: https://github.com/rails/rails/tree/v6.1.0/railties
|
433
433
|
post_install_message:
|
434
434
|
rdoc_options:
|
435
435
|
- "--exclude"
|
@@ -443,9 +443,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
443
443
|
version: 2.5.0
|
444
444
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
445
445
|
requirements:
|
446
|
-
- - "
|
446
|
+
- - ">="
|
447
447
|
- !ruby/object:Gem::Version
|
448
|
-
version:
|
448
|
+
version: '0'
|
449
449
|
requirements: []
|
450
450
|
rubygems_version: 3.1.4
|
451
451
|
signing_key:
|