activesupport 7.1.5.2 → 8.0.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.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +64 -1234
  3. data/lib/active_support/array_inquirer.rb +1 -1
  4. data/lib/active_support/backtrace_cleaner.rb +10 -3
  5. data/lib/active_support/benchmark.rb +21 -0
  6. data/lib/active_support/benchmarkable.rb +3 -2
  7. data/lib/active_support/broadcast_logger.rb +4 -4
  8. data/lib/active_support/cache/file_store.rb +27 -12
  9. data/lib/active_support/cache/mem_cache_store.rb +16 -74
  10. data/lib/active_support/cache/memory_store.rb +8 -3
  11. data/lib/active_support/cache/redis_cache_store.rb +21 -15
  12. data/lib/active_support/cache/serializer_with_fallback.rb +0 -23
  13. data/lib/active_support/cache.rb +74 -77
  14. data/lib/active_support/callbacks.rb +75 -115
  15. data/lib/active_support/class_attribute.rb +26 -0
  16. data/lib/active_support/code_generator.rb +9 -0
  17. data/lib/active_support/concurrency/share_lock.rb +0 -1
  18. data/lib/active_support/configuration_file.rb +15 -6
  19. data/lib/active_support/core_ext/array/conversions.rb +0 -2
  20. data/lib/active_support/core_ext/benchmark.rb +6 -9
  21. data/lib/active_support/core_ext/class/attribute.rb +10 -19
  22. data/lib/active_support/core_ext/class/subclasses.rb +15 -35
  23. data/lib/active_support/core_ext/date/blank.rb +4 -0
  24. data/lib/active_support/core_ext/date/conversions.rb +2 -2
  25. data/lib/active_support/core_ext/date_and_time/compatibility.rb +28 -1
  26. data/lib/active_support/core_ext/date_time/blank.rb +4 -0
  27. data/lib/active_support/core_ext/date_time/conversions.rb +0 -4
  28. data/lib/active_support/core_ext/digest/uuid.rb +6 -0
  29. data/lib/active_support/core_ext/enumerable.rb +8 -3
  30. data/lib/active_support/core_ext/erb/util.rb +5 -0
  31. data/lib/active_support/core_ext/hash/except.rb +0 -12
  32. data/lib/active_support/core_ext/hash/keys.rb +4 -4
  33. data/lib/active_support/core_ext/module/attr_internal.rb +16 -6
  34. data/lib/active_support/core_ext/module/delegation.rb +20 -163
  35. data/lib/active_support/core_ext/module/deprecation.rb +1 -4
  36. data/lib/active_support/core_ext/numeric/conversions.rb +3 -3
  37. data/lib/active_support/core_ext/object/blank.rb +45 -1
  38. data/lib/active_support/core_ext/object/instance_variables.rb +11 -19
  39. data/lib/active_support/core_ext/object/json.rb +16 -10
  40. data/lib/active_support/core_ext/object/with.rb +5 -3
  41. data/lib/active_support/core_ext/pathname/blank.rb +4 -0
  42. data/lib/active_support/core_ext/range/overlap.rb +1 -1
  43. data/lib/active_support/core_ext/securerandom.rb +8 -24
  44. data/lib/active_support/core_ext/string/conversions.rb +1 -1
  45. data/lib/active_support/core_ext/string/filters.rb +1 -1
  46. data/lib/active_support/core_ext/string/multibyte.rb +1 -1
  47. data/lib/active_support/core_ext/string/output_safety.rb +0 -7
  48. data/lib/active_support/core_ext/thread/backtrace/location.rb +2 -7
  49. data/lib/active_support/core_ext/time/calculations.rb +32 -30
  50. data/lib/active_support/core_ext/time/compatibility.rb +24 -0
  51. data/lib/active_support/core_ext/time/conversions.rb +2 -2
  52. data/lib/active_support/core_ext/time/zones.rb +1 -1
  53. data/lib/active_support/core_ext.rb +0 -1
  54. data/lib/active_support/current_attributes.rb +38 -40
  55. data/lib/active_support/delegation.rb +200 -0
  56. data/lib/active_support/dependencies/autoload.rb +0 -12
  57. data/lib/active_support/dependencies.rb +0 -1
  58. data/lib/active_support/deprecation/constant_accessor.rb +47 -26
  59. data/lib/active_support/deprecation/proxy_wrappers.rb +9 -12
  60. data/lib/active_support/deprecation/reporting.rb +1 -15
  61. data/lib/active_support/deprecation.rb +8 -5
  62. data/lib/active_support/descendants_tracker.rb +9 -87
  63. data/lib/active_support/duration/iso8601_parser.rb +2 -2
  64. data/lib/active_support/duration/iso8601_serializer.rb +1 -2
  65. data/lib/active_support/duration.rb +25 -16
  66. data/lib/active_support/encrypted_configuration.rb +20 -2
  67. data/lib/active_support/encrypted_file.rb +1 -1
  68. data/lib/active_support/error_reporter.rb +65 -3
  69. data/lib/active_support/evented_file_update_checker.rb +0 -2
  70. data/lib/active_support/execution_wrapper.rb +0 -1
  71. data/lib/active_support/file_update_checker.rb +1 -1
  72. data/lib/active_support/fork_tracker.rb +2 -38
  73. data/lib/active_support/gem_version.rb +4 -4
  74. data/lib/active_support/hash_with_indifferent_access.rb +21 -23
  75. data/lib/active_support/html_safe_translation.rb +3 -0
  76. data/lib/active_support/i18n_railtie.rb +19 -11
  77. data/lib/active_support/isolated_execution_state.rb +0 -2
  78. data/lib/active_support/json/encoding.rb +2 -2
  79. data/lib/active_support/log_subscriber.rb +0 -12
  80. data/lib/active_support/logger.rb +15 -2
  81. data/lib/active_support/logger_thread_safe_level.rb +0 -8
  82. data/lib/active_support/message_pack/extensions.rb +15 -2
  83. data/lib/active_support/message_verifier.rb +12 -0
  84. data/lib/active_support/multibyte/chars.rb +2 -2
  85. data/lib/active_support/notifications/fanout.rb +4 -8
  86. data/lib/active_support/notifications/instrumenter.rb +21 -18
  87. data/lib/active_support/notifications.rb +28 -27
  88. data/lib/active_support/number_helper/number_converter.rb +2 -2
  89. data/lib/active_support/number_helper.rb +22 -0
  90. data/lib/active_support/option_merger.rb +2 -2
  91. data/lib/active_support/ordered_options.rb +53 -15
  92. data/lib/active_support/railtie.rb +8 -11
  93. data/lib/active_support/string_inquirer.rb +1 -1
  94. data/lib/active_support/subscriber.rb +1 -0
  95. data/lib/active_support/tagged_logging.rb +5 -1
  96. data/lib/active_support/test_case.rb +3 -1
  97. data/lib/active_support/testing/assertions.rb +79 -21
  98. data/lib/active_support/testing/constant_stubbing.rb +30 -8
  99. data/lib/active_support/testing/deprecation.rb +5 -12
  100. data/lib/active_support/testing/isolation.rb +19 -9
  101. data/lib/active_support/testing/method_call_assertions.rb +2 -16
  102. data/lib/active_support/testing/parallelization/server.rb +3 -0
  103. data/lib/active_support/testing/strict_warnings.rb +8 -4
  104. data/lib/active_support/testing/tests_without_assertions.rb +19 -0
  105. data/lib/active_support/testing/time_helpers.rb +4 -3
  106. data/lib/active_support/time_with_zone.rb +29 -16
  107. data/lib/active_support/values/time_zone.rb +18 -16
  108. data/lib/active_support/xml_mini.rb +11 -2
  109. data/lib/active_support.rb +11 -3
  110. metadata +32 -22
  111. data/lib/active_support/deprecation/instance_delegator.rb +0 -65
  112. data/lib/active_support/proxy_object.rb +0 -17
  113. data/lib/active_support/ruby_features.rb +0 -7
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activesupport
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.1.5.2
4
+ version: 8.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
+ autorequire:
8
9
  bindir: bin
