activesupport 7.2.1.2 → 7.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/lib/active_support/broadcast_logger.rb +14 -14
- data/lib/active_support/cache.rb +2 -2
- data/lib/active_support/core_ext/object/json.rb +5 -3
- data/lib/active_support/core_ext/string/multibyte.rb +1 -1
- data/lib/active_support/core_ext/time/zones.rb +1 -1
- data/lib/active_support/current_attributes.rb +7 -3
- data/lib/active_support/deprecation/reporting.rb +2 -2
- data/lib/active_support/encrypted_file.rb +1 -1
- data/lib/active_support/gem_version.rb +2 -2
- data/lib/active_support/testing/isolation.rb +2 -0
- data/lib/active_support/testing/parallelization/server.rb +3 -0
- data/lib/active_support/testing/strict_warnings.rb +3 -0
- data/lib/active_support/time_with_zone.rb +1 -1
- data/lib/active_support/values/time_zone.rb +6 -6
- metadata +19 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a3996eac7e9551da7dd4bfc64cd93c049f3cb044fba118c088fc7ae18098565
|
4
|
+
data.tar.gz: fc6777f0b3cc247cfb3d3bbedabec020937ef4bf226318d6f775bef99b43b162
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c2e709540796368a539085facf517fd7bd02fb30438a87dd4508fff29e15fe58632b8d62351238998b95e775ec12491591efbd8ac0edb89f513c7a3dad1ff47
|
7
|
+
data.tar.gz: 1be932867f259f0ee991d3b74a8f8e186f75b7bf7a279bde9235ac6e59cc4bae7f2c61feff5a19c5582afcca0bd4bd4468f25cf55b07693d24586a5f05723f90
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
## Rails 7.2.2 (October 30, 2024) ##
|
2
|
+
|
3
|
+
* Include options when instrumenting `ActiveSupport::Cache::Store#delete` and `ActiveSupport::Cache::Store#delete_multi`.
|
4
|
+
|
5
|
+
*Adam Renberg Tamm*
|
6
|
+
|
7
|
+
* Print test names when running `rails test -v` for parallel tests.
|
8
|
+
|
9
|
+
*John Hawthorn*, *Abeid Ahmed*
|
10
|
+
|
11
|
+
|
1
12
|
## Rails 7.2.1.2 (October 23, 2024) ##
|
2
13
|
|
3
14
|
* No changes.
|
@@ -113,33 +113,33 @@ module ActiveSupport
|
|
113
113
|
dispatch { |logger| logger.<<(message) }
|
114
114
|
end
|
115
115
|
|
116
|
-
def add(
|
117
|
-
dispatch { |logger| logger.add(
|
116
|
+
def add(...)
|
117
|
+
dispatch { |logger| logger.add(...) }
|
118
118
|
end
|
119
119
|
alias_method :log, :add
|
120
120
|
|
121
|
-
def debug(
|
122
|
-
dispatch { |logger| logger.debug(
|
121
|
+
def debug(...)
|
122
|
+
dispatch { |logger| logger.debug(...) }
|
123
123
|
end
|
124
124
|
|
125
|
-
def info(
|
126
|
-
dispatch { |logger| logger.info(
|
125
|
+
def info(...)
|
126
|
+
dispatch { |logger| logger.info(...) }
|
127
127
|
end
|
128
128
|
|
129
|
-
def warn(
|
130
|
-
dispatch { |logger| logger.warn(
|
129
|
+
def warn(...)
|
130
|
+
dispatch { |logger| logger.warn(...) }
|
131
131
|
end
|
132
132
|
|
133
|
-
def error(
|
134
|
-
dispatch { |logger| logger.error(
|
133
|
+
def error(...)
|
134
|
+
dispatch { |logger| logger.error(...) }
|
135
135
|
end
|
136
136
|
|
137
|
-
def fatal(
|
138
|
-
dispatch { |logger| logger.fatal(
|
137
|
+
def fatal(...)
|
138
|
+
dispatch { |logger| logger.fatal(...) }
|
139
139
|
end
|
140
140
|
|
141
|
-
def unknown(
|
142
|
-
dispatch { |logger| logger.unknown(
|
141
|
+
def unknown(...)
|
142
|
+
dispatch { |logger| logger.unknown(...) }
|
143
143
|
end
|
144
144
|
|
145
145
|
def formatter=(formatter)
|
data/lib/active_support/cache.rb
CHANGED
@@ -675,7 +675,7 @@ module ActiveSupport
|
|
675
675
|
options = merged_options(options)
|
676
676
|
key = normalize_key(name, options)
|
677
677
|
|
678
|
-
instrument(:delete, key) do
|
678
|
+
instrument(:delete, key, options) do
|
679
679
|
delete_entry(key, **options)
|
680
680
|
end
|
681
681
|
end
|
@@ -690,7 +690,7 @@ module ActiveSupport
|
|
690
690
|
options = merged_options(options)
|
691
691
|
names.map! { |key| normalize_key(key, options) }
|
692
692
|
|
693
|
-
instrument_multi
|
693
|
+
instrument_multi(:delete_multi, names, options) do
|
694
694
|
delete_multi_entries(names, **options)
|
695
695
|
end
|
696
696
|
end
|
@@ -233,9 +233,11 @@ class Pathname # :nodoc:
|
|
233
233
|
end
|
234
234
|
end
|
235
235
|
|
236
|
-
|
237
|
-
|
238
|
-
|
236
|
+
unless IPAddr.method_defined?(:as_json, false)
|
237
|
+
class IPAddr # :nodoc:
|
238
|
+
def as_json(options = nil)
|
239
|
+
to_s
|
240
|
+
end
|
239
241
|
end
|
240
242
|
end
|
241
243
|
|
@@ -19,7 +19,7 @@ class String
|
|
19
19
|
# >> "lj".upcase
|
20
20
|
# => "LJ"
|
21
21
|
#
|
22
|
-
# == Method chaining
|
22
|
+
# == \Method chaining
|
23
23
|
#
|
24
24
|
# All the methods on the Chars proxy which normally return a string will return a Chars object. This allows
|
25
25
|
# method chaining on the result of any of these methods.
|
@@ -20,7 +20,7 @@ class Time
|
|
20
20
|
# This method accepts any of the following:
|
21
21
|
#
|
22
22
|
# * A \Rails TimeZone object.
|
23
|
-
# * An identifier for a \Rails TimeZone object (e.g., "Eastern Time (US & Canada)", <tt>-5.hours</tt>).
|
23
|
+
# * An identifier for a \Rails TimeZone object (e.g., "Eastern \Time (US & Canada)", <tt>-5.hours</tt>).
|
24
24
|
# * A +TZInfo::Timezone+ object.
|
25
25
|
# * An identifier for a +TZInfo::Timezone+ object (e.g., "America/New_York").
|
26
26
|
#
|
@@ -95,6 +95,8 @@ module ActiveSupport
|
|
95
95
|
|
96
96
|
INVALID_ATTRIBUTE_NAMES = [:set, :reset, :resets, :instance, :before_reset, :after_reset, :reset_all, :clear_all] # :nodoc:
|
97
97
|
|
98
|
+
NOT_SET = Object.new.freeze # :nodoc:
|
99
|
+
|
98
100
|
class << self
|
99
101
|
# Returns singleton instance for this class in this thread. If none exists, one is created.
|
100
102
|
def instance
|
@@ -109,7 +111,7 @@ module ActiveSupport
|
|
109
111
|
# is a proc or lambda, it will be called whenever an instance is
|
110
112
|
# constructed. Otherwise, the value will be duplicated with +#dup+.
|
111
113
|
# Default values are re-assigned when the attributes are reset.
|
112
|
-
def attribute(*names, default:
|
114
|
+
def attribute(*names, default: NOT_SET)
|
113
115
|
invalid_attribute_names = names.map(&:to_sym) & INVALID_ATTRIBUTE_NAMES
|
114
116
|
if invalid_attribute_names.any?
|
115
117
|
raise ArgumentError, "Restricted attribute names: #{invalid_attribute_names.join(", ")}"
|
@@ -221,8 +223,10 @@ module ActiveSupport
|
|
221
223
|
|
222
224
|
private
|
223
225
|
def resolve_defaults
|
224
|
-
defaults.
|
225
|
-
|
226
|
+
defaults.each_with_object({}) do |(key, value), result|
|
227
|
+
if value != NOT_SET
|
228
|
+
result[key] = Proc === value ? value.call : value.dup
|
229
|
+
end
|
226
230
|
end
|
227
231
|
end
|
228
232
|
end
|
@@ -168,8 +168,8 @@ module ActiveSupport
|
|
168
168
|
end
|
169
169
|
end
|
170
170
|
|
171
|
-
RAILS_GEM_ROOT = File.expand_path("../../../..", __dir__) + "/"
|
172
|
-
LIB_DIR = RbConfig::CONFIG["libdir"]
|
171
|
+
RAILS_GEM_ROOT = File.expand_path("../../../..", __dir__) + "/" # :nodoc:
|
172
|
+
LIB_DIR = RbConfig::CONFIG["libdir"] # :nodoc:
|
173
173
|
|
174
174
|
def ignored_callstack?(path)
|
175
175
|
path.start_with?(RAILS_GEM_ROOT, LIB_DIR) || path.include?("<internal:")
|
@@ -6,6 +6,8 @@ require "drb/unix" unless Gem.win_platform?
|
|
6
6
|
module ActiveSupport
|
7
7
|
module Testing
|
8
8
|
class Parallelization # :nodoc:
|
9
|
+
PrerecordResultClass = Struct.new(:name)
|
10
|
+
|
9
11
|
class Server
|
10
12
|
include DRb::DRbUndumped
|
11
13
|
|
@@ -21,6 +23,7 @@ module ActiveSupport
|
|
21
23
|
@in_flight.delete([result.klass, result.name])
|
22
24
|
|
23
25
|
reporter.synchronize do
|
26
|
+
reporter.prerecord(PrerecordResultClass.new(result.klass), result.name)
|
24
27
|
reporter.record(result)
|
25
28
|
end
|
26
29
|
end
|
@@ -14,6 +14,9 @@ module ActiveSupport
|
|
14
14
|
# Expected non-verbose warning emitted by Rails.
|
15
15
|
/Ignoring .*\.yml because it has expired/,
|
16
16
|
/Failed to validate the schema cache because/,
|
17
|
+
|
18
|
+
# TODO: We need to decide what to do with this.
|
19
|
+
/Status code :unprocessable_entity is deprecated/
|
17
20
|
)
|
18
21
|
|
19
22
|
SUPPRESSED_WARNINGS = Regexp.union(
|
@@ -85,7 +85,7 @@ module ActiveSupport
|
|
85
85
|
end
|
86
86
|
alias_method :getlocal, :localtime
|
87
87
|
|
88
|
-
# Returns true if the current time is within Daylight Savings Time for the
|
88
|
+
# Returns true if the current time is within Daylight Savings \Time for the
|
89
89
|
# specified time zone.
|
90
90
|
#
|
91
91
|
# Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)'
|
@@ -12,7 +12,7 @@ module ActiveSupport
|
|
12
12
|
# * Limit the set of zones provided by TZInfo to a meaningful subset of 134
|
13
13
|
# zones.
|
14
14
|
# * Retrieve and display zones with a friendlier name
|
15
|
-
# (e.g., "Eastern Time (US & Canada)" instead of "America/New_York").
|
15
|
+
# (e.g., "Eastern \Time (US & Canada)" instead of "America/New_York").
|
16
16
|
# * Lazily load +TZInfo::Timezone+ instances only when they're needed.
|
17
17
|
# * Create ActiveSupport::TimeWithZone instances via TimeZone's +local+,
|
18
18
|
# +parse+, +at+, and +now+ methods.
|
@@ -357,7 +357,7 @@ module ActiveSupport
|
|
357
357
|
"(GMT#{formatted_offset}) #{name}"
|
358
358
|
end
|
359
359
|
|
360
|
-
# Method for creating new ActiveSupport::TimeWithZone instance in time zone
|
360
|
+
# \Method for creating new ActiveSupport::TimeWithZone instance in time zone
|
361
361
|
# of +self+ from given values.
|
362
362
|
#
|
363
363
|
# Time.zone = 'Hawaii' # => "Hawaii"
|
@@ -367,7 +367,7 @@ module ActiveSupport
|
|
367
367
|
ActiveSupport::TimeWithZone.new(nil, self, time)
|
368
368
|
end
|
369
369
|
|
370
|
-
# Method for creating new ActiveSupport::TimeWithZone instance in time zone
|
370
|
+
# \Method for creating new ActiveSupport::TimeWithZone instance in time zone
|
371
371
|
# of +self+ from number of seconds since the Unix epoch.
|
372
372
|
#
|
373
373
|
# Time.zone = 'Hawaii' # => "Hawaii"
|
@@ -382,7 +382,7 @@ module ActiveSupport
|
|
382
382
|
Time.at(*args).utc.in_time_zone(self)
|
383
383
|
end
|
384
384
|
|
385
|
-
# Method for creating new ActiveSupport::TimeWithZone instance in time zone
|
385
|
+
# \Method for creating new ActiveSupport::TimeWithZone instance in time zone
|
386
386
|
# of +self+ from an ISO 8601 string.
|
387
387
|
#
|
388
388
|
# Time.zone = 'Hawaii' # => "Hawaii"
|
@@ -434,7 +434,7 @@ module ActiveSupport
|
|
434
434
|
raise ArgumentError, "invalid date"
|
435
435
|
end
|
436
436
|
|
437
|
-
# Method for creating new ActiveSupport::TimeWithZone instance in time zone
|
437
|
+
# \Method for creating new ActiveSupport::TimeWithZone instance in time zone
|
438
438
|
# of +self+ from parsed string.
|
439
439
|
#
|
440
440
|
# Time.zone = 'Hawaii' # => "Hawaii"
|
@@ -456,7 +456,7 @@ module ActiveSupport
|
|
456
456
|
parts_to_time(Date._parse(str, false), now)
|
457
457
|
end
|
458
458
|
|
459
|
-
# Method for creating new ActiveSupport::TimeWithZone instance in time zone
|
459
|
+
# \Method for creating new ActiveSupport::TimeWithZone instance in time zone
|
460
460
|
# of +self+ from an RFC 3339 string.
|
461
461
|
#
|
462
462
|
# Time.zone = 'Hawaii' # => "Hawaii"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activesupport
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.2.
|
4
|
+
version: 7.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|
@@ -168,6 +168,20 @@ dependencies:
|
|
168
168
|
- - ">="
|
169
169
|
- !ruby/object:Gem::Version
|
170
170
|
version: '0.3'
|
171
|
+
- !ruby/object:Gem::Dependency
|
172
|
+
name: benchmark
|
173
|
+
requirement: !ruby/object:Gem::Requirement
|
174
|
+
requirements:
|
175
|
+
- - ">="
|
176
|
+
- !ruby/object:Gem::Version
|
177
|
+
version: '0.3'
|
178
|
+
type: :runtime
|
179
|
+
prerelease: false
|
180
|
+
version_requirements: !ruby/object:Gem::Requirement
|
181
|
+
requirements:
|
182
|
+
- - ">="
|
183
|
+
- !ruby/object:Gem::Version
|
184
|
+
version: '0.3'
|
171
185
|
description: A toolkit of support libraries and Ruby core extensions extracted from
|
172
186
|
the Rails framework. Rich support for multibyte strings, internationalization, time
|
173
187
|
zones, and testing.
|
@@ -466,10 +480,10 @@ licenses:
|
|
466
480
|
- MIT
|
467
481
|
metadata:
|
468
482
|
bug_tracker_uri: https://github.com/rails/rails/issues
|
469
|
-
changelog_uri: https://github.com/rails/rails/blob/v7.2.
|
470
|
-
documentation_uri: https://api.rubyonrails.org/v7.2.
|
483
|
+
changelog_uri: https://github.com/rails/rails/blob/v7.2.2/activesupport/CHANGELOG.md
|
484
|
+
documentation_uri: https://api.rubyonrails.org/v7.2.2/
|
471
485
|
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
472
|
-
source_code_uri: https://github.com/rails/rails/tree/v7.2.
|
486
|
+
source_code_uri: https://github.com/rails/rails/tree/v7.2.2/activesupport
|
473
487
|
rubygems_mfa_required: 'true'
|
474
488
|
post_install_message:
|
475
489
|
rdoc_options:
|