railties 6.1.2 → 6.1.4
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +38 -0
- data/lib/rails/application.rb +10 -3
- data/lib/rails/application/configuration.rb +6 -3
- data/lib/rails/command.rb +3 -5
- data/lib/rails/commands/dbconsole/dbconsole_command.rb +1 -1
- data/lib/rails/gem_version.rb +1 -1
- data/lib/rails/generators/actions/create_migration.rb +2 -0
- data/lib/rails/generators/app_base.rb +14 -6
- data/lib/rails/generators/rails/app/app_generator.rb +1 -3
- data/lib/rails/generators/rails/app/templates/bin/spring.tt +1 -1
- data/lib/rails/source_annotation_extractor.rb +1 -1
- data/lib/rails/tasks/yarn.rake +2 -2
- metadata +17 -17
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 579db8705bfddfb4ad877091124e238f804e03aa5eefb29913e63492622a2c2a
|
|
4
|
+
data.tar.gz: ceaf3ccf971e958b82dbd2c3ab83248d742cf6ba8bd60fb5777a32a9187cefb8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5f572d8ce2287fdaa832767e191c7b88e8703103b453c62494fb7d9e710b5d73859455ff2a6b060c70ea6e61bc8736de6a7580c54353c6a7e96d7dfb60994475
|
|
7
|
+
data.tar.gz: 63dedca83d5fe4b3df7bf94480b5612938272577c5685d89a8472449ffddcd674fbfe694d07b344f40a4211470cfd6979a42d6719d070a92e987d44ccd346111
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,41 @@
|
|
|
1
|
+
## Rails 6.1.4 (June 24, 2021) ##
|
|
2
|
+
|
|
3
|
+
* Fix compatibility with `psych >= 4`.
|
|
4
|
+
|
|
5
|
+
Starting in Psych 4.0.0 `YAML.load` behaves like `YAML.safe_load`. To preserve compatibility
|
|
6
|
+
`Rails.application.config_for` now uses `YAML.unsafe_load` if available.
|
|
7
|
+
|
|
8
|
+
*Jean Boussier*
|
|
9
|
+
|
|
10
|
+
* Ensure `Rails.application.config_for` always cast hashes to `ActiveSupport::OrderedOptions`.
|
|
11
|
+
|
|
12
|
+
*Jean Boussier*
|
|
13
|
+
|
|
14
|
+
* Fix create migration generator with `--pretend` option.
|
|
15
|
+
|
|
16
|
+
*euxx*
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
## Rails 6.1.3.2 (May 05, 2021) ##
|
|
20
|
+
|
|
21
|
+
* No changes.
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
## Rails 6.1.3.1 (March 26, 2021) ##
|
|
25
|
+
|
|
26
|
+
* No changes.
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
## Rails 6.1.3 (February 17, 2021) ##
|
|
30
|
+
|
|
31
|
+
* No changes.
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## Rails 6.1.2.1 (February 10, 2021) ##
|
|
35
|
+
|
|
36
|
+
* No changes.
|
|
37
|
+
|
|
38
|
+
|
|
1
39
|
## Rails 6.1.2 (February 09, 2021) ##
|
|
2
40
|
|
|
3
41
|
* No changes.
|
data/lib/rails/application.rb
CHANGED
|
@@ -246,11 +246,18 @@ module Rails
|
|
|
246
246
|
all_configs = ActiveSupport::ConfigurationFile.parse(yaml).deep_symbolize_keys
|
|
247
247
|
config, shared = all_configs[env.to_sym], all_configs[:shared]
|
|
248
248
|
|
|
249
|
+
if shared
|
|
250
|
+
config = {} if config.nil?
|
|
251
|
+
if config.is_a?(Hash)
|
|
252
|
+
config = shared.deep_merge(config)
|
|
253
|
+
end
|
|
254
|
+
end
|
|
255
|
+
|
|
249
256
|
if config.is_a?(Hash)
|
|
250
|
-
ActiveSupport::OrderedOptions.new.update(
|
|
251
|
-
else
|
|
252
|
-
config || shared
|
|
257
|
+
config = ActiveSupport::OrderedOptions.new.update(config)
|
|
253
258
|
end
|
|
259
|
+
|
|
260
|
+
config
|
|
254
261
|
else
|
|
255
262
|
raise "Could not load configuration. No such file - #{yaml}"
|
|
256
263
|
end
|
|
@@ -256,10 +256,13 @@ module Rails
|
|
|
256
256
|
if path = paths["config/database"].existent.first
|
|
257
257
|
require "rails/application/dummy_erb_compiler"
|
|
258
258
|
|
|
259
|
-
yaml = Pathname.new(path)
|
|
260
|
-
erb = DummyERB.new(yaml.read)
|
|
259
|
+
yaml = DummyERB.new(Pathname.new(path).read).result
|
|
261
260
|
|
|
262
|
-
YAML.
|
|
261
|
+
if YAML.respond_to?(:unsafe_load)
|
|
262
|
+
YAML.unsafe_load(yaml) || {}
|
|
263
|
+
else
|
|
264
|
+
YAML.load(yaml) || {}
|
|
265
|
+
end
|
|
263
266
|
else
|
|
264
267
|
{}
|
|
265
268
|
end
|
data/lib/rails/command.rb
CHANGED
|
@@ -40,10 +40,8 @@ module Rails
|
|
|
40
40
|
command_name, namespace = "help", "help" if command_name.blank? || HELP_MAPPINGS.include?(command_name)
|
|
41
41
|
command_name, namespace = "version", "version" if %w( -v --version ).include?(command_name)
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
old_argv = ARGV.dup
|
|
46
|
-
ARGV.clear
|
|
43
|
+
original_argv = ARGV.dup
|
|
44
|
+
ARGV.replace(args)
|
|
47
45
|
|
|
48
46
|
command = find_by_namespace(namespace, command_name)
|
|
49
47
|
if command && command.all_commands[command_name]
|
|
@@ -52,7 +50,7 @@ module Rails
|
|
|
52
50
|
find_by_namespace("rake").perform(full_namespace, args, config)
|
|
53
51
|
end
|
|
54
52
|
ensure
|
|
55
|
-
ARGV.replace(
|
|
53
|
+
ARGV.replace(original_argv)
|
|
56
54
|
end
|
|
57
55
|
|
|
58
56
|
# Rails finds namespaces similar to Thor, it only adds one rule:
|
|
@@ -102,7 +102,7 @@ module Rails
|
|
|
102
102
|
# first time around to show a consistent error message to people
|
|
103
103
|
# relying on 2-level database configuration.
|
|
104
104
|
|
|
105
|
-
@db_config = configurations.configs_for(env_name: environment, name: database)
|
|
105
|
+
@db_config = configurations.configs_for(env_name: environment, name: database, include_replicas: true)
|
|
106
106
|
|
|
107
107
|
unless @db_config
|
|
108
108
|
raise ActiveRecord::AdapterNotSpecified,
|
data/lib/rails/gem_version.rb
CHANGED
|
@@ -301,7 +301,7 @@ module Rails
|
|
|
301
301
|
]
|
|
302
302
|
elsif options.edge?
|
|
303
303
|
[
|
|
304
|
-
GemfileEntry.github("rails", "rails/rails", "
|
|
304
|
+
GemfileEntry.github("rails", "rails/rails", "6-1-stable")
|
|
305
305
|
]
|
|
306
306
|
elsif options.master?
|
|
307
307
|
[
|
|
@@ -429,11 +429,19 @@ module Rails
|
|
|
429
429
|
end
|
|
430
430
|
|
|
431
431
|
def run_webpack
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
432
|
+
return unless webpack_install?
|
|
433
|
+
|
|
434
|
+
unless bundle_install?
|
|
435
|
+
say <<~EXPLAIN
|
|
436
|
+
Skipping `rails webpacker:install` because `bundle install` was skipped.
|
|
437
|
+
To complete setup, you must run `bundle install` followed by `rails webpacker:install`.
|
|
438
|
+
EXPLAIN
|
|
439
|
+
return
|
|
440
|
+
end
|
|
441
|
+
|
|
442
|
+
rails_command "webpacker:install"
|
|
443
|
+
if options[:webpack] && options[:webpack] != "webpack"
|
|
444
|
+
rails_command "webpacker:install:#{options[:webpack]}"
|
|
437
445
|
end
|
|
438
446
|
end
|
|
439
447
|
|
|
@@ -3,7 +3,7 @@ if !defined?(Spring) && [nil, "development", "test"].include?(ENV["RAILS_ENV"])
|
|
|
3
3
|
require "bundler"
|
|
4
4
|
|
|
5
5
|
# Load Spring without loading other gems in the Gemfile, for speed.
|
|
6
|
-
Bundler.locked_gems
|
|
6
|
+
Bundler.locked_gems&.specs&.find { |spec| spec.name == "spring" }&.tap do |spring|
|
|
7
7
|
Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
|
|
8
8
|
gem "spring", spring.version
|
|
9
9
|
require "spring/binstub"
|
|
@@ -72,7 +72,7 @@ module Rails
|
|
|
72
72
|
#
|
|
73
73
|
# See <tt>#find_in</tt> for a list of file extensions that will be taken into account.
|
|
74
74
|
#
|
|
75
|
-
# This class method is the single entry point for the
|
|
75
|
+
# This class method is the single entry point for the <tt>rails notes</tt> command.
|
|
76
76
|
def self.enumerate(tag = nil, options = {})
|
|
77
77
|
tag ||= Annotation.tags.join("|")
|
|
78
78
|
extractor = new(tag)
|
data/lib/rails/tasks/yarn.rake
CHANGED
|
@@ -10,13 +10,13 @@ namespace :yarn do
|
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
yarn_flags =
|
|
13
|
-
if
|
|
13
|
+
if `#{RbConfig.ruby} "#{Rails.root}/bin/yarn" --version`.start_with?("1")
|
|
14
14
|
"--no-progress --frozen-lockfile"
|
|
15
15
|
else
|
|
16
16
|
"--immutable"
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
-
system({ "NODE_ENV" => node_env }, "\"#{Rails.root}/bin/yarn\" install #{yarn_flags}")
|
|
19
|
+
system({ "NODE_ENV" => node_env }, "#{RbConfig.ruby} \"#{Rails.root}/bin/yarn\" install #{yarn_flags}")
|
|
20
20
|
rescue Errno::ENOENT
|
|
21
21
|
$stderr.puts "bin/yarn was not found."
|
|
22
22
|
$stderr.puts "Please run `bundle exec rails app:update:bin` to create it."
|
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.
|
|
4
|
+
version: 6.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Heinemeier Hansson
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-
|
|
11
|
+
date: 2021-06-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -16,42 +16,42 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - '='
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 6.1.
|
|
19
|
+
version: 6.1.4
|
|
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.
|
|
26
|
+
version: 6.1.4
|
|
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.
|
|
33
|
+
version: 6.1.4
|
|
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.
|
|
40
|
+
version: 6.1.4
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: rake
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
45
|
- - ">="
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: 0.
|
|
47
|
+
version: '0.13'
|
|
48
48
|
type: :runtime
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
52
|
- - ">="
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: 0.
|
|
54
|
+
version: '0.13'
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
56
|
name: thor
|
|
57
57
|
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.
|
|
89
|
+
version: 6.1.4
|
|
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.
|
|
96
|
+
version: 6.1.4
|
|
97
97
|
description: 'Rails internals: application bootup, plugins, generators, and rake tasks.'
|
|
98
98
|
email: david@loudthinking.com
|
|
99
99
|
executables:
|
|
@@ -426,11 +426,11 @@ 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.
|
|
430
|
-
documentation_uri: https://api.rubyonrails.org/v6.1.
|
|
429
|
+
changelog_uri: https://github.com/rails/rails/blob/v6.1.4/railties/CHANGELOG.md
|
|
430
|
+
documentation_uri: https://api.rubyonrails.org/v6.1.4/
|
|
431
431
|
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
|
432
|
-
source_code_uri: https://github.com/rails/rails/tree/v6.1.
|
|
433
|
-
post_install_message:
|
|
432
|
+
source_code_uri: https://github.com/rails/rails/tree/v6.1.4/railties
|
|
433
|
+
post_install_message:
|
|
434
434
|
rdoc_options:
|
|
435
435
|
- "--exclude"
|
|
436
436
|
- "."
|
|
@@ -447,8 +447,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
447
447
|
- !ruby/object:Gem::Version
|
|
448
448
|
version: '0'
|
|
449
449
|
requirements: []
|
|
450
|
-
rubygems_version: 3.2
|
|
451
|
-
signing_key:
|
|
450
|
+
rubygems_version: 3.1.2
|
|
451
|
+
signing_key:
|
|
452
452
|
specification_version: 4
|
|
453
453
|
summary: Tools for creating, working with, and running Rails applications.
|
|
454
454
|
test_files: []
|