railties 6.1.3.2 → 6.1.4.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 61739e28458d5f2b4e28ee12d71375baafa44dccc9d978038cbd45a63d4f6580
4
- data.tar.gz: 242072e49d750c6d7638a1e1c719ce3cfcfef0e35847b02150a0285acc43359f
3
+ metadata.gz: 398b111976809202b8860a957db912c42114e9ca03fa9faa761be5be25075717
4
+ data.tar.gz: 953d213705b95ffdc04de9a448a75575938c3aa41749abbfd114806113345af3
5
5
  SHA512:
6
- metadata.gz: da4278d70f737c93ae1da37c2d9383980598eac4a1ccb446cb741965af8db09d9180244d6e5e2a895875e5857d6d2c55a00df429840bb05938b0e785ea702572
7
- data.tar.gz: d36016d02d180a8473f6f4699c4c6212d48277b2f5723a6225725137d9d692e03706a9c94063e47ce440cf3da55cefcac9a2cd3d3c529a5b94662d6f31da8c09
6
+ metadata.gz: f2ab9b4f1039e673fb8df3b70b4a98141f6485e1ded26d3461dd1ab59be256888e44c792b41952806bca3513dbea9cb20a96d81804b110d126edc574811651d2
7
+ data.tar.gz: c8ec3ddc51ebd65f032b2d03fa77ee5de3a90ce48b56fffa250c9e4ec754d98a6920211d8df60753ce97faf0522b24ffa51181519992f7d4e53ebdd57f73bbc7
data/CHANGELOG.md CHANGED
@@ -1,3 +1,57 @@
1
+ ## Rails 6.1.4.7 (March 08, 2022) ##
2
+
3
+ * No changes.
4
+
5
+
6
+ ## Rails 6.1.4.6 (February 11, 2022) ##
7
+
8
+ * No changes.
9
+
10
+
11
+ ## Rails 6.1.4.5 (February 11, 2022) ##
12
+
13
+ * No changes.
14
+
15
+
16
+ ## Rails 6.1.4.4 (December 15, 2021) ##
17
+
18
+ * No changes.
19
+
20
+
21
+ ## Rails 6.1.4.3 (December 14, 2021) ##
22
+
23
+ * Allow localhost with a port by default in development
24
+
25
+ [Fixes: #43864]
26
+
27
+ ## Rails 6.1.4.2 (December 14, 2021) ##
28
+
29
+ * No changes.
30
+
31
+
32
+ ## Rails 6.1.4.1 (August 19, 2021) ##
33
+
34
+ * No changes.
35
+
36
+
37
+ ## Rails 6.1.4 (June 24, 2021) ##
38
+
39
+ * Fix compatibility with `psych >= 4`.
40
+
41
+ Starting in Psych 4.0.0 `YAML.load` behaves like `YAML.safe_load`. To preserve compatibility
42
+ `Rails.application.config_for` now uses `YAML.unsafe_load` if available.
43
+
44
+ *Jean Boussier*
45
+
46
+ * Ensure `Rails.application.config_for` always cast hashes to `ActiveSupport::OrderedOptions`.
47
+
48
+ *Jean Boussier*
49
+
50
+ * Fix create migration generator with `--pretend` option.
51
+
52
+ *euxx*
53
+
54
+
1
55
  ## Rails 6.1.3.2 (May 05, 2021) ##
2
56
 
3
57
  * No changes.
@@ -34,7 +34,11 @@ module Rails
34
34
  @filter_parameters = []
35
35
  @filter_redirect = []
36
36
  @helpers_paths = []
37
- @hosts = Array(([".localhost", IPAddr.new("0.0.0.0/0"), IPAddr.new("::/0")] if Rails.env.development?))
37
+ if Rails.env.development?
38
+ @hosts = ActionDispatch::HostAuthorization::ALLOWED_HOSTS_IN_DEVELOPMENT.dup
39
+ else
40
+ @hosts = []
41
+ end
38
42
  @host_authorization = {}
39
43
  @public_file_server = ActiveSupport::OrderedOptions.new
40
44
  @public_file_server.enabled = true
@@ -256,10 +260,13 @@ module Rails
256
260
  if path = paths["config/database"].existent.first
257
261
  require "rails/application/dummy_erb_compiler"
258
262
 
259
- yaml = Pathname.new(path)
260
- erb = DummyERB.new(yaml.read)
263
+ yaml = DummyERB.new(Pathname.new(path).read).result
261
264
 
262
- YAML.load(erb.result) || {}
265
+ if YAML.respond_to?(:unsafe_load)
266
+ YAML.unsafe_load(yaml) || {}
267
+ else
268
+ YAML.load(yaml) || {}
269
+ end
263
270
  else
264
271
  {}
265
272
  end
@@ -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(shared&.deep_merge(config) || config)
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
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
- # isolate ARGV to ensure that commands depend only on the args they are given
44
- args = args.dup # args might *be* ARGV so dup before clearing
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(old_argv)
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,
@@ -9,8 +9,8 @@ module Rails
9
9
  module VERSION
10
10
  MAJOR = 6
11
11
  MINOR = 1
12
- TINY = 3
13
- PRE = "2"
12
+ TINY = 4
13
+ PRE = "7"
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
@@ -20,6 +20,8 @@ module Rails
20
20
  end
21
21
 
22
22
  def invoke!
23
+ return super if pretend?
24
+
23
25
  invoked_file = super
24
26
  File.exist?(@destination) ? invoked_file : relative_existing_migration
25
27
  end
@@ -10,13 +10,13 @@ namespace :yarn do
10
10
  end
11
11
 
12
12
  yarn_flags =
13
- if `"#{Rails.root}/bin/yarn" --version`.start_with?("1")
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.3.2
4
+ version: 6.1.4.7
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: 2021-05-05 00:00:00.000000000 Z
11
+ date: 2022-03-08 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.3.2
19
+ version: 6.1.4.7
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.3.2
26
+ version: 6.1.4.7
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.3.2
33
+ version: 6.1.4.7
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.3.2
40
+ version: 6.1.4.7
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.8.7
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.8.7
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.3.2
89
+ version: 6.1.4.7
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.3.2
96
+ version: 6.1.4.7
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.3.2/railties/CHANGELOG.md
430
- documentation_uri: https://api.rubyonrails.org/v6.1.3.2/
429
+ changelog_uri: https://github.com/rails/rails/blob/v6.1.4.7/railties/CHANGELOG.md
430
+ documentation_uri: https://api.rubyonrails.org/v6.1.4.7/
431
431
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
432
- source_code_uri: https://github.com/rails/rails/tree/v6.1.3.2/railties
432
+ source_code_uri: https://github.com/rails/rails/tree/v6.1.4.7/railties
433
433
  post_install_message:
434
434
  rdoc_options:
435
435
  - "--exclude"
@@ -447,7 +447,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
447
447
  - !ruby/object:Gem::Version
448
448
  version: '0'
449
449
  requirements: []
450
- rubygems_version: 3.1.2
450
+ rubygems_version: 3.1.6
451
451
  signing_key:
452
452
  specification_version: 4
453
453
  summary: Tools for creating, working with, and running Rails applications.