9
10
  cert_chain: []
10
- date: 1980-01-02 00:00:00.000000000 Z
11
+ date: 2024-11-07 00:00:00.000000000 Z
11
12
  dependencies:
12
13
  - !ruby/object:Gem::Dependency
13
14
  name: i18n
@@ -36,6 +37,9 @@ dependencies:
36
37
  - - "~>"
37
38
  - !ruby/object:Gem::Version
38
39
  version: '2.0'
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: 2.0.5
39
43
  type: :runtime
40
44
  prerelease: false
41
45
  version_requirements: !ruby/object:Gem::Requirement
@@ -43,6 +47,9 @@ dependencies:
43
47
  - - "~>"
44
48
  - !ruby/object:Gem::Version
45
49
  version: '2.0'
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: 2.0.5
46
53
  - !ruby/object:Gem::Dependency
47
54
  name: concurrent-ruby
48
55
  requirement: !ruby/object:Gem::Requirement
@@ -52,7 +59,7 @@ dependencies:
52
59
  version: '1.0'
53
60
  - - ">="
54
61
  - !ruby/object:Gem::Version
55
- version: 1.0.2
62
+ version: 1.3.1
56
63
  type: :runtime
57
64
  prerelease: false
58
65
  version_requirements: !ruby/object:Gem::Requirement
