activesupport 7.1.6 → 8.1.1
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 +256 -1133
- data/README.rdoc +1 -1
- data/lib/active_support/array_inquirer.rb +1 -1
- data/lib/active_support/backtrace_cleaner.rb +81 -3
- data/lib/active_support/benchmark.rb +21 -0
- data/lib/active_support/benchmarkable.rb +3 -2
- data/lib/active_support/broadcast_logger.rb +65 -78
- data/lib/active_support/cache/file_store.rb +29 -14
- data/lib/active_support/cache/mem_cache_store.rb +42 -102
- data/lib/active_support/cache/memory_store.rb +11 -6
- data/lib/active_support/cache/null_store.rb +2 -2
- data/lib/active_support/cache/redis_cache_store.rb +58 -46
- data/lib/active_support/cache/serializer_with_fallback.rb +0 -23
- data/lib/active_support/cache/strategy/local_cache.rb +72 -27
- data/lib/active_support/cache/strategy/local_cache_middleware.rb +7 -7
- data/lib/active_support/cache.rb +146 -86
- data/lib/active_support/callbacks.rb +102 -126
- data/lib/active_support/class_attribute.rb +33 -0
- data/lib/active_support/code_generator.rb +9 -0
- data/lib/active_support/concurrency/load_interlock_aware_monitor.rb +8 -62
- data/lib/active_support/concurrency/share_lock.rb +0 -1
- data/lib/active_support/concurrency/thread_monitor.rb +55 -0
- data/lib/active_support/configurable.rb +34 -0
- data/lib/active_support/configuration_file.rb +15 -6
- data/lib/active_support/continuous_integration.rb +145 -0
- data/lib/active_support/core_ext/array/conversions.rb +3 -5
- data/lib/active_support/core_ext/array.rb +7 -7
- data/lib/active_support/core_ext/benchmark.rb +4 -14
- data/lib/active_support/core_ext/big_decimal.rb +1 -1
- data/lib/active_support/core_ext/class/attribute.rb +26 -19
- data/lib/active_support/core_ext/class/subclasses.rb +15 -35
- data/lib/active_support/core_ext/class.rb +2 -2
- data/lib/active_support/core_ext/date/blank.rb +4 -0
- data/lib/active_support/core_ext/date/conversions.rb +2 -2
- data/lib/active_support/core_ext/date.rb +5 -5
- data/lib/active_support/core_ext/date_and_time/compatibility.rb +1 -9
- data/lib/active_support/core_ext/date_time/blank.rb +4 -0
- data/lib/active_support/core_ext/date_time/compatibility.rb +3 -5
- data/lib/active_support/core_ext/date_time/conversions.rb +4 -6
- data/lib/active_support/core_ext/date_time.rb +5 -5
- data/lib/active_support/core_ext/digest/uuid.rb +6 -0
- data/lib/active_support/core_ext/digest.rb +1 -1
- data/lib/active_support/core_ext/enumerable.rb +25 -8
- data/lib/active_support/core_ext/erb/util.rb +10 -5
- data/lib/active_support/core_ext/file.rb +1 -1
- data/lib/active_support/core_ext/hash/deep_merge.rb +1 -0
- data/lib/active_support/core_ext/hash/except.rb +0 -12
- data/lib/active_support/core_ext/hash/keys.rb +4 -4
- 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/attr_internal.rb +16 -6
- data/lib/active_support/core_ext/module/delegation.rb +20 -163
- data/lib/active_support/core_ext/module/deprecation.rb +1 -4
- data/lib/active_support/core_ext/module/introspection.rb +3 -0
- data/lib/active_support/core_ext/module.rb +11 -11
- data/lib/active_support/core_ext/numeric/conversions.rb +3 -3
- data/lib/active_support/core_ext/numeric.rb +3 -3
- data/lib/active_support/core_ext/object/blank.rb +45 -1
- data/lib/active_support/core_ext/object/instance_variables.rb +11 -19
- data/lib/active_support/core_ext/object/json.rb +24 -11
- data/lib/active_support/core_ext/object/to_query.rb +7 -1
- data/lib/active_support/core_ext/object/try.rb +2 -2
- data/lib/active_support/core_ext/object/with.rb +5 -3
- data/lib/active_support/core_ext/object.rb +13 -13
- data/lib/active_support/core_ext/pathname/blank.rb +4 -0
- data/lib/active_support/core_ext/pathname.rb +2 -2
- data/lib/active_support/core_ext/range/overlap.rb +4 -4
- data/lib/active_support/core_ext/range/sole.rb +17 -0
- data/lib/active_support/core_ext/range.rb +4 -4
- data/lib/active_support/core_ext/securerandom.rb +4 -4
- data/lib/active_support/core_ext/string/conversions.rb +1 -1
- data/lib/active_support/core_ext/string/filters.rb +4 -4
- data/lib/active_support/core_ext/string/multibyte.rb +13 -4
- data/lib/active_support/core_ext/string/output_safety.rb +19 -19
- 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/thread/backtrace/location.rb +2 -7
- data/lib/active_support/core_ext/time/calculations.rb +25 -30
- data/lib/active_support/core_ext/time/compatibility.rb +2 -3
- data/lib/active_support/core_ext/time/conversions.rb +2 -2
- data/lib/active_support/core_ext/time/zones.rb +1 -1
- data/lib/active_support/core_ext/time.rb +5 -5
- data/lib/active_support/core_ext.rb +1 -2
- data/lib/active_support/current_attributes/test_helper.rb +2 -2
- data/lib/active_support/current_attributes.rb +58 -50
- data/lib/active_support/delegation.rb +200 -0
- data/lib/active_support/dependencies/autoload.rb +0 -12
- data/lib/active_support/dependencies/interlock.rb +11 -5
- data/lib/active_support/dependencies.rb +6 -2
- data/lib/active_support/deprecation/constant_accessor.rb +47 -26
- data/lib/active_support/deprecation/proxy_wrappers.rb +9 -12
- data/lib/active_support/deprecation/reporting.rb +5 -17
- data/lib/active_support/deprecation.rb +8 -5
- data/lib/active_support/descendants_tracker.rb +9 -87
- data/lib/active_support/duration/iso8601_parser.rb +2 -2
- data/lib/active_support/duration/iso8601_serializer.rb +1 -2
- data/lib/active_support/duration.rb +25 -16
- data/lib/active_support/editor.rb +70 -0
- data/lib/active_support/encrypted_configuration.rb +20 -2
- data/lib/active_support/encrypted_file.rb +1 -1
- data/lib/active_support/error_reporter.rb +121 -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 -3
- data/lib/active_support/execution_context.rb +64 -7
- data/lib/active_support/execution_wrapper.rb +1 -2
- data/lib/active_support/file_update_checker.rb +9 -7
- data/lib/active_support/fork_tracker.rb +2 -38
- 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 +66 -45
- data/lib/active_support/html_safe_translation.rb +3 -0
- data/lib/active_support/i18n_railtie.rb +19 -11
- 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 -17
- data/lib/active_support/json/decoding.rb +6 -4
- data/lib/active_support/json/encoding.rb +157 -21
- data/lib/active_support/lazy_load_hooks.rb +1 -1
- data/lib/active_support/log_subscriber.rb +2 -18
- data/lib/active_support/logger.rb +15 -2
- data/lib/active_support/logger_thread_safe_level.rb +4 -9
- data/lib/active_support/message_encryptors.rb +54 -2
- data/lib/active_support/message_pack/extensions.rb +20 -2
- data/lib/active_support/message_verifier.rb +21 -0
- data/lib/active_support/message_verifiers.rb +57 -3
- data/lib/active_support/messages/rotation_coordinator.rb +9 -0
- data/lib/active_support/messages/rotator.rb +10 -0
- data/lib/active_support/multibyte/chars.rb +14 -4
- data/lib/active_support/multibyte.rb +4 -0
- data/lib/active_support/notifications/fanout.rb +68 -50
- data/lib/active_support/notifications/instrumenter.rb +22 -19
- data/lib/active_support/notifications.rb +28 -27
- data/lib/active_support/number_helper/number_converter.rb +2 -2
- data/lib/active_support/number_helper.rb +22 -0
- data/lib/active_support/option_merger.rb +2 -2
- data/lib/active_support/ordered_options.rb +53 -15
- data/lib/active_support/railtie.rb +36 -20
- data/lib/active_support/string_inquirer.rb +1 -1
- data/lib/active_support/structured_event_subscriber.rb +99 -0
- data/lib/active_support/subscriber.rb +1 -5
- data/lib/active_support/syntax_error_proxy.rb +3 -0
- data/lib/active_support/tagged_logging.rb +5 -1
- data/lib/active_support/test_case.rb +63 -6
- data/lib/active_support/testing/assertions.rb +113 -27
- data/lib/active_support/testing/constant_stubbing.rb +30 -8
- data/lib/active_support/testing/deprecation.rb +5 -12
- 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/isolation.rb +19 -9
- data/lib/active_support/testing/method_call_assertions.rb +2 -16
- data/lib/active_support/testing/notification_assertions.rb +92 -0
- data/lib/active_support/testing/parallelization/server.rb +18 -2
- data/lib/active_support/testing/parallelization/worker.rb +4 -2
- data/lib/active_support/testing/parallelization.rb +25 -1
- data/lib/active_support/testing/tests_without_assertions.rb +19 -0
- data/lib/active_support/testing/time_helpers.rb +11 -6
- data/lib/active_support/time_with_zone.rb +39 -26
- data/lib/active_support/values/time_zone.rb +26 -17
- data/lib/active_support/xml_mini.rb +14 -4
- data/lib/active_support.rb +22 -9
- metadata +31 -17
- data/lib/active_support/core_ext/range/each.rb +0 -24
- data/lib/active_support/deprecation/instance_delegator.rb +0 -65
- data/lib/active_support/proxy_object.rb +0 -17
- data/lib/active_support/ruby_features.rb +0 -7
- data/lib/active_support/testing/strict_warnings.rb +0 -39
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
|
|
@@ -57,12 +62,13 @@ module ActiveSupport
|
|
|
57
62
|
|
|
58
63
|
eager_autoload do
|
|
59
64
|
autoload :BacktraceCleaner
|
|
60
|
-
autoload :
|
|
65
|
+
autoload :Benchmark
|
|
61
66
|
autoload :Benchmarkable
|
|
62
67
|
autoload :Cache
|
|
63
68
|
autoload :Callbacks
|
|
64
|
-
autoload :
|
|
69
|
+
autoload :ClassAttribute
|
|
65
70
|
autoload :Deprecation
|
|
71
|
+
autoload :Delegation
|
|
66
72
|
autoload :Digest
|
|
67
73
|
autoload :ExecutionContext
|
|
68
74
|
autoload :Gzip
|
|
@@ -97,10 +103,16 @@ module ActiveSupport
|
|
|
97
103
|
|
|
98
104
|
cattr_accessor :test_order # :nodoc:
|
|
99
105
|
cattr_accessor :test_parallelization_threshold, default: 50 # :nodoc:
|
|
106
|
+
cattr_accessor :parallelize_test_databases, default: true # :nodoc:
|
|
100
107
|
|
|
101
108
|
@error_reporter = ActiveSupport::ErrorReporter.new
|
|
102
109
|
singleton_class.attr_accessor :error_reporter # :nodoc:
|
|
103
110
|
|
|
111
|
+
@event_reporter = ActiveSupport::EventReporter.new
|
|
112
|
+
singleton_class.attr_accessor :event_reporter # :nodoc:
|
|
113
|
+
|
|
114
|
+
cattr_accessor :filter_parameters, default: [] # :nodoc:
|
|
115
|
+
|
|
104
116
|
def self.cache_format_version
|
|
105
117
|
Cache.format_version
|
|
106
118
|
end
|
|
@@ -110,17 +122,18 @@ module ActiveSupport
|
|
|
110
122
|
end
|
|
111
123
|
|
|
112
124
|
def self.to_time_preserves_timezone
|
|
113
|
-
|
|
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
|
|
114
129
|
end
|
|
115
130
|
|
|
116
131
|
def self.to_time_preserves_timezone=(value)
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
)
|
|
121
|
-
end
|
|
132
|
+
ActiveSupport.deprecator.warn(
|
|
133
|
+
"`config.active_support.to_time_preserves_timezone` is deprecated and will be removed in Rails 8.2"
|
|
134
|
+
)
|
|
122
135
|
|
|
123
|
-
|
|
136
|
+
@to_time_preserves_timezone = value
|
|
124
137
|
end
|
|
125
138
|
|
|
126
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:
|
|
4
|
+
version: 8.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Heinemeier Hansson
|
|
@@ -36,6 +36,9 @@ dependencies:
|
|
|
36
36
|
- - "~>"
|
|
37
37
|
- !ruby/object:Gem::Version
|
|
38
38
|
version: '2.0'
|
|
39
|
+
- - ">="
|
|
40
|
+
- !ruby/object:Gem::Version
|
|
41
|
+
version: 2.0.5
|
|
39
42
|
type: :runtime
|
|
40
43
|
prerelease: false
|
|
41
44
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -43,6 +46,9 @@ dependencies:
|
|
|
43
46
|
- - "~>"
|
|
44
47
|
- !ruby/object:Gem::Version
|
|
45
48
|
version: '2.0'
|
|
49
|
+
- - ">="
|
|
50
|
+
- !ruby/object:Gem::Version
|
|
51
|
+
version: 2.0.5
|
|
46
52
|
- !ruby/object:Gem::Dependency
|
|
47
53
|
name: concurrent-ruby
|
|
48
54
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -52,7 +58,7 @@ dependencies:
|
|
|
52
58
|
version: '1.0'
|
|
53
59
|
- - ">="
|
|
54
60
|
- !ruby/object:Gem::Version
|
|
55
|
-
version: 1.
|
|
61
|
+
version: 1.3.1
|
|
56
62
|
type: :runtime
|
|
57
63
|
prerelease: false
|
|
58
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -62,7 +68,7 @@ dependencies:
|
|
|
62
68
|
version: '1.0'
|
|
63
69
|
- - ">="
|
|
64
70
|
- !ruby/object:Gem::Version
|
|
65
|
-
version: 1.
|
|
71
|
+
version: 1.3.1
|
|
66
72
|
- !ruby/object:Gem::Dependency
|
|
67
73
|
name: connection_pool
|
|
68
74
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -120,7 +126,7 @@ dependencies:
|
|
|
120
126
|
- !ruby/object:Gem::Version
|
|
121
127
|
version: '0'
|
|
122
128
|
- !ruby/object:Gem::Dependency
|
|
123
|
-
name:
|
|
129
|
+
name: bigdecimal
|
|
124
130
|
requirement: !ruby/object:Gem::Requirement
|
|
125
131
|
requirements:
|
|
126
132
|
- - ">="
|
|
@@ -134,7 +140,7 @@ dependencies:
|
|
|
134
140
|
- !ruby/object:Gem::Version
|
|
135
141
|
version: '0'
|
|
136
142
|
- !ruby/object:Gem::Dependency
|
|
137
|
-
name:
|
|
143
|
+
name: json
|
|
138
144
|
requirement: !ruby/object:Gem::Requirement
|
|
139
145
|
requirements:
|
|
140
146
|
- - ">="
|
|
@@ -176,19 +182,19 @@ dependencies:
|
|
|
176
182
|
- !ruby/object:Gem::Version
|
|
177
183
|
version: '0.3'
|
|
178
184
|
- !ruby/object:Gem::Dependency
|
|
179
|
-
name:
|
|
185
|
+
name: uri
|
|
180
186
|
requirement: !ruby/object:Gem::Requirement
|
|
181
187
|
requirements:
|
|
182
188
|
- - ">="
|
|
183
189
|
- !ruby/object:Gem::Version
|
|
184
|
-
version:
|
|
190
|
+
version: 0.13.1
|
|
185
191
|
type: :runtime
|
|
186
192
|
prerelease: false
|
|
187
193
|
version_requirements: !ruby/object:Gem::Requirement
|
|
188
194
|
requirements:
|
|
189
195
|
- - ">="
|
|
190
196
|
- !ruby/object:Gem::Version
|
|
191
|
-
version:
|
|
197
|
+
version: 0.13.1
|
|
192
198
|
description: A toolkit of support libraries and Ruby core extensions extracted from
|
|
193
199
|
the Rails framework. Rich support for multibyte strings, internationalization, time
|
|
194
200
|
zones, and testing.
|
|
@@ -205,6 +211,7 @@ files:
|
|
|
205
211
|
- lib/active_support/all.rb
|
|
206
212
|
- lib/active_support/array_inquirer.rb
|
|
207
213
|
- lib/active_support/backtrace_cleaner.rb
|
|
214
|
+
- lib/active_support/benchmark.rb
|
|
208
215
|
- lib/active_support/benchmarkable.rb
|
|
209
216
|
- lib/active_support/broadcast_logger.rb
|
|
210
217
|
- lib/active_support/builder.rb
|
|
@@ -220,13 +227,16 @@ files:
|
|
|
220
227
|
- lib/active_support/cache/strategy/local_cache.rb
|
|
221
228
|
- lib/active_support/cache/strategy/local_cache_middleware.rb
|
|
222
229
|
- lib/active_support/callbacks.rb
|
|
230
|
+
- lib/active_support/class_attribute.rb
|
|
223
231
|
- lib/active_support/code_generator.rb
|
|
224
232
|
- lib/active_support/concern.rb
|
|
225
233
|
- lib/active_support/concurrency/load_interlock_aware_monitor.rb
|
|
226
234
|
- lib/active_support/concurrency/null_lock.rb
|
|
227
235
|
- lib/active_support/concurrency/share_lock.rb
|
|
236
|
+
- lib/active_support/concurrency/thread_monitor.rb
|
|
228
237
|
- lib/active_support/configurable.rb
|
|
229
238
|
- lib/active_support/configuration_file.rb
|
|
239
|
+
- lib/active_support/continuous_integration.rb
|
|
230
240
|
- lib/active_support/core_ext.rb
|
|
231
241
|
- lib/active_support/core_ext/array.rb
|
|
232
242
|
- lib/active_support/core_ext/array/access.rb
|
|
@@ -319,8 +329,8 @@ files:
|
|
|
319
329
|
- lib/active_support/core_ext/range.rb
|
|
320
330
|
- lib/active_support/core_ext/range/compare_range.rb
|
|
321
331
|
- lib/active_support/core_ext/range/conversions.rb
|
|
322
|
-
- lib/active_support/core_ext/range/each.rb
|
|
323
332
|
- lib/active_support/core_ext/range/overlap.rb
|
|
333
|
+
- lib/active_support/core_ext/range/sole.rb
|
|
324
334
|
- lib/active_support/core_ext/regexp.rb
|
|
325
335
|
- lib/active_support/core_ext/securerandom.rb
|
|
326
336
|
- lib/active_support/core_ext/string.rb
|
|
@@ -349,6 +359,7 @@ files:
|
|
|
349
359
|
- lib/active_support/current_attributes.rb
|
|
350
360
|
- lib/active_support/current_attributes/test_helper.rb
|
|
351
361
|
- lib/active_support/deep_mergeable.rb
|
|
362
|
+
- lib/active_support/delegation.rb
|
|
352
363
|
- lib/active_support/dependencies.rb
|
|
353
364
|
- lib/active_support/dependencies/autoload.rb
|
|
354
365
|
- lib/active_support/dependencies/interlock.rb
|
|
@@ -358,7 +369,6 @@ files:
|
|
|
358
369
|
- lib/active_support/deprecation/constant_accessor.rb
|
|
359
370
|
- lib/active_support/deprecation/deprecators.rb
|
|
360
371
|
- lib/active_support/deprecation/disallowed.rb
|
|
361
|
-
- lib/active_support/deprecation/instance_delegator.rb
|
|
362
372
|
- lib/active_support/deprecation/method_wrappers.rb
|
|
363
373
|
- lib/active_support/deprecation/proxy_wrappers.rb
|
|
364
374
|
- lib/active_support/deprecation/reporting.rb
|
|
@@ -368,11 +378,14 @@ files:
|
|
|
368
378
|
- lib/active_support/duration.rb
|
|
369
379
|
- lib/active_support/duration/iso8601_parser.rb
|
|
370
380
|
- lib/active_support/duration/iso8601_serializer.rb
|
|
381
|
+
- lib/active_support/editor.rb
|
|
371
382
|
- lib/active_support/encrypted_configuration.rb
|
|
372
383
|
- lib/active_support/encrypted_file.rb
|
|
373
384
|
- lib/active_support/environment_inquirer.rb
|
|
374
385
|
- lib/active_support/error_reporter.rb
|
|
375
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
|
|
376
389
|
- lib/active_support/evented_file_update_checker.rb
|
|
377
390
|
- lib/active_support/execution_context.rb
|
|
378
391
|
- lib/active_support/execution_context/test_helper.rb
|
|
@@ -439,15 +452,14 @@ files:
|
|
|
439
452
|
- lib/active_support/ordered_hash.rb
|
|
440
453
|
- lib/active_support/ordered_options.rb
|
|
441
454
|
- lib/active_support/parameter_filter.rb
|
|
442
|
-
- lib/active_support/proxy_object.rb
|
|
443
455
|
- lib/active_support/rails.rb
|
|
444
456
|
- lib/active_support/railtie.rb
|
|
445
457
|
- lib/active_support/reloader.rb
|
|
446
458
|
- lib/active_support/rescuable.rb
|
|
447
|
-
- lib/active_support/ruby_features.rb
|
|
448
459
|
- lib/active_support/secure_compare_rotator.rb
|
|
449
460
|
- lib/active_support/security_utils.rb
|
|
450
461
|
- lib/active_support/string_inquirer.rb
|
|
462
|
+
- lib/active_support/structured_event_subscriber.rb
|
|
451
463
|
- lib/active_support/subscriber.rb
|
|
452
464
|
- lib/active_support/syntax_error_proxy.rb
|
|
453
465
|
- lib/active_support/tagged_logging.rb
|
|
@@ -459,17 +471,19 @@ files:
|
|
|
459
471
|
- lib/active_support/testing/declarative.rb
|
|
460
472
|
- lib/active_support/testing/deprecation.rb
|
|
461
473
|
- lib/active_support/testing/error_reporter_assertions.rb
|
|
474
|
+
- lib/active_support/testing/event_reporter_assertions.rb
|
|
462
475
|
- lib/active_support/testing/file_fixtures.rb
|
|
463
476
|
- lib/active_support/testing/isolation.rb
|
|
464
477
|
- lib/active_support/testing/method_call_assertions.rb
|
|
478
|
+
- lib/active_support/testing/notification_assertions.rb
|
|
465
479
|
- lib/active_support/testing/parallelization.rb
|
|
466
480
|
- lib/active_support/testing/parallelization/server.rb
|
|
467
481
|
- lib/active_support/testing/parallelization/worker.rb
|
|
468
482
|
- lib/active_support/testing/parallelize_executor.rb
|
|
469
483
|
- lib/active_support/testing/setup_and_teardown.rb
|
|
470
484
|
- lib/active_support/testing/stream.rb
|
|
471
|
-
- lib/active_support/testing/strict_warnings.rb
|
|
472
485
|
- lib/active_support/testing/tagged_logging.rb
|
|
486
|
+
- lib/active_support/testing/tests_without_assertions.rb
|
|
473
487
|
- lib/active_support/testing/time_helpers.rb
|
|
474
488
|
- lib/active_support/time.rb
|
|
475
489
|
- lib/active_support/time_with_zone.rb
|
|
@@ -487,10 +501,10 @@ licenses:
|
|
|
487
501
|
- MIT
|
|
488
502
|
metadata:
|
|
489
503
|
bug_tracker_uri: https://github.com/rails/rails/issues
|
|
490
|
-
changelog_uri: https://github.com/rails/rails/blob/
|
|
491
|
-
documentation_uri: https://api.rubyonrails.org/
|
|
504
|
+
changelog_uri: https://github.com/rails/rails/blob/v8.1.1/activesupport/CHANGELOG.md
|
|
505
|
+
documentation_uri: https://api.rubyonrails.org/v8.1.1/
|
|
492
506
|
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
|
493
|
-
source_code_uri: https://github.com/rails/rails/tree/
|
|
507
|
+
source_code_uri: https://github.com/rails/rails/tree/v8.1.1/activesupport
|
|
494
508
|
rubygems_mfa_required: 'true'
|
|
495
509
|
rdoc_options:
|
|
496
510
|
- "--encoding"
|
|
@@ -501,7 +515,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
501
515
|
requirements:
|
|
502
516
|
- - ">="
|
|
503
517
|
- !ruby/object:Gem::Version
|
|
504
|
-
version: 2.
|
|
518
|
+
version: 3.2.0
|
|
505
519
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
506
520
|
requirements:
|
|
507
521
|
- - ">="
|
|
@@ -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)
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module ActiveSupport
|
|
4
|
-
class Deprecation
|
|
5
|
-
module InstanceDelegator # :nodoc:
|
|
6
|
-
def self.included(base)
|
|
7
|
-
base.extend(ClassMethods)
|
|
8
|
-
base.singleton_class.prepend(OverrideDelegators)
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
module ClassMethods # :nodoc:
|
|
12
|
-
MUTEX = Mutex.new
|
|
13
|
-
private_constant :MUTEX
|
|
14
|
-
|
|
15
|
-
def include(included_module)
|
|
16
|
-
included_module.instance_methods.each { |m| method_added(m) }
|
|
17
|
-
super
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
def method_added(method_name)
|
|
21
|
-
use_instead =
|
|
22
|
-
case method_name
|
|
23
|
-
when :silence, :behavior=, :disallowed_behavior=, :disallowed_warnings=, :silenced=, :debug=
|
|
24
|
-
target = "(defined?(Rails.application.deprecators) ? Rails.application.deprecators : ActiveSupport::Deprecation._instance)"
|
|
25
|
-
"Rails.application.deprecators.#{method_name}"
|
|
26
|
-
when :warn, :deprecate_methods, :gem_name, :gem_name=, :deprecation_horizon, :deprecation_horizon=
|
|
27
|
-
"your own Deprecation object"
|
|
28
|
-
else
|
|
29
|
-
"Rails.application.deprecators[framework].#{method_name} where framework is for example :active_record"
|
|
30
|
-
end
|
|
31
|
-
args = /[^\]]=\z/.match?(method_name) ? "arg" : "..."
|
|
32
|
-
target ||= "ActiveSupport::Deprecation._instance"
|
|
33
|
-
singleton_class.module_eval <<~RUBY, __FILE__, __LINE__ + 1
|
|
34
|
-
def #{method_name}(#{args})
|
|
35
|
-
#{target}.#{method_name}(#{args})
|
|
36
|
-
ensure
|
|
37
|
-
ActiveSupport.deprecator.warn("Calling #{method_name} on ActiveSupport::Deprecation is deprecated and will be removed from Rails (use #{use_instead} instead)")
|
|
38
|
-
end
|
|
39
|
-
RUBY
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
def instance
|
|
43
|
-
ActiveSupport.deprecator.warn("ActiveSupport::Deprecation.instance is deprecated (use your own Deprecation object)")
|
|
44
|
-
_instance
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
def _instance
|
|
48
|
-
@_instance ||= MUTEX.synchronize { @_instance ||= new }
|
|
49
|
-
end
|
|
50
|
-
end
|
|
51
|
-
|
|
52
|
-
module OverrideDelegators # :nodoc:
|
|
53
|
-
def warn(message = nil, callstack = nil)
|
|
54
|
-
callstack ||= caller_locations(2)
|
|
55
|
-
super
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
def deprecation_warning(deprecated_method_name, message = nil, caller_backtrace = nil)
|
|
59
|
-
caller_backtrace ||= caller_locations(2)
|
|
60
|
-
super
|
|
61
|
-
end
|
|
62
|
-
end
|
|
63
|
-
end
|
|
64
|
-
end
|
|
65
|
-
end
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module ActiveSupport
|
|
4
|
-
# = Active Support Proxy \Object
|
|
5
|
-
#
|
|
6
|
-
# A class with no predefined methods that behaves similarly to Builder's
|
|
7
|
-
# BlankSlate. Used for proxy classes.
|
|
8
|
-
class ProxyObject < ::BasicObject
|
|
9
|
-
undef_method :==
|
|
10
|
-
undef_method :equal?
|
|
11
|
-
|
|
12
|
-
# Let ActiveSupport::ProxyObject at least raise exceptions.
|
|
13
|
-
def raise(*args)
|
|
14
|
-
::Object.send(:raise, *args)
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
end
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
$VERBOSE = true
|
|
4
|
-
Warning[:deprecated] = true
|
|
5
|
-
|
|
6
|
-
module ActiveSupport
|
|
7
|
-
module RaiseWarnings # :nodoc:
|
|
8
|
-
PROJECT_ROOT = File.expand_path("../../../../", __dir__)
|
|
9
|
-
ALLOWED_WARNINGS = Regexp.union(
|
|
10
|
-
/circular require considered harmful.*delayed_job/, # Bug in delayed job.
|
|
11
|
-
|
|
12
|
-
# Expected non-verbose warning emitted by Rails.
|
|
13
|
-
/Ignoring .*\.yml because it has expired/,
|
|
14
|
-
/Failed to validate the schema cache because/,
|
|
15
|
-
)
|
|
16
|
-
|
|
17
|
-
SUPPRESSED_WARNINGS = Regexp.union(
|
|
18
|
-
# TODO: remove if https://github.com/mikel/mail/pull/1557 or similar fix
|
|
19
|
-
%r{/lib/mail/parsers/.*statement not reached},
|
|
20
|
-
%r{/lib/mail/parsers/.*assigned but unused variable - disp_type_s},
|
|
21
|
-
%r{/lib/mail/parsers/.*assigned but unused variable - testEof}
|
|
22
|
-
)
|
|
23
|
-
|
|
24
|
-
def warn(message, *)
|
|
25
|
-
return if SUPPRESSED_WARNINGS.match?(message)
|
|
26
|
-
|
|
27
|
-
super
|
|
28
|
-
|
|
29
|
-
return unless message.include?(PROJECT_ROOT)
|
|
30
|
-
return if ALLOWED_WARNINGS.match?(message)
|
|
31
|
-
return unless ENV["RAILS_STRICT_WARNINGS"] || ENV["CI"]
|
|
32
|
-
|
|
33
|
-
raise message
|
|
34
|
-
end
|
|
35
|
-
ruby2_keywords :warn if respond_to?(:ruby2_keywords, true)
|
|
36
|
-
end
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
Warning.singleton_class.prepend(ActiveSupport::RaiseWarnings)
|