activesupport 7.2.3.1 → 8.1.4.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.
Files changed (135) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +584 -234
  3. data/lib/active_support/backtrace_cleaner.rb +72 -1
  4. data/lib/active_support/benchmark.rb +21 -0
  5. data/lib/active_support/benchmarkable.rb +3 -2
  6. data/lib/active_support/cache/file_store.rb +13 -2
  7. data/lib/active_support/cache/mem_cache_store.rb +17 -14
  8. data/lib/active_support/cache/memory_store.rb +9 -3
  9. data/lib/active_support/cache/redis_cache_store.rb +51 -34
  10. data/lib/active_support/cache/strategy/local_cache.rb +17 -8
  11. data/lib/active_support/cache/strategy/local_cache_middleware.rb +7 -7
  12. data/lib/active_support/cache.rb +86 -18
  13. data/lib/active_support/callbacks.rb +25 -11
  14. data/lib/active_support/class_attribute.rb +33 -0
  15. data/lib/active_support/code_generator.rb +9 -0
  16. data/lib/active_support/concurrency/load_interlock_aware_monitor.rb +8 -62
  17. data/lib/active_support/concurrency/share_lock.rb +0 -1
  18. data/lib/active_support/concurrency/thread_monitor.rb +55 -0
  19. data/lib/active_support/configurable.rb +34 -0
  20. data/lib/active_support/configuration_file.rb +15 -6
  21. data/lib/active_support/continuous_integration.rb +145 -0
  22. data/lib/active_support/core_ext/array/conversions.rb +3 -3
  23. data/lib/active_support/core_ext/array.rb +7 -7
  24. data/lib/active_support/core_ext/benchmark.rb +0 -16
  25. data/lib/active_support/core_ext/big_decimal.rb +1 -1
  26. data/lib/active_support/core_ext/class/attribute.rb +24 -18
  27. data/lib/active_support/core_ext/class.rb +2 -2
  28. data/lib/active_support/core_ext/date/conversions.rb +2 -0
  29. data/lib/active_support/core_ext/date.rb +5 -5
  30. data/lib/active_support/core_ext/date_and_time/compatibility.rb +0 -35
  31. data/lib/active_support/core_ext/date_time/calculations.rb +1 -0
  32. data/lib/active_support/core_ext/date_time/compatibility.rb +3 -5
  33. data/lib/active_support/core_ext/date_time.rb +5 -5
  34. data/lib/active_support/core_ext/digest.rb +1 -1
  35. data/lib/active_support/core_ext/enumerable.rb +8 -3
  36. data/lib/active_support/core_ext/erb/util.rb +3 -3
  37. data/lib/active_support/core_ext/file.rb +1 -1
  38. data/lib/active_support/core_ext/hash/deep_merge.rb +1 -0
  39. data/lib/active_support/core_ext/hash/except.rb +0 -12
  40. data/lib/active_support/core_ext/hash.rb +8 -8
  41. data/lib/active_support/core_ext/integer.rb +3 -3
  42. data/lib/active_support/core_ext/kernel.rb +3 -3
  43. data/lib/active_support/core_ext/module/attr_internal.rb +3 -4
  44. data/lib/active_support/core_ext/module.rb +11 -11
  45. data/lib/active_support/core_ext/numeric.rb +3 -3
  46. data/lib/active_support/core_ext/object/instance_variables.rb +1 -1
  47. data/lib/active_support/core_ext/object/json.rb +24 -11
  48. data/lib/active_support/core_ext/object/to_query.rb +7 -1
  49. data/lib/active_support/core_ext/object.rb +13 -13
  50. data/lib/active_support/core_ext/pathname.rb +2 -2
  51. data/lib/active_support/core_ext/range/compare_range.rb +2 -14
  52. data/lib/active_support/core_ext/range/overlap.rb +3 -3
  53. data/lib/active_support/core_ext/range/sole.rb +2 -0
  54. data/lib/active_support/core_ext/range.rb +4 -5
  55. data/lib/active_support/core_ext/string/filters.rb +2 -0
  56. data/lib/active_support/core_ext/string/inflections.rb +1 -1
  57. data/lib/active_support/core_ext/string/multibyte.rb +10 -1
  58. data/lib/active_support/core_ext/string/output_safety.rb +27 -13
  59. data/lib/active_support/core_ext/string.rb +13 -13
  60. data/lib/active_support/core_ext/symbol.rb +1 -1
  61. data/lib/active_support/core_ext/thread/backtrace/location.rb +2 -7
  62. data/lib/active_support/core_ext/time/calculations.rb +11 -2
  63. data/lib/active_support/core_ext/time/compatibility.rb +2 -27
  64. data/lib/active_support/core_ext/time/conversions.rb +2 -0
  65. data/lib/active_support/core_ext/time.rb +5 -5
  66. data/lib/active_support/current_attributes/test_helper.rb +2 -2
  67. data/lib/active_support/current_attributes.rb +13 -10
  68. data/lib/active_support/delegation.rb +25 -44
  69. data/lib/active_support/dependencies/interlock.rb +11 -5
  70. data/lib/active_support/dependencies.rb +6 -2
  71. data/lib/active_support/deprecation/reporting.rb +4 -21
  72. data/lib/active_support/deprecation.rb +1 -1
  73. data/lib/active_support/duration.rb +20 -16
  74. data/lib/active_support/editor.rb +70 -0
  75. data/lib/active_support/encrypted_configuration.rb +20 -2
  76. data/lib/active_support/error_reporter.rb +76 -2
  77. data/lib/active_support/event_reporter/test_helper.rb +32 -0
  78. data/lib/active_support/event_reporter.rb +592 -0
  79. data/lib/active_support/evented_file_update_checker.rb +5 -2
  80. data/lib/active_support/execution_context.rb +75 -7
  81. data/lib/active_support/file_update_checker.rb +7 -5
  82. data/lib/active_support/gem_version.rb +3 -3
  83. data/lib/active_support/gzip.rb +1 -0
  84. data/lib/active_support/hash_with_indifferent_access.rb +44 -24
  85. data/lib/active_support/i18n_railtie.rb +19 -11
  86. data/lib/active_support/inflector/inflections.rb +34 -16
  87. data/lib/active_support/inflector/methods.rb +6 -22
  88. data/lib/active_support/inflector/transliterate.rb +18 -10
  89. data/lib/active_support/isolated_execution_state.rb +17 -17
  90. data/lib/active_support/json/decoding.rb +9 -3
  91. data/lib/active_support/json/encoding.rb +149 -19
  92. data/lib/active_support/log_subscriber.rb +2 -6
  93. data/lib/active_support/logger_thread_safe_level.rb +6 -3
  94. data/lib/active_support/message_encryptors.rb +52 -0
  95. data/lib/active_support/message_pack/extensions.rb +23 -1
  96. data/lib/active_support/message_verifiers.rb +52 -0
  97. data/lib/active_support/messages/rotation_coordinator.rb +9 -0
  98. data/lib/active_support/messages/rotator.rb +5 -0
  99. data/lib/active_support/messages/serializer_with_fallback.rb +1 -1
  100. data/lib/active_support/multibyte/chars.rb +8 -1
  101. data/lib/active_support/multibyte.rb +4 -0
  102. data/lib/active_support/notifications/fanout.rb +64 -43
  103. data/lib/active_support/notifications/instrumenter.rb +1 -1
  104. data/lib/active_support/notifications.rb +2 -2
  105. data/lib/active_support/number_helper/number_converter.rb +4 -1
  106. data/lib/active_support/number_helper/number_to_currency_converter.rb +1 -1
  107. data/lib/active_support/number_helper/number_to_delimited_converter.rb +3 -4
  108. data/lib/active_support/number_helper/number_to_phone_converter.rb +3 -7
  109. data/lib/active_support/number_helper/rounding_helper.rb +1 -1
  110. data/lib/active_support/number_helper.rb +22 -0
  111. data/lib/active_support/ordered_options.rb +2 -2
  112. data/lib/active_support/railtie.rb +32 -9
  113. data/lib/active_support/security_utils.rb +4 -5
  114. data/lib/active_support/structured_event_subscriber.rb +99 -0
  115. data/lib/active_support/subscriber.rb +0 -5
  116. data/lib/active_support/syntax_error_proxy.rb +9 -1
  117. data/lib/active_support/tagged_logging.rb +5 -0
  118. data/lib/active_support/test_case.rb +67 -6
  119. data/lib/active_support/testing/assertions.rb +118 -27
  120. data/lib/active_support/testing/autorun.rb +5 -0
  121. data/lib/active_support/testing/error_reporter_assertions.rb +17 -0
  122. data/lib/active_support/testing/event_reporter_assertions.rb +227 -0
  123. data/lib/active_support/testing/isolation.rb +0 -2
  124. data/lib/active_support/testing/notification_assertions.rb +92 -0
  125. data/lib/active_support/testing/parallelization/worker.rb +7 -1
  126. data/lib/active_support/testing/parallelization.rb +17 -0
  127. data/lib/active_support/testing/tests_without_assertions.rb +1 -1
  128. data/lib/active_support/testing/time_helpers.rb +9 -4
  129. data/lib/active_support/time_with_zone.rb +36 -23
  130. data/lib/active_support/values/time_zone.rb +22 -13
  131. data/lib/active_support/xml_mini.rb +1 -2
  132. data/lib/active_support.rb +21 -9
  133. metadata +33 -17
  134. data/lib/active_support/core_ext/range/each.rb +0 -24
  135. data/lib/active_support/proxy_object.rb +0 -20
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: 7.2.3.1
4
+ version: 8.1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
@@ -90,9 +90,6 @@ dependencies:
90
90
  - - ">="
