activesupport 7.1.5 → 7.2.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +113 -1173
- data/lib/active_support/array_inquirer.rb +1 -1
- data/lib/active_support/backtrace_cleaner.rb +10 -3
- data/lib/active_support/broadcast_logger.rb +18 -19
- data/lib/active_support/cache/file_store.rb +15 -10
- data/lib/active_support/cache/mem_cache_store.rb +16 -74
- data/lib/active_support/cache/memory_store.rb +2 -1
- data/lib/active_support/cache/redis_cache_store.rb +16 -13
- data/lib/active_support/cache/serializer_with_fallback.rb +0 -23
- data/lib/active_support/cache.rb +59 -67
- data/lib/active_support/callbacks.rb +74 -113
- data/lib/active_support/code_generator.rb +10 -15
- data/lib/active_support/core_ext/array/conversions.rb +0 -2
- data/lib/active_support/core_ext/class/subclasses.rb +15 -35
- data/lib/active_support/core_ext/date/blank.rb +4 -0
- data/lib/active_support/core_ext/date/conversions.rb +0 -2
- data/lib/active_support/core_ext/date_and_time/compatibility.rb +12 -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 +0 -4
- data/lib/active_support/core_ext/erb/util.rb +5 -0
- data/lib/active_support/core_ext/hash/keys.rb +4 -4
- data/lib/active_support/core_ext/module/attr_internal.rb +17 -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/numeric/conversions.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 +4 -6
- data/lib/active_support/core_ext/object/with.rb +5 -3
- data/lib/active_support/core_ext/pathname/blank.rb +4 -0
- data/lib/active_support/core_ext/range/overlap.rb +1 -1
- data/lib/active_support/core_ext/string/conversions.rb +1 -1
- data/lib/active_support/core_ext/string/filters.rb +1 -1
- data/lib/active_support/core_ext/string/output_safety.rb +0 -7
- data/lib/active_support/core_ext/time/calculations.rb +12 -27
- data/lib/active_support/core_ext/time/compatibility.rb +2 -3
- data/lib/active_support/core_ext/time/conversions.rb +0 -2
- data/lib/active_support/core_ext.rb +0 -1
- data/lib/active_support/current_attributes.rb +33 -40
- data/lib/active_support/delegation.rb +188 -0
- data/lib/active_support/dependencies/autoload.rb +0 -12
- data/lib/active_support/deprecation/constant_accessor.rb +1 -3
- data/lib/active_support/deprecation/proxy_wrappers.rb +9 -12
- data/lib/active_support/deprecation/reporting.rb +9 -4
- 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 +11 -6
- data/lib/active_support/error_reporter.rb +41 -3
- data/lib/active_support/evented_file_update_checker.rb +0 -1
- data/lib/active_support/execution_wrapper.rb +0 -1
- data/lib/active_support/file_update_checker.rb +1 -1
- data/lib/active_support/fork_tracker.rb +2 -38
- data/lib/active_support/gem_version.rb +3 -3
- data/lib/active_support/hash_with_indifferent_access.rb +6 -8
- data/lib/active_support/html_safe_translation.rb +3 -0
- data/lib/active_support/log_subscriber.rb +0 -12
- data/lib/active_support/logger.rb +15 -2
- data/lib/active_support/message_pack/extensions.rb +15 -2
- data/lib/active_support/multibyte/chars.rb +2 -2
- data/lib/active_support/notifications/fanout.rb +4 -7
- data/lib/active_support/notifications/instrumenter.rb +21 -18
- data/lib/active_support/notifications.rb +28 -27
- data/lib/active_support/number_helper/number_converter.rb +2 -2
- data/lib/active_support/option_merger.rb +2 -2
- data/lib/active_support/ordered_options.rb +53 -15
- data/lib/active_support/proxy_object.rb +8 -5
- data/lib/active_support/railtie.rb +4 -11
- data/lib/active_support/string_inquirer.rb +1 -1
- data/lib/active_support/syntax_error_proxy.rb +11 -1
- data/lib/active_support/test_case.rb +3 -1
- data/lib/active_support/testing/assertions.rb +4 -4
- data/lib/active_support/testing/constant_stubbing.rb +30 -8
- data/lib/active_support/testing/deprecation.rb +5 -12
- data/lib/active_support/testing/isolation.rb +18 -8
- data/lib/active_support/testing/method_call_assertions.rb +2 -16
- data/lib/active_support/testing/strict_warnings.rb +5 -4
- data/lib/active_support/testing/tests_without_assertions.rb +19 -0
- data/lib/active_support/time_with_zone.rb +9 -10
- data/lib/active_support/values/time_zone.rb +1 -1
- data/lib/active_support/xml_mini.rb +11 -2
- data/lib/active_support.rb +7 -8
- metadata +20 -70
- data/lib/active_support/deprecation/instance_delegator.rb +0 -65
- data/lib/active_support/ruby_features.rb +0 -7
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.
|
4
|
+
version: 7.2.0.beta1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-05-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|
@@ -37,6 +37,9 @@ dependencies:
|
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
39
|
version: '2.0'
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 2.0.5
|
40
43
|
type: :runtime
|
41
44
|
prerelease: false
|
42
45
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -44,6 +47,9 @@ dependencies:
|
|
44
47
|
- - "~>"
|
45
48
|
- !ruby/object:Gem::Version
|
46
49
|
version: '2.0'
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 2.0.5
|
47
53
|
- !ruby/object:Gem::Dependency
|
48
54
|
name: concurrent-ruby
|
49
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -53,7 +59,7 @@ dependencies:
|
|
53
59
|
version: '1.0'
|
54
60
|
- - ">="
|
55
61
|
- !ruby/object:Gem::Version
|
56
|
-
version: 1.
|
62
|
+
version: 1.3.1
|
57
63
|
type: :runtime
|
58
64
|
prerelease: false
|
59
65
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -63,7 +69,7 @@ dependencies:
|
|
63
69
|
version: '1.0'
|
64
70
|
- - ">="
|
65
71
|
- !ruby/object:Gem::Version
|
66
|
-
version: 1.
|
72
|
+
version: 1.3.1
|
67
73
|
- !ruby/object:Gem::Dependency
|
68
74
|
name: connection_pool
|
69
75
|
requirement: !ruby/object:Gem::Requirement
|
@@ -120,20 +126,6 @@ dependencies:
|
|
120
126
|
- - ">="
|
121
127
|
- !ruby/object:Gem::Version
|
122
128
|
version: '0'
|
123
|
-
- !ruby/object:Gem::Dependency
|
124
|
-
name: mutex_m
|
125
|
-
requirement: !ruby/object:Gem::Requirement
|
126
|
-
requirements:
|
127
|
-
- - ">="
|
128
|
-
- !ruby/object:Gem::Version
|
129
|
-
version: '0'
|
130
|
-
type: :runtime
|
131
|
-
prerelease: false
|
132
|
-
version_requirements: !ruby/object:Gem::Requirement
|
133
|
-
requirements:
|
134
|
-
- - ">="
|
135
|
-
- !ruby/object:Gem::Version
|
136
|
-
version: '0'
|
137
129
|
- !ruby/object:Gem::Dependency
|
138
130
|
name: bigdecimal
|
139
131
|
requirement: !ruby/object:Gem::Requirement
|
@@ -148,48 +140,6 @@ dependencies:
|
|
148
140
|
- - ">="
|
149
141
|
- !ruby/object:Gem::Version
|
150
142
|
version: '0'
|
151
|
-
- !ruby/object:Gem::Dependency
|
152
|
-
name: logger
|
153
|
-
requirement: !ruby/object:Gem::Requirement
|
154
|
-
requirements:
|
155
|
-
- - ">="
|
156
|
-
- !ruby/object:Gem::Version
|
157
|
-
version: 1.4.2
|
158
|
-
type: :runtime
|
159
|
-
prerelease: false
|
160
|
-
version_requirements: !ruby/object:Gem::Requirement
|
161
|
-
requirements:
|
162
|
-
- - ">="
|
163
|
-
- !ruby/object:Gem::Version
|
164
|
-
version: 1.4.2
|
165
|
-
- !ruby/object:Gem::Dependency
|
166
|
-
name: securerandom
|
167
|
-
requirement: !ruby/object:Gem::Requirement
|
168
|
-
requirements:
|
169
|
-
- - ">="
|
170
|
-
- !ruby/object:Gem::Version
|
171
|
-
version: '0.3'
|
172
|
-
type: :runtime
|
173
|
-
prerelease: false
|
174
|
-
version_requirements: !ruby/object:Gem::Requirement
|
175
|
-
requirements:
|
176
|
-
- - ">="
|
177
|
-
- !ruby/object:Gem::Version
|
178
|
-
version: '0.3'
|
179
|
-
- !ruby/object:Gem::Dependency
|
180
|
-
name: benchmark
|
181
|
-
requirement: !ruby/object:Gem::Requirement
|
182
|
-
requirements:
|
183
|
-
- - ">="
|
184
|
-
- !ruby/object:Gem::Version
|
185
|
-
version: '0.3'
|
186
|
-
type: :runtime
|
187
|
-
prerelease: false
|
188
|
-
version_requirements: !ruby/object:Gem::Requirement
|
189
|
-
requirements:
|
190
|
-
- - ">="
|
191
|
-
- !ruby/object:Gem::Version
|
192
|
-
version: '0.3'
|
193
143
|
description: A toolkit of support libraries and Ruby core extensions extracted from
|
194
144
|
the Rails framework. Rich support for multibyte strings, internationalization, time
|
195
145
|
zones, and testing.
|
@@ -350,6 +300,7 @@ files:
|
|
350
300
|
- lib/active_support/current_attributes.rb
|
351
301
|
- lib/active_support/current_attributes/test_helper.rb
|
352
302
|
- lib/active_support/deep_mergeable.rb
|
303
|
+
- lib/active_support/delegation.rb
|
353
304
|
- lib/active_support/dependencies.rb
|
354
305
|
- lib/active_support/dependencies/autoload.rb
|
355
306
|
- lib/active_support/dependencies/interlock.rb
|
@@ -359,7 +310,6 @@ files:
|
|
359
310
|
- lib/active_support/deprecation/constant_accessor.rb
|
360
311
|
- lib/active_support/deprecation/deprecators.rb
|
361
312
|
- lib/active_support/deprecation/disallowed.rb
|
362
|
-
- lib/active_support/deprecation/instance_delegator.rb
|
363
313
|
- lib/active_support/deprecation/method_wrappers.rb
|
364
314
|
- lib/active_support/deprecation/proxy_wrappers.rb
|
365
315
|
- lib/active_support/deprecation/reporting.rb
|
@@ -445,7 +395,6 @@ files:
|
|
445
395
|
- lib/active_support/railtie.rb
|
446
396
|
- lib/active_support/reloader.rb
|
447
397
|
- lib/active_support/rescuable.rb
|
448
|
-
- lib/active_support/ruby_features.rb
|
449
398
|
- lib/active_support/secure_compare_rotator.rb
|
450
399
|
- lib/active_support/security_utils.rb
|
451
400
|
- lib/active_support/string_inquirer.rb
|
@@ -471,6 +420,7 @@ files:
|
|
471
420
|
- lib/active_support/testing/stream.rb
|
472
421
|
- lib/active_support/testing/strict_warnings.rb
|
473
422
|
- lib/active_support/testing/tagged_logging.rb
|
423
|
+
- lib/active_support/testing/tests_without_assertions.rb
|
474
424
|
- lib/active_support/testing/time_helpers.rb
|
475
425
|
- lib/active_support/time.rb
|
476
426
|
- lib/active_support/time_with_zone.rb
|
@@ -488,12 +438,12 @@ licenses:
|
|
488
438
|
- MIT
|
489
439
|
metadata:
|
490
440
|
bug_tracker_uri: https://github.com/rails/rails/issues
|
491
|
-
changelog_uri: https://github.com/rails/rails/blob/v7.
|
492
|
-
documentation_uri: https://api.rubyonrails.org/v7.
|
441
|
+
changelog_uri: https://github.com/rails/rails/blob/v7.2.0.beta1/activesupport/CHANGELOG.md
|
442
|
+
documentation_uri: https://api.rubyonrails.org/v7.2.0.beta1/
|
493
443
|
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
494
|
-
source_code_uri: https://github.com/rails/rails/tree/v7.
|
444
|
+
source_code_uri: https://github.com/rails/rails/tree/v7.2.0.beta1/activesupport
|
495
445
|
rubygems_mfa_required: 'true'
|
496
|
-
post_install_message:
|
446
|
+
post_install_message:
|
497
447
|
rdoc_options:
|
498
448
|
- "--encoding"
|
499
449
|
- UTF-8
|
@@ -503,15 +453,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
503
453
|
requirements:
|
504
454
|
- - ">="
|
505
455
|
- !ruby/object:Gem::Version
|
506
|
-
version:
|
456
|
+
version: 3.1.0
|
507
457
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
508
458
|
requirements:
|
509
459
|
- - ">="
|
510
460
|
- !ruby/object:Gem::Version
|
511
461
|
version: '0'
|
512
462
|
requirements: []
|
513
|
-
rubygems_version: 3.5.
|
514
|
-
signing_key:
|
463
|
+
rubygems_version: 3.5.10
|
464
|
+
signing_key:
|
515
465
|
specification_version: 4
|
516
466
|
summary: A toolkit of support libraries and Ruby core extensions extracted from the
|
517
467
|
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
|