@@ -62,7 +69,7 @@ dependencies:
62
69
  version: '1.0'
63
70
  - - ">="
64
71
  - !ruby/object:Gem::Version
65
- version: 1.0.2
72
+ version: 1.3.1
66
73
  - !ruby/object:Gem::Dependency
67
74
  name: connection_pool
68
75
  requirement: !ruby/object:Gem::Requirement
@@ -120,7 +127,7 @@ dependencies:
120
127
  - !ruby/object:Gem::Version
121
128
  version: '0'
122
129
  - !ruby/object:Gem::Dependency
123
- name: mutex_m
130
+ name: bigdecimal
124
131
  requirement: !ruby/object:Gem::Requirement
125
132
  requirements:
126
133
  - - ">="
@@ -134,47 +141,47 @@ dependencies:
134
141
  - !ruby/object:Gem::Version
135
142
  version: '0'
136
143
  - !ruby/object:Gem::Dependency
137
- name: bigdecimal
144
+ name: logger
138
145
  requirement: !ruby/object:Gem::Requirement
139
146
  requirements:
140
147
  - - ">="
141
148
  - !ruby/object:Gem::Version
142
- version: '0'
149
+ version: 1.4.2
143
150
  type: :runtime
144
151
  prerelease: false
145
152
  version_requirements: !ruby/object:Gem::Requirement
146
153
  requirements:
147
154
  - - ">="
148
155
  - !ruby/object:Gem::Version
149
- version: '0'
156
+ version: 1.4.2
150
157
  - !ruby/object:Gem::Dependency
151
- name: logger
158
+ name: securerandom
152
159
  requirement: !ruby/object:Gem::Requirement
153
160
  requirements:
154
161
  - - ">="
155
162
  - !ruby/object:Gem::Version
156
- version: 1.4.2
163
+ version: '0.3'
157
164
  type: :runtime
158
165
  prerelease: false
159
166
  version_requirements: !ruby/object:Gem::Requirement
160
167
  requirements:
161
168
  - - ">="
162
169
  - !ruby/object:Gem::Version
163
- version: 1.4.2
170
+ version: '0.3'
164
171
  - !ruby/object:Gem::Dependency
165
- name: securerandom
172
+ name: uri
166
173
  requirement: !ruby/object:Gem::Requirement
167
174
  requirements:
168
175
  - - ">="
169
176
  - !ruby/object:Gem::Version
170
- version: '0.3'
177
+ version: 0.13.1
171
178
  type: :runtime
172
179
  prerelease: false
173
180
  version_requirements: !ruby/object:Gem::Requirement
174
181
  requirements:
175
182
  - - ">="
176
183
  - !ruby/object:Gem::Version
177
- version: '0.3'
184
+ version: 0.13.1
178
185
  - !ruby/object:Gem::Dependency
179
186
  name: benchmark
180
187
  requirement: !ruby/object:Gem::Requirement
@@ -205,6 +212,7 @@ files:
205
212
  - lib/active_support/all.rb
206
213
  - lib/active_support/array_inquirer.rb
207
214
  - lib/active_support/backtrace_cleaner.rb
215
+ - lib/active_support/benchmark.rb
208
216
  - lib/active_support/benchmarkable.rb
209
217
  - lib/active_support/broadcast_logger.rb
210
218
  - lib/active_support/builder.rb
@@ -220,6 +228,7 @@ files:
220
228
  - lib/active_support/cache/strategy/local_cache.rb
221
229
  - lib/active_support/cache/strategy/local_cache_middleware.rb
