railties 7.1.3.3 → 7.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +43 -0
- data/lib/rails/app_updater.rb +13 -1
- data/lib/rails/application/configuration.rb +7 -7
- data/lib/rails/application.rb +23 -20
- data/lib/rails/backtrace_cleaner.rb +4 -2
- data/lib/rails/gem_version.rb +2 -2
- data/lib/rails/generators/database.rb +1 -1
- data/lib/rails/generators/migration.rb +3 -3
- data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_7_1.rb.tt +0 -4
- data/lib/rails/generators/rails/app/templates/config/puma.rb.tt +16 -7
- data/lib/rails.rb +1 -1
- metadata +12 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8866f3e8c17f561a89af9ed456dba62eee93d26ee1c1acdffe0be77b4b5c02dd
|
4
|
+
data.tar.gz: 1f78f4f77ba304da3820061f9fe4f31b50272f475742fabe50129dbc28b55a6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7a5c857425f845fbfb1bf49bc2e0340e6a46c9ff969c0df938c27b88edb16f226cd7a31ec3a9f43aceffb1c0b6d1edca964af93f9e05085ad5ec8191eb474e9
|
7
|
+
data.tar.gz: 3ea3b1f145ad2439d1fcf347ad45c37e13dfe4d29ec40bc0b2159947a4df813ec2397e5f9a219011afb373a5f0a169249512dc284cd06c63ad689b91ea5f4941
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,46 @@
|
|
1
|
+
## Rails 7.1.4 (August 22, 2024) ##
|
2
|
+
|
3
|
+
* Preserve `--asset-pipeline propshaft` when running `app:update`.
|
4
|
+
|
5
|
+
*Zacharias Knudsen*
|
6
|
+
|
7
|
+
* Allow string keys for SQLCommenter.
|
8
|
+
|
9
|
+
*Ngan Pham*
|
10
|
+
|
11
|
+
* Fix derived foreign key to return correctly when association id is part of query constraints.
|
12
|
+
|
13
|
+
*Varun Sharma*
|
14
|
+
|
15
|
+
* Show warning for `secret_key_base` in development too.
|
16
|
+
|
17
|
+
*fatkodima*
|
18
|
+
|
19
|
+
* Fix sanitizer vendor configuration in 7.1 defaults.
|
20
|
+
|
21
|
+
In apps where `rails-html-sanitizer` was not eagerly loaded, the sanitizer default could end up
|
22
|
+
being Rails::HTML4::Sanitizer when it should be set to `Rails::HTML5::Sanitizer`.
|
23
|
+
|
24
|
+
*Mike Dalessio*, *Rafael Mendonça França*
|
25
|
+
|
26
|
+
* Revert the use of `Concurrent.physical_processor_count` in default Puma config
|
27
|
+
|
28
|
+
While for many people this saves one config to set, for many others using
|
29
|
+
a shared hosting solution, this cause the default configuration to spawn
|
30
|
+
way more workers than reasonable.
|
31
|
+
|
32
|
+
There is unfortunately no reliable way to detect how many cores an application
|
33
|
+
can realistically use, and even then, assuming the application should use
|
34
|
+
all the machine resources is often wrong.
|
35
|
+
|
36
|
+
*Jean Boussier*
|
37
|
+
|
38
|
+
|
39
|
+
## Rails 7.1.3.4 (June 04, 2024) ##
|
40
|
+
|
41
|
+
* No changes.
|
42
|
+
|
43
|
+
|
1
44
|
## Rails 7.1.3.3 (May 16, 2024) ##
|
2
45
|
|
3
46
|
* No changes.
|
data/lib/rails/app_updater.rb
CHANGED
@@ -31,10 +31,22 @@ module Rails
|
|
31
31
|
options[:skip_action_cable] = !defined?(ActionCable::Engine)
|
32
32
|
options[:skip_test] = !defined?(Rails::TestUnitRailtie)
|
33
33
|
options[:skip_system_test] = Rails.application.config.generators.system_tests.nil?
|
34
|
-
options[:
|
34
|
+
options[:asset_pipeline] = asset_pipeline
|
35
|
+
options[:skip_asset_pipeline] = asset_pipeline.nil?
|
35
36
|
options[:skip_bootsnap] = !defined?(Bootsnap)
|
36
37
|
options
|
37
38
|
end
|
39
|
+
|
40
|
+
def asset_pipeline
|
41
|
+
case
|
42
|
+
when defined?(Sprockets::Railtie)
|
43
|
+
"sprockets"
|
44
|
+
when defined?(Propshaft::Railtie)
|
45
|
+
"propshaft"
|
46
|
+
else
|
47
|
+
nil
|
48
|
+
end
|
49
|
+
end
|
38
50
|
end
|
39
51
|
end
|
40
52
|
end
|
@@ -320,14 +320,14 @@ module Rails
|
|
320
320
|
action_controller.allow_deprecated_parameters_hash_equality = false
|
321
321
|
end
|
322
322
|
|
323
|
-
if
|
324
|
-
|
325
|
-
|
326
|
-
|
323
|
+
if respond_to?(:action_view)
|
324
|
+
require "action_view/helpers"
|
325
|
+
action_view.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor
|
326
|
+
end
|
327
327
|
|
328
|
-
|
329
|
-
|
330
|
-
|
328
|
+
if respond_to?(:action_text)
|
329
|
+
require "action_view/helpers"
|
330
|
+
action_text.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor
|
331
331
|
end
|
332
332
|
else
|
333
333
|
raise "Unknown version #{target_version.to_s.inspect}"
|
data/lib/rails/application.rb
CHANGED
@@ -476,27 +476,30 @@ module Rails
|
|
476
476
|
# then +credentials.secret_key_base+, and finally +secrets.secret_key_base+. For most applications,
|
477
477
|
# the correct place to store it is in the encrypted credentials file.
|
478
478
|
def secret_key_base
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
config.secret_key_base
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
479
|
+
config.secret_key_base ||=
|
480
|
+
if ENV["SECRET_KEY_BASE_DUMMY"]
|
481
|
+
generate_local_secret
|
482
|
+
else
|
483
|
+
validate_secret_key_base(
|
484
|
+
ENV["SECRET_KEY_BASE"] || credentials.secret_key_base || begin
|
485
|
+
secret_skb = secrets_secret_key_base
|
486
|
+
|
487
|
+
if secret_skb && secret_skb.equal?(config.secret_key_base)
|
488
|
+
config.secret_key_base
|
489
|
+
elsif secret_skb
|
490
|
+
Rails.deprecator.warn(<<~MSG.squish)
|
491
|
+
Your `secret_key_base` is configured in `Rails.application.secrets`,
|
492
|
+
which is deprecated in favor of `Rails.application.credentials` and
|
493
|
+
will be removed in Rails 7.2.
|
494
|
+
MSG
|
495
|
+
|
496
|
+
secret_skb
|
497
|
+
elsif Rails.env.local?
|
498
|
+
generate_local_secret
|
499
|
+
end
|
496
500
|
end
|
497
|
-
|
498
|
-
|
499
|
-
end
|
501
|
+
)
|
502
|
+
end
|
500
503
|
end
|
501
504
|
|
502
505
|
# Returns an ActiveSupport::EncryptedConfiguration instance for the
|
@@ -10,9 +10,11 @@ module Rails
|
|
10
10
|
|
11
11
|
def initialize
|
12
12
|
super
|
13
|
-
@root = "#{Rails.root}/"
|
14
13
|
add_filter do |line|
|
15
|
-
|
14
|
+
# We may be called before Rails.root is assigned.
|
15
|
+
# When that happens we fallback to not truncating.
|
16
|
+
@root ||= Rails.root && "#{Rails.root}/"
|
17
|
+
@root && line.start_with?(@root) ? line.from(@root.size) : line
|
16
18
|
end
|
17
19
|
add_filter do |line|
|
18
20
|
if RENDER_TEMPLATE_PATTERN.match?(line)
|
data/lib/rails/gem_version.rb
CHANGED
@@ -16,7 +16,7 @@ module Rails
|
|
16
16
|
when "mysql" then ["mysql2", ["~> 0.5"]]
|
17
17
|
when "trilogy" then ["trilogy", ["~> 2.4"]]
|
18
18
|
when "postgresql" then ["pg", ["~> 1.1"]]
|
19
|
-
when "sqlite3" then ["sqlite3", ["
|
19
|
+
when "sqlite3" then ["sqlite3", [">= 1.4"]]
|
20
20
|
when "oracle" then ["activerecord-oracle_enhanced-adapter", nil]
|
21
21
|
when "sqlserver" then ["activerecord-sqlserver-adapter", nil]
|
22
22
|
when "jdbcmysql" then ["activerecord-jdbcmysql-adapter", nil]
|
@@ -7,7 +7,7 @@ module Rails
|
|
7
7
|
module Generators
|
8
8
|
# Holds common methods for migrations. It assumes that migrations have the
|
9
9
|
# [0-9]*_name format and can be used by other frameworks (like Sequel)
|
10
|
-
# just by implementing the
|
10
|
+
# just by implementing the +next_migration_number+ method.
|
11
11
|
module Migration
|
12
12
|
extend ActiveSupport::Concern
|
13
13
|
attr_reader :migration_number, :migration_file_name, :migration_class_name
|
@@ -46,10 +46,10 @@ module Rails
|
|
46
46
|
end
|
47
47
|
|
48
48
|
# Creates a migration template at the given destination. The difference
|
49
|
-
# to the default template method is that the migration
|
49
|
+
# to the default template method is that the migration number is prepended
|
50
50
|
# to the destination file name.
|
51
51
|
#
|
52
|
-
# The migration
|
52
|
+
# The migration number, migration file name, migration class name are
|
53
53
|
# available as instance variables in the template to be rendered.
|
54
54
|
#
|
55
55
|
# migration_template "migration.rb", "db/migrate/add_foo_to_bar.rb"
|
data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_7_1.rb.tt
CHANGED
@@ -241,7 +241,6 @@
|
|
241
241
|
# this file):
|
242
242
|
# config.active_support.cache_format_version = 7.1
|
243
243
|
|
244
|
-
|
245
244
|
###
|
246
245
|
# Configure Action View to use HTML5 standards-compliant sanitizers when they are supported on your
|
247
246
|
# platform.
|
@@ -253,7 +252,6 @@
|
|
253
252
|
#++
|
254
253
|
# Rails.application.config.action_view.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor
|
255
254
|
|
256
|
-
|
257
255
|
###
|
258
256
|
# Configure Action Text to use an HTML5 standards-compliant sanitizer when it is supported on your
|
259
257
|
# platform.
|
@@ -265,14 +263,12 @@
|
|
265
263
|
#++
|
266
264
|
# Rails.application.config.action_text.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor
|
267
265
|
|
268
|
-
|
269
266
|
###
|
270
267
|
# Configure the log level used by the DebugExceptions middleware when logging
|
271
268
|
# uncaught exceptions during requests.
|
272
269
|
#++
|
273
270
|
# Rails.application.config.action_dispatch.debug_exception_log_level = :error
|
274
271
|
|
275
|
-
|
276
272
|
###
|
277
273
|
# Configure the test helpers in Action View, Action Dispatch, and rails-dom-testing to use HTML5
|
278
274
|
# parsers.
|
@@ -11,13 +11,22 @@ max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
|
|
11
11
|
min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count }
|
12
12
|
threads min_threads_count, max_threads_count
|
13
13
|
|
14
|
-
|
15
|
-
if ENV["RAILS_ENV"] == "production"
|
16
|
-
require "concurrent-ruby"
|
17
|
-
worker_count = Integer(ENV.fetch("WEB_CONCURRENCY") { Concurrent.physical_processor_count })
|
18
|
-
workers worker_count if worker_count > 1
|
19
|
-
end
|
14
|
+
rails_env = ENV.fetch("RAILS_ENV") { "development" }
|
20
15
|
|
16
|
+
if rails_env == "production"
|
17
|
+
# If you are running more than 1 thread per process, the workers count
|
18
|
+
# should be equal to the number of processors (CPU cores) in production.
|
19
|
+
#
|
20
|
+
# It defaults to 1 because it's impossible to reliably detect how many
|
21
|
+
# CPU cores are available. Make sure to set the `WEB_CONCURRENCY` environment
|
22
|
+
# variable to match the number of processors.
|
23
|
+
worker_count = Integer(ENV.fetch("WEB_CONCURRENCY") { 1 })
|
24
|
+
if worker_count > 1
|
25
|
+
workers worker_count
|
26
|
+
else
|
27
|
+
preload_app!
|
28
|
+
end
|
29
|
+
end
|
21
30
|
# Specifies the `worker_timeout` threshold that Puma will use to wait before
|
22
31
|
# terminating a worker in development environments.
|
23
32
|
worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development"
|
@@ -26,7 +35,7 @@ worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development"
|
|
26
35
|
port ENV.fetch("PORT") { 3000 }
|
27
36
|
|
28
37
|
# Specifies the `environment` that Puma will run in.
|
29
|
-
environment
|
38
|
+
environment rails_env
|
30
39
|
|
31
40
|
# Specifies the `pidfile` that Puma will use.
|
32
41
|
pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" }
|
data/lib/rails.rb
CHANGED
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: 7.1.
|
4
|
+
version: 7.1.4
|
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: 2024-
|
11
|
+
date: 2024-08-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: 7.1.
|
19
|
+
version: 7.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: 7.1.
|
26
|
+
version: 7.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: 7.1.
|
33
|
+
version: 7.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: 7.1.
|
40
|
+
version: 7.1.4
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rackup
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -120,14 +120,14 @@ dependencies:
|
|
120
120
|
requirements:
|
121
121
|
- - '='
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version: 7.1.
|
123
|
+
version: 7.1.4
|
124
124
|
type: :development
|
125
125
|
prerelease: false
|
126
126
|
version_requirements: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
128
|
- - '='
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version: 7.1.
|
130
|
+
version: 7.1.4
|
131
131
|
description: 'Rails internals: application bootup, plugins, generators, and rake tasks.'
|
132
132
|
email: david@loudthinking.com
|
133
133
|
executables:
|
@@ -459,10 +459,10 @@ licenses:
|
|
459
459
|
- MIT
|
460
460
|
metadata:
|
461
461
|
bug_tracker_uri: https://github.com/rails/rails/issues
|
462
|
-
changelog_uri: https://github.com/rails/rails/blob/v7.1.
|
463
|
-
documentation_uri: https://api.rubyonrails.org/v7.1.
|
462
|
+
changelog_uri: https://github.com/rails/rails/blob/v7.1.4/railties/CHANGELOG.md
|
463
|
+
documentation_uri: https://api.rubyonrails.org/v7.1.4/
|
464
464
|
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
465
|
-
source_code_uri: https://github.com/rails/rails/tree/v7.1.
|
465
|
+
source_code_uri: https://github.com/rails/rails/tree/v7.1.4/railties
|
466
466
|
rubygems_mfa_required: 'true'
|
467
467
|
post_install_message:
|
468
468
|
rdoc_options:
|
@@ -481,7 +481,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
481
481
|
- !ruby/object:Gem::Version
|
482
482
|
version: '0'
|
483
483
|
requirements: []
|
484
|
-
rubygems_version: 3.5.
|
484
|
+
rubygems_version: 3.5.11
|
485
485
|
signing_key:
|
486
486
|
specification_version: 4
|
487
487
|
summary: Tools for creating, working with, and running Rails applications.
|