91
91
  - !ruby/object:Gem::Version
92
92
  version: '5.1'
93
- - - "<"
94
- - !ruby/object:Gem::Version
95
- version: '6'
96
93
  type: :runtime
97
94
  prerelease: false
98
95
  version_requirements: !ruby/object:Gem::Requirement
@@ -100,9 +97,6 @@ dependencies:
100
97
  - - ">="
101
98
  - !ruby/object:Gem::Version
102
99
  version: '5.1'
103
- - - "<"
104
- - !ruby/object:Gem::Version
105
- version: '6'
106
100
  - !ruby/object:Gem::Dependency
107
101
  name: base64
108
102
  requirement: !ruby/object:Gem::Requirement
@@ -145,6 +139,20 @@ dependencies:
145
139
  - - ">="
146
140
  - !ruby/object:Gem::Version
147
141
  version: '0'
142
+ - !ruby/object:Gem::Dependency
143
+ name: json
144
+ requirement: !ruby/object:Gem::Requirement
145
+ requirements:
146
+ - - ">="
147
+ - !ruby/object:Gem::Version
148
+ version: '0'
149
+ type: :runtime
150
+ prerelease: false
151
+ version_requirements: !ruby/object:Gem::Requirement
152
+ requirements:
153
+ - - ">="
154
+ - !ruby/object:Gem::Version
155
+ version: '0'
148
156
  - !ruby/object:Gem::Dependency