222
230
  - lib/active_support/callbacks.rb
231
+ - lib/active_support/class_attribute.rb
223
232
  - lib/active_support/code_generator.rb
224
233
  - lib/active_support/concern.rb
225
234
  - lib/active_support/concurrency/load_interlock_aware_monitor.rb
@@ -349,6 +358,7 @@ files:
349
358
  - lib/active_support/current_attributes.rb
350
359
  - lib/active_support/current_attributes/test_helper.rb
351
360
  - lib/active_support/deep_mergeable.rb
361
+ - lib/active_support/delegation.rb
352
362
  - lib/active_support/dependencies.rb
353
363
  - lib/active_support/dependencies/autoload.rb
354
364
  - lib/active_support/dependencies/interlock.rb
@@ -358,7 +368,6 @@ files:
358
368
  - lib/active_support/deprecation/constant_accessor.rb
359
369
  - lib/active_support/deprecation/deprecators.rb
360
370
  - lib/active_support/deprecation/disallowed.rb
361
- - lib/active_support/deprecation/instance_delegator.rb
362
371
  - lib/active_support/deprecation/method_wrappers.rb
363
372
  - lib/active_support/deprecation/proxy_wrappers.rb
364
373
  - lib/active_support/deprecation/reporting.rb
@@ -439,12 +448,10 @@ files:
439
448
  - lib/active_support/ordered_hash.rb
440
449
  - lib/active_support/ordered_options.rb
441
450
  - lib/active_support/parameter_filter.rb
442
- - lib/active_support/proxy_object.rb
443
451
  - lib/active_support/rails.rb
444
452
  - lib/active_support/railtie.rb
445
453
  - lib/active_support/reloader.rb
446
454
  - lib/active_support/rescuable.rb
447
- - lib/active_support/ruby_features.rb
448
455
  - lib/active_support/secure_compare_rotator.rb
449
456
  - lib/active_support/security_utils.rb
450
457
  - lib/active_support/string_inquirer.rb
@@ -470,6 +477,7 @@ files:
470
477
  - lib/active_support/testing/stream.rb
471
478
  - lib/active_support/testing/strict_warnings.rb
472
479
  - lib/active_support/testing/tagged_logging.rb
480
+ - lib/active_support/testing/tests_without_assertions.rb
473
481
  - lib/active_support/testing/time_helpers.rb
474
482
  - lib/active_support/time.rb
475
483
  - lib/active_support/time_with_zone.rb
@@ -487,11 +495,12 @@ licenses:
487
495
  - MIT
488
496
  metadata:
489
497
  bug_tracker_uri: https://github.com/rails/rails/issues
490
- changelog_uri: https://github.com/rails/rails/blob/v7.1.5.2/activesupport/CHANGELOG.md
491
- documentation_uri: https://api.rubyonrails.org/v7.1.5.2/
498
+ changelog_uri: https://github.com/rails/rails/blob/v8.0.0/activesupport/CHANGELOG.md
499
+ documentation_uri: https://api.rubyonrails.org/v8.0.0/
492
500
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
493
- source_code_uri: https://github.com/rails/rails/tree/v7.1.5.2/activesupport
501
+ source_code_uri: https://github.com/rails/rails/tree/v8.0.0/activesupport
494
502
  rubygems_mfa_required: 'true'
503
+ post_install_message:
495
504
  rdoc_options:
496
505
  - "--encoding"
497
506
  - UTF-8
@@ -501,14 +510,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
501
510
  requirements:
502
511
  - - ">="
503
512
  - !ruby/object:Gem::Version
504
- version: 2.7.0
513
+ version: 3.2.0
505
514
  required_rubygems_version: !ruby/object:Gem::Requirement
506
515
  requirements:
507
516
  - - ">="
508
517
  - !ruby/object:Gem::Version
509
518
  version: '0'
510
519
  requirements: []
511
- rubygems_version: 3.6.9
520
+ rubygems_version: 3.5.22
521
+ signing_key:
512
522
  specification_version: 4
513
523
  summary: A toolkit of support libraries and Ruby core extensions extracted from the
514
524
  Rails framework.
@@ -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,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module ActiveSupport
4
- module RubyFeatures # :nodoc:
5
- CLASS_SUBCLASSES = Class.method_defined?(:subclasses) # RUBY_VERSION >= "3.1"
6
- end
7
- end