activesupport 8.0.4 → 8.1.0
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 +296 -172
- data/lib/active_support/backtrace_cleaner.rb +71 -0
- data/lib/active_support/cache/mem_cache_store.rb +13 -13
- data/lib/active_support/cache/redis_cache_store.rb +36 -30
- data/lib/active_support/cache/strategy/local_cache.rb +16 -7
- data/lib/active_support/cache/strategy/local_cache_middleware.rb +7 -7
- data/lib/active_support/cache.rb +69 -6
- data/lib/active_support/callbacks.rb +20 -8
- data/lib/active_support/concurrency/load_interlock_aware_monitor.rb +8 -62
- data/lib/active_support/concurrency/thread_monitor.rb +55 -0
- data/lib/active_support/configurable.rb +34 -0
- data/lib/active_support/continuous_integration.rb +145 -0
- data/lib/active_support/core_ext/array.rb +7 -7
- data/lib/active_support/core_ext/benchmark.rb +4 -12
- data/lib/active_support/core_ext/big_decimal.rb +1 -1
- data/lib/active_support/core_ext/class.rb +2 -2
- data/lib/active_support/core_ext/date.rb +5 -5
- data/lib/active_support/core_ext/date_and_time/compatibility.rb +0 -35
- data/lib/active_support/core_ext/date_time/compatibility.rb +3 -5
- data/lib/active_support/core_ext/date_time.rb +5 -5
- data/lib/active_support/core_ext/digest.rb +1 -1
- data/lib/active_support/core_ext/erb/util.rb +3 -3
- data/lib/active_support/core_ext/file.rb +1 -1
- data/lib/active_support/core_ext/hash.rb +8 -8
- data/lib/active_support/core_ext/integer.rb +3 -3
- data/lib/active_support/core_ext/kernel.rb +3 -3
- data/lib/active_support/core_ext/module.rb +11 -11
- data/lib/active_support/core_ext/numeric.rb +3 -3
- data/lib/active_support/core_ext/object/json.rb +8 -1
- data/lib/active_support/core_ext/object/to_query.rb +5 -0
- data/lib/active_support/core_ext/object.rb +13 -13
- data/lib/active_support/core_ext/pathname.rb +2 -2
- data/lib/active_support/core_ext/range.rb +4 -5
- data/lib/active_support/core_ext/string/multibyte.rb +10 -1
- data/lib/active_support/core_ext/string/output_safety.rb +19 -12
- data/lib/active_support/core_ext/string.rb +13 -13
- data/lib/active_support/core_ext/symbol.rb +1 -1
- data/lib/active_support/core_ext/time/calculations.rb +0 -7
- data/lib/active_support/core_ext/time/compatibility.rb +2 -27
- data/lib/active_support/core_ext/time.rb +5 -5
- data/lib/active_support/core_ext.rb +1 -1
- data/lib/active_support/current_attributes/test_helper.rb +2 -2
- data/lib/active_support/current_attributes.rb +13 -10
- data/lib/active_support/dependencies/interlock.rb +11 -5
- data/lib/active_support/dependencies.rb +6 -1
- data/lib/active_support/deprecation/reporting.rb +4 -2
- data/lib/active_support/deprecation.rb +1 -1
- data/lib/active_support/editor.rb +70 -0
- data/lib/active_support/error_reporter.rb +50 -6
- data/lib/active_support/event_reporter/test_helper.rb +32 -0
- data/lib/active_support/event_reporter.rb +592 -0
- data/lib/active_support/evented_file_update_checker.rb +5 -1
- data/lib/active_support/execution_context.rb +64 -7
- data/lib/active_support/file_update_checker.rb +7 -5
- data/lib/active_support/gem_version.rb +2 -2
- data/lib/active_support/gzip.rb +1 -0
- data/lib/active_support/hash_with_indifferent_access.rb +27 -7
- data/lib/active_support/i18n_railtie.rb +1 -2
- data/lib/active_support/inflector/inflections.rb +31 -15
- data/lib/active_support/inflector/transliterate.rb +6 -8
- data/lib/active_support/isolated_execution_state.rb +12 -15
- data/lib/active_support/json/decoding.rb +2 -2
- data/lib/active_support/json/encoding.rb +135 -17
- data/lib/active_support/log_subscriber.rb +2 -6
- data/lib/active_support/message_encryptors.rb +52 -0
- data/lib/active_support/message_pack/extensions.rb +5 -0
- data/lib/active_support/message_verifiers.rb +52 -0
- data/lib/active_support/messages/rotation_coordinator.rb +9 -0
- data/lib/active_support/messages/rotator.rb +5 -0
- data/lib/active_support/multibyte/chars.rb +8 -1
- data/lib/active_support/multibyte.rb +4 -0
- data/lib/active_support/notifications/fanout.rb +64 -42
- data/lib/active_support/railtie.rb +32 -15
- data/lib/active_support/structured_event_subscriber.rb +99 -0
- data/lib/active_support/subscriber.rb +0 -5
- data/lib/active_support/syntax_error_proxy.rb +3 -0
- data/lib/active_support/test_case.rb +61 -6
- data/lib/active_support/testing/assertions.rb +34 -6
- data/lib/active_support/testing/error_reporter_assertions.rb +18 -1
- data/lib/active_support/testing/event_reporter_assertions.rb +227 -0
- data/lib/active_support/testing/notification_assertions.rb +92 -0
- data/lib/active_support/testing/parallelization/worker.rb +2 -0
- data/lib/active_support/testing/parallelization.rb +13 -0
- data/lib/active_support/testing/tests_without_assertions.rb +1 -1
- data/lib/active_support/testing/time_helpers.rb +7 -3
- data/lib/active_support/time_with_zone.rb +22 -22
- data/lib/active_support/values/time_zone.rb +8 -1
- data/lib/active_support/xml_mini.rb +1 -2
- data/lib/active_support.rb +20 -15
- metadata +24 -17
- data/lib/active_support/core_ext/range/each.rb +0 -24
data/lib/active_support.rb
CHANGED
|
@@ -39,17 +39,22 @@ module ActiveSupport
|
|
|
39
39
|
autoload :Concern
|
|
40
40
|
autoload :CodeGenerator
|
|
41
41
|
autoload :ActionableError
|
|
42
|
+
autoload :Configurable
|
|
42
43
|
autoload :ConfigurationFile
|
|
44
|
+
autoload :ContinuousIntegration
|
|
43
45
|
autoload :CurrentAttributes
|
|
44
46
|
autoload :Dependencies
|
|
45
47
|
autoload :DescendantsTracker
|
|
48
|
+
autoload :Editor
|
|
46
49
|
autoload :ExecutionWrapper
|
|
47
50
|
autoload :Executor
|
|
48
51
|
autoload :ErrorReporter
|
|
52
|
+
autoload :EventReporter
|
|
49
53
|
autoload :FileUpdateChecker
|
|
50
54
|
autoload :EventedFileUpdateChecker
|
|
51
55
|
autoload :ForkTracker
|
|
52
56
|
autoload :LogSubscriber
|
|
57
|
+
autoload :StructuredEventSubscriber
|
|
53
58
|
autoload :IsolatedExecutionState
|
|
54
59
|
autoload :Notifications
|
|
55
60
|
autoload :Reloader
|
|
@@ -61,7 +66,6 @@ module ActiveSupport
|
|
|
61
66
|
autoload :Benchmarkable
|
|
62
67
|
autoload :Cache
|
|
63
68
|
autoload :Callbacks
|
|
64
|
-
autoload :Configurable
|
|
65
69
|
autoload :ClassAttribute
|
|
66
70
|
autoload :Deprecation
|
|
67
71
|
autoload :Delegation
|
|
@@ -99,10 +103,16 @@ module ActiveSupport
|
|
|
99
103
|
|
|
100
104
|
cattr_accessor :test_order # :nodoc:
|
|
101
105
|
cattr_accessor :test_parallelization_threshold, default: 50 # :nodoc:
|
|
106
|
+
cattr_accessor :parallelize_test_databases, default: true # :nodoc:
|
|
102
107
|
|
|
103
108
|
@error_reporter = ActiveSupport::ErrorReporter.new
|
|
104
109
|
singleton_class.attr_accessor :error_reporter # :nodoc:
|
|
105
110
|
|
|
111
|
+
@event_reporter = ActiveSupport::EventReporter.new
|
|
112
|
+
singleton_class.attr_accessor :event_reporter # :nodoc:
|
|
113
|
+
|
|
114
|
+
cattr_accessor :filter_parameters, default: [] # :nodoc:
|
|
115
|
+
|
|
106
116
|
def self.cache_format_version
|
|
107
117
|
Cache.format_version
|
|
108
118
|
end
|
|
@@ -112,23 +122,18 @@ module ActiveSupport
|
|
|
112
122
|
end
|
|
113
123
|
|
|
114
124
|
def self.to_time_preserves_timezone
|
|
115
|
-
|
|
125
|
+
ActiveSupport.deprecator.warn(
|
|
126
|
+
"`config.active_support.to_time_preserves_timezone` is deprecated and will be removed in Rails 8.2"
|
|
127
|
+
)
|
|
128
|
+
@to_time_preserves_timezone
|
|
116
129
|
end
|
|
117
130
|
|
|
118
131
|
def self.to_time_preserves_timezone=(value)
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
elsif value != :zone
|
|
125
|
-
ActiveSupport.deprecator.warn(
|
|
126
|
-
"`to_time` will always preserve the full timezone rather than offset of the receiver in Rails 8.1. " \
|
|
127
|
-
"To opt in to the new behavior, set `config.active_support.to_time_preserves_timezone = :zone`."
|
|
128
|
-
)
|
|
129
|
-
end
|
|
130
|
-
|
|
131
|
-
DateAndTime::Compatibility.preserve_timezone = value
|
|
132
|
+
ActiveSupport.deprecator.warn(
|
|
133
|
+
"`config.active_support.to_time_preserves_timezone` is deprecated and will be removed in Rails 8.2"
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
@to_time_preserves_timezone = value
|
|
132
137
|
end
|
|
133
138
|
|
|
134
139
|
def self.utc_to_local_returns_utc_offset_times
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: activesupport
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 8.0
|
|
4
|
+
version: 8.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Heinemeier Hansson
|
|
@@ -140,61 +140,61 @@ dependencies:
|
|
|
140
140
|
- !ruby/object:Gem::Version
|
|
141
141
|
version: '0'
|
|
142
142
|
- !ruby/object:Gem::Dependency
|
|
143
|
-
name:
|
|
143
|
+
name: json
|
|
144
144
|
requirement: !ruby/object:Gem::Requirement
|
|
145
145
|
requirements:
|
|
146
146
|
- - ">="
|
|
147
147
|
- !ruby/object:Gem::Version
|
|
148
|
-
version:
|
|
148
|
+
version: '0'
|
|
149
149
|
type: :runtime
|
|
150
150
|
prerelease: false
|
|
151
151
|
version_requirements: !ruby/object:Gem::Requirement
|
|
152
152
|
requirements:
|
|
153
153
|
- - ">="
|
|
154
154
|
- !ruby/object:Gem::Version
|
|
155
|
-
version:
|
|
155
|
+
version: '0'
|
|
156
156
|
- !ruby/object:Gem::Dependency
|
|
157
|
-
name:
|
|
157
|
+
name: logger
|
|
158
158
|
requirement: !ruby/object:Gem::Requirement
|
|
159
159
|
requirements:
|
|
160
160
|
- - ">="
|
|
161
161
|
- !ruby/object:Gem::Version
|
|
162
|
-
version:
|
|
162
|
+
version: 1.4.2
|
|
163
163
|
type: :runtime
|
|
164
164
|
prerelease: false
|
|
165
165
|
version_requirements: !ruby/object:Gem::Requirement
|
|
166
166
|
requirements:
|
|
167
167
|
- - ">="
|
|
168
168
|
- !ruby/object:Gem::Version
|
|
169
|
-
version:
|
|
169
|
+
version: 1.4.2
|
|
170
170
|
- !ruby/object:Gem::Dependency
|
|
171
|
-
name:
|
|
171
|
+
name: securerandom
|
|
172
172
|
requirement: !ruby/object:Gem::Requirement
|
|
173
173
|
requirements:
|
|
174
174
|
- - ">="
|
|
175
175
|
- !ruby/object:Gem::Version
|
|
176
|
-
version: 0.
|
|
176
|
+
version: '0.3'
|
|
177
177
|
type: :runtime
|
|
178
178
|
prerelease: false
|
|
179
179
|
version_requirements: !ruby/object:Gem::Requirement
|
|
180
180
|
requirements:
|
|
181
181
|
- - ">="
|
|
182
182
|
- !ruby/object:Gem::Version
|
|
183
|
-
version: 0.
|
|
183
|
+
version: '0.3'
|
|
184
184
|
- !ruby/object:Gem::Dependency
|
|
185
|
-
name:
|
|
185
|
+
name: uri
|
|
186
186
|
requirement: !ruby/object:Gem::Requirement
|
|
187
187
|
requirements:
|
|
188
188
|
- - ">="
|
|
189
189
|
- !ruby/object:Gem::Version
|
|
190
|
-
version:
|
|
190
|
+
version: 0.13.1
|
|
191
191
|
type: :runtime
|
|
192
192
|
prerelease: false
|
|
193
193
|
version_requirements: !ruby/object:Gem::Requirement
|
|
194
194
|
requirements:
|
|
195
195
|
- - ">="
|
|
196
196
|
- !ruby/object:Gem::Version
|
|
197
|
-
version:
|
|
197
|
+
version: 0.13.1
|
|
198
198
|
description: A toolkit of support libraries and Ruby core extensions extracted from
|
|
199
199
|
the Rails framework. Rich support for multibyte strings, internationalization, time
|
|
200
200
|
zones, and testing.
|
|
@@ -233,8 +233,10 @@ files:
|
|
|
233
233
|
- lib/active_support/concurrency/load_interlock_aware_monitor.rb
|
|
234
234
|
- lib/active_support/concurrency/null_lock.rb
|
|
235
235
|
- lib/active_support/concurrency/share_lock.rb
|
|
236
|
+
- lib/active_support/concurrency/thread_monitor.rb
|
|
236
237
|
- lib/active_support/configurable.rb
|
|
237
238
|
- lib/active_support/configuration_file.rb
|
|
239
|
+
- lib/active_support/continuous_integration.rb
|
|
238
240
|
- lib/active_support/core_ext.rb
|
|
239
241
|
- lib/active_support/core_ext/array.rb
|
|
240
242
|
- lib/active_support/core_ext/array/access.rb
|
|
@@ -327,7 +329,6 @@ files:
|
|
|
327
329
|
- lib/active_support/core_ext/range.rb
|
|
328
330
|
- lib/active_support/core_ext/range/compare_range.rb
|
|
329
331
|
- lib/active_support/core_ext/range/conversions.rb
|
|
330
|
-
- lib/active_support/core_ext/range/each.rb
|
|
331
332
|
- lib/active_support/core_ext/range/overlap.rb
|
|
332
333
|
- lib/active_support/core_ext/range/sole.rb
|
|
333
334
|
- lib/active_support/core_ext/regexp.rb
|
|
@@ -377,11 +378,14 @@ files:
|
|
|
377
378
|
- lib/active_support/duration.rb
|
|
378
379
|
- lib/active_support/duration/iso8601_parser.rb
|
|
379
380
|
- lib/active_support/duration/iso8601_serializer.rb
|
|
381
|
+
- lib/active_support/editor.rb
|
|
380
382
|
- lib/active_support/encrypted_configuration.rb
|
|
381
383
|
- lib/active_support/encrypted_file.rb
|
|
382
384
|
- lib/active_support/environment_inquirer.rb
|
|
383
385
|
- lib/active_support/error_reporter.rb
|
|
384
386
|
- lib/active_support/error_reporter/test_helper.rb
|
|
387
|
+
- lib/active_support/event_reporter.rb
|
|
388
|
+
- lib/active_support/event_reporter/test_helper.rb
|
|
385
389
|
- lib/active_support/evented_file_update_checker.rb
|
|
386
390
|
- lib/active_support/execution_context.rb
|
|
387
391
|
- lib/active_support/execution_context/test_helper.rb
|
|
@@ -455,6 +459,7 @@ files:
|
|
|
455
459
|
- lib/active_support/secure_compare_rotator.rb
|
|
456
460
|
- lib/active_support/security_utils.rb
|
|
457
461
|
- lib/active_support/string_inquirer.rb
|
|
462
|
+
- lib/active_support/structured_event_subscriber.rb
|
|
458
463
|
- lib/active_support/subscriber.rb
|
|
459
464
|
- lib/active_support/syntax_error_proxy.rb
|
|
460
465
|
- lib/active_support/tagged_logging.rb
|
|
@@ -466,9 +471,11 @@ files:
|
|
|
466
471
|
- lib/active_support/testing/declarative.rb
|
|
467
472
|
- lib/active_support/testing/deprecation.rb
|
|
468
473
|
- lib/active_support/testing/error_reporter_assertions.rb
|
|
474
|
+
- lib/active_support/testing/event_reporter_assertions.rb
|
|
469
475
|
- lib/active_support/testing/file_fixtures.rb
|
|
470
476
|
- lib/active_support/testing/isolation.rb
|
|
471
477
|
- lib/active_support/testing/method_call_assertions.rb
|
|
478
|
+
- lib/active_support/testing/notification_assertions.rb
|
|
472
479
|
- lib/active_support/testing/parallelization.rb
|
|
473
480
|
- lib/active_support/testing/parallelization/server.rb
|
|
474
481
|
- lib/active_support/testing/parallelization/worker.rb
|
|
@@ -494,10 +501,10 @@ licenses:
|
|
|
494
501
|
- MIT
|
|
495
502
|
metadata:
|
|
496
503
|
bug_tracker_uri: https://github.com/rails/rails/issues
|
|
497
|
-
changelog_uri: https://github.com/rails/rails/blob/v8.0
|
|
498
|
-
documentation_uri: https://api.rubyonrails.org/v8.0
|
|
504
|
+
changelog_uri: https://github.com/rails/rails/blob/v8.1.0/activesupport/CHANGELOG.md
|
|
505
|
+
documentation_uri: https://api.rubyonrails.org/v8.1.0/
|
|
499
506
|
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
|
500
|
-
source_code_uri: https://github.com/rails/rails/tree/v8.0
|
|
507
|
+
source_code_uri: https://github.com/rails/rails/tree/v8.1.0/activesupport
|
|
501
508
|
rubygems_mfa_required: 'true'
|
|
502
509
|
rdoc_options:
|
|
503
510
|
- "--encoding"
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "active_support/time_with_zone"
|
|
4
|
-
|
|
5
|
-
module ActiveSupport
|
|
6
|
-
module EachTimeWithZone # :nodoc:
|
|
7
|
-
def each(&block)
|
|
8
|
-
ensure_iteration_allowed
|
|
9
|
-
super
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def step(n = 1, &block)
|
|
13
|
-
ensure_iteration_allowed
|
|
14
|
-
super
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
private
|
|
18
|
-
def ensure_iteration_allowed
|
|
19
|
-
raise TypeError, "can't iterate from #{first.class}" if first.is_a?(TimeWithZone)
|
|
20
|
-
end
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
Range.prepend(ActiveSupport::EachTimeWithZone)
|