149
157
  name: logger
150
158
  requirement: !ruby/object:Gem::Requirement
@@ -174,19 +182,19 @@ dependencies:
174
182
  - !ruby/object:Gem::Version
175
183
  version: '0.3'
176
184
  - !ruby/object:Gem::Dependency
177
- name: benchmark
185
+ name: uri
178
186
  requirement: !ruby/object:Gem::Requirement
179
187
  requirements:
180
188
  - - ">="
181
189
  - !ruby/object:Gem::Version
182
- version: '0.3'
190
+ version: 0.13.1
183
191
  type: :runtime
184
192
  prerelease: false
185
193
  version_requirements: !ruby/object:Gem::Requirement
186
194
  requirements:
187
195
  - - ">="
188
196
  - !ruby/object:Gem::Version
189
- version: '0.3'
197
+ version: 0.13.1
190
198
  description: A toolkit of support libraries and Ruby core extensions extracted from
191
199
  the Rails framework. Rich support for multibyte strings, internationalization, time
192
200
  zones, and testing.
@@ -203,6 +211,7 @@ files:
203
211
  - lib/active_support/all.rb
204
212
  - lib/active_support/array_inquirer.rb
205
213
  - lib/active_support/backtrace_cleaner.rb
214
+ - lib/active_support/benchmark.rb
206
215
  - lib/active_support/benchmarkable.rb
207
216
  - lib/active_support/broadcast_logger.rb
208
217
  - lib/active_support/builder.rb
@@ -218,13 +227,16 @@ files:
218
227
  - lib/active_support/cache/strategy/local_cache.rb
219
228
  - lib/active_support/cache/strategy/local_cache_middleware.rb
220
229
  - lib/active_support/callbacks.rb
230
+ - lib/active_support/class_attribute.rb
221
231
  - lib/active_support/code_generator.rb
222
232
  - lib/active_support/concern.rb
223
233
  - lib/active_support/concurrency/load_interlock_aware_monitor.rb
224
234
  - lib/active_support/concurrency/null_lock.rb
225
235
  - lib/active_support/concurrency/share_lock.rb
236
+ - lib/active_support/concurrency/thread_monitor.rb
226
237
  - lib/active_support/configurable.rb
227
238
  - lib/active_support/configuration_file.rb
239
+ - lib/active_support/continuous_integration.rb
228
240
  - lib/active_support/core_ext.rb
229
241
  - lib/active_support/core_ext/array.rb
230
242
  - lib/active_support/core_ext/array/access.rb
@@ -317,7 +329,6 @@ files:
317
329
  - lib/active_support/core_ext/range.rb
318
330
  - lib/active_support/core_ext/range/compare_range.rb
319
331
  - lib/active_support/core_ext/range/conversions.rb
320
- - lib/active_support/core_ext/range/each.rb
321
332
  - lib/active_support/core_ext/range/overlap.rb
322
333
  - lib/active_support/core_ext/range/sole.rb
323
334
  - lib/active_support/core_ext/regexp.rb
@@ -367,11 +378,14 @@ files:
367
378
  - lib/active_support/duration.rb
368
379
  - lib/active_support/duration/iso8601_parser.rb
369
380
  - lib/active_support/duration/iso8601_serializer.rb
381
+ - lib/active_support/editor.rb
370
382
  - lib/active_support/encrypted_configuration.rb
371
383
  - lib/active_support/encrypted_file.rb
372
384
  - lib/active_support/environment_inquirer.rb
373
385
  - lib/active_support/error_reporter.rb
374
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
375
389
  - lib/active_support/evented_file_update_checker.rb
376
390
  - lib/active_support/execution_context.rb
377
391
  - lib/active_support/execution_context/test_helper.rb
@@ -438,7 +452,6 @@ files:
438
452
  - lib/active_support/ordered_hash.rb
439
453
  - lib/active_support/ordered_options.rb
440
454
  - lib/active_support/parameter_filter.rb
441
- - lib/active_support/proxy_object.rb
442
455
  - lib/active_support/rails.rb
443
456
  - lib/active_support/railtie.rb
444
457
  - lib/active_support/reloader.rb
@@ -446,6 +459,7 @@ files:
446
459
  - lib/active_support/secure_compare_rotator.rb
447
460
  - lib/active_support/security_utils.rb
448
461
  - lib/active_support/string_inquirer.rb
462
+ - lib/active_support/structured_event_subscriber.rb
449
463
  - lib/active_support/subscriber.rb
450
464
  - lib/active_support/syntax_error_proxy.rb
451
465
  - lib/active_support/tagged_logging.rb
@@ -457,9 +471,11 @@ files:
457
471
  - lib/active_support/testing/declarative.rb
458
472
  - lib/active_support/testing/deprecation.rb
459
473
  - lib/active_support/testing/error_reporter_assertions.rb
474
+ - lib/active_support/testing/event_reporter_assertions.rb
460
475
  - lib/active_support/testing/file_fixtures.rb
461
476
  - lib/active_support/testing/isolation.rb
462
477
  - lib/active_support/testing/method_call_assertions.rb
478
+ - lib/active_support/testing/notification_assertions.rb
463
479
  - lib/active_support/testing/parallelization.rb
464
480
  - lib/active_support/testing/parallelization/server.rb
465
481
  - lib/active_support/testing/parallelization/worker.rb
@@ -485,10 +501,10 @@ licenses:
485
501
  - MIT
486
502
  metadata:
487
503
  bug_tracker_uri: https://github.com/rails/rails/issues
488
- changelog_uri: https://github.com/rails/rails/blob/v7.2.3.1/activesupport/CHANGELOG.md
489
- documentation_uri: https://api.rubyonrails.org/v7.2.3.1/
504
+ changelog_uri: https://github.com/rails/rails/blob/v8.1.4.1/activesupport/CHANGELOG.md
505
+ documentation_uri: https://api.rubyonrails.org/v8.1.4.1/
490
506
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
491
- source_code_uri: https://github.com/rails/rails/tree/v7.2.3.1/activesupport
507
+ source_code_uri: https://github.com/rails/rails/tree/v8.1.4.1/activesupport
492
508
  rubygems_mfa_required: 'true'
493
509
  rdoc_options:
494
510
  - "--encoding"
@@ -499,14 +515,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
499
515
  requirements:
500
516
  - - ">="
501
517
  - !ruby/object:Gem::Version
502
- version: 3.1.0
518
+ version: 3.2.0
503
519
  required_rubygems_version: !ruby/object:Gem::Requirement
504
520
  requirements:
505
521
  - - ">="
506
522
  - !ruby/object:Gem::Version
507
523
  version: '0'
508
524
  requirements: []
509
- rubygems_version: 4.0.6
525
+ rubygems_version: 4.0.20
510
526
  specification_version: 4
511
527
  summary: A toolkit of support libraries and Ruby core extensions extracted from the
512
528
  Rails framework.
@@ -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,20 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module ActiveSupport
4
- class ProxyObject < ::BasicObject # :nodoc:
5
- undef_method :==
6
- undef_method :equal?
7
-
8
- # Let ActiveSupport::ProxyObject at least raise exceptions.
9
- def raise(*args)
10
- ::Object.send(:raise, *args)
11
- end
12
-
13
- def self.inherited(_subclass)
14
- ::ActiveSupport.deprecator.warn(<<~MSG)
15
- ActiveSupport::ProxyObject is deprecated and will be removed in Rails 8.0.
16
- Use Ruby's built-in BasicObject instead.
17
- MSG
18
- end
19
- end
20
- end