activesupport 5.2.4.3 → 7.0.3
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.
Potentially problematic release.
This version of activesupport might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +244 -459
- data/MIT-LICENSE +1 -1
- data/README.rdoc +4 -3
- data/lib/active_support/actionable_error.rb +48 -0
- data/lib/active_support/array_inquirer.rb +2 -2
- data/lib/active_support/backtrace_cleaner.rb +31 -5
- data/lib/active_support/benchmarkable.rb +3 -3
- data/lib/active_support/cache/file_store.rb +47 -41
- data/lib/active_support/cache/mem_cache_store.rb +151 -40
- data/lib/active_support/cache/memory_store.rb +68 -34
- data/lib/active_support/cache/null_store.rb +16 -3
- data/lib/active_support/cache/redis_cache_store.rb +103 -101
- data/lib/active_support/cache/strategy/local_cache.rb +56 -64
- data/lib/active_support/cache.rb +333 -116
- data/lib/active_support/callbacks.rb +244 -128
- data/lib/active_support/code_generator.rb +65 -0
- data/lib/active_support/concern.rb +72 -5
- data/lib/active_support/concurrency/load_interlock_aware_monitor.rb +16 -0
- data/lib/active_support/concurrency/share_lock.rb +2 -3
- data/lib/active_support/configurable.rb +15 -16
- data/lib/active_support/configuration_file.rb +51 -0
- data/lib/active_support/core_ext/array/access.rb +15 -7
- data/lib/active_support/core_ext/array/conversions.rb +18 -17
- data/lib/active_support/core_ext/array/deprecated_conversions.rb +25 -0
- data/lib/active_support/core_ext/array/extract.rb +21 -0
- data/lib/active_support/core_ext/array/grouping.rb +6 -6
- data/lib/active_support/core_ext/array/inquiry.rb +2 -2
- data/lib/active_support/core_ext/array.rb +2 -1
- data/lib/active_support/core_ext/benchmark.rb +2 -2
- data/lib/active_support/core_ext/big_decimal/conversions.rb +1 -1
- data/lib/active_support/core_ext/class/attribute.rb +32 -47
- data/lib/active_support/core_ext/class/subclasses.rb +9 -22
- data/lib/active_support/core_ext/date/blank.rb +1 -1
- data/lib/active_support/core_ext/date/calculations.rb +15 -14
- data/lib/active_support/core_ext/date/conversions.rb +16 -15
- data/lib/active_support/core_ext/date/deprecated_conversions.rb +26 -0
- data/lib/active_support/core_ext/date.rb +1 -0
- data/lib/active_support/core_ext/date_and_time/calculations.rb +41 -51
- data/lib/active_support/core_ext/date_and_time/compatibility.rb +15 -0
- data/lib/active_support/core_ext/date_and_time/zones.rb +0 -1
- data/lib/active_support/core_ext/date_time/blank.rb +1 -1
- data/lib/active_support/core_ext/date_time/calculations.rb +1 -1
- data/lib/active_support/core_ext/date_time/conversions.rb +13 -14
- data/lib/active_support/core_ext/date_time/deprecated_conversions.rb +22 -0
- data/lib/active_support/core_ext/date_time.rb +1 -0
- data/lib/active_support/core_ext/digest/uuid.rb +39 -13
- data/lib/active_support/core_ext/enumerable.rb +241 -76
- data/lib/active_support/core_ext/file/atomic.rb +3 -1
- data/lib/active_support/core_ext/hash/conversions.rb +3 -4
- data/lib/active_support/core_ext/hash/deep_transform_values.rb +46 -0
- data/lib/active_support/core_ext/hash/except.rb +2 -2
- data/lib/active_support/core_ext/hash/indifferent_access.rb +3 -3
- data/lib/active_support/core_ext/hash/keys.rb +2 -31
- data/lib/active_support/core_ext/hash/slice.rb +6 -27
- data/lib/active_support/core_ext/hash.rb +1 -2
- data/lib/active_support/core_ext/integer/multiple.rb +1 -1
- data/lib/active_support/core_ext/kernel/reporting.rb +4 -4
- data/lib/active_support/core_ext/kernel/singleton_class.rb +1 -1
- data/lib/active_support/core_ext/kernel.rb +0 -1
- data/lib/active_support/core_ext/load_error.rb +1 -1
- data/lib/active_support/core_ext/module/attr_internal.rb +2 -2
- data/lib/active_support/core_ext/module/attribute_accessors.rb +32 -39
- data/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb +35 -28
- data/lib/active_support/core_ext/module/concerning.rb +8 -2
- data/lib/active_support/core_ext/module/delegation.rb +70 -33
- data/lib/active_support/core_ext/module/introspection.rb +16 -15
- data/lib/active_support/core_ext/module/redefine_method.rb +8 -17
- data/lib/active_support/core_ext/module.rb +0 -1
- data/lib/active_support/core_ext/name_error.rb +23 -2
- data/lib/active_support/core_ext/numeric/conversions.rb +132 -129
- data/lib/active_support/core_ext/numeric/deprecated_conversions.rb +60 -0
- data/lib/active_support/core_ext/numeric.rb +1 -1
- data/lib/active_support/core_ext/object/acts_like.rb +29 -5
- data/lib/active_support/core_ext/object/blank.rb +3 -4
- data/lib/active_support/core_ext/object/deep_dup.rb +1 -1
- data/lib/active_support/core_ext/object/duplicable.rb +14 -110
- data/lib/active_support/core_ext/object/json.rb +44 -27
- data/lib/active_support/core_ext/object/to_query.rb +2 -2
- data/lib/active_support/core_ext/object/try.rb +24 -14
- data/lib/active_support/core_ext/object/with_options.rb +21 -2
- data/lib/active_support/core_ext/pathname/existence.rb +21 -0
- data/lib/active_support/core_ext/pathname.rb +3 -0
- data/lib/active_support/core_ext/range/compare_range.rb +23 -27
- data/lib/active_support/core_ext/range/conversions.rb +32 -30
- data/lib/active_support/core_ext/range/deprecated_conversions.rb +26 -0
- data/lib/active_support/core_ext/range/each.rb +1 -2
- data/lib/active_support/core_ext/range/include_time_with_zone.rb +4 -20
- data/lib/active_support/core_ext/range/overlaps.rb +1 -1
- data/lib/active_support/core_ext/range.rb +1 -1
- data/lib/active_support/core_ext/regexp.rb +8 -5
- data/lib/active_support/core_ext/securerandom.rb +23 -3
- data/lib/active_support/core_ext/string/access.rb +5 -16
- data/lib/active_support/core_ext/string/conversions.rb +3 -2
- data/lib/active_support/core_ext/string/filters.rb +42 -1
- data/lib/active_support/core_ext/string/inflections.rb +46 -7
- data/lib/active_support/core_ext/string/inquiry.rb +2 -1
- data/lib/active_support/core_ext/string/multibyte.rb +6 -5
- data/lib/active_support/core_ext/string/output_safety.rb +129 -20
- data/lib/active_support/core_ext/string/starts_ends_with.rb +2 -2
- data/lib/active_support/core_ext/string/strip.rb +3 -1
- data/lib/active_support/core_ext/symbol/starts_ends_with.rb +6 -0
- data/lib/active_support/core_ext/symbol.rb +3 -0
- data/lib/active_support/core_ext/time/calculations.rb +59 -10
- data/lib/active_support/core_ext/time/conversions.rb +15 -12
- data/lib/active_support/core_ext/time/deprecated_conversions.rb +22 -0
- data/lib/active_support/core_ext/time/zones.rb +7 -22
- data/lib/active_support/core_ext/time.rb +1 -0
- data/lib/active_support/core_ext/uri.rb +3 -22
- data/lib/active_support/core_ext.rb +2 -1
- data/lib/active_support/current_attributes/test_helper.rb +13 -0
- data/lib/active_support/current_attributes.rb +47 -16
- data/lib/active_support/dependencies/interlock.rb +10 -18
- data/lib/active_support/dependencies/require_dependency.rb +28 -0
- data/lib/active_support/dependencies.rb +60 -715
- data/lib/active_support/deprecation/behaviors.rb +21 -5
- data/lib/active_support/deprecation/disallowed.rb +56 -0
- data/lib/active_support/deprecation/instance_delegator.rb +0 -1
- data/lib/active_support/deprecation/method_wrappers.rb +18 -23
- data/lib/active_support/deprecation/proxy_wrappers.rb +31 -8
- data/lib/active_support/deprecation/reporting.rb +50 -7
- data/lib/active_support/deprecation.rb +7 -2
- data/lib/active_support/descendants_tracker.rb +190 -34
- data/lib/active_support/digest.rb +5 -3
- data/lib/active_support/duration/iso8601_parser.rb +5 -7
- data/lib/active_support/duration/iso8601_serializer.rb +27 -15
- data/lib/active_support/duration.rb +149 -67
- data/lib/active_support/encrypted_configuration.rb +12 -5
- data/lib/active_support/encrypted_file.rb +23 -5
- data/lib/active_support/environment_inquirer.rb +20 -0
- data/lib/active_support/error_reporter.rb +117 -0
- data/lib/active_support/evented_file_update_checker.rb +85 -122
- data/lib/active_support/execution_context/test_helper.rb +13 -0
- data/lib/active_support/execution_context.rb +53 -0
- data/lib/active_support/execution_wrapper.rb +44 -21
- data/lib/active_support/executor/test_helper.rb +7 -0
- data/lib/active_support/file_update_checker.rb +0 -1
- data/lib/active_support/fork_tracker.rb +71 -0
- data/lib/active_support/gem_version.rb +5 -5
- data/lib/active_support/hash_with_indifferent_access.rb +73 -43
- data/lib/active_support/html_safe_translation.rb +43 -0
- data/lib/active_support/i18n.rb +2 -0
- data/lib/active_support/i18n_railtie.rb +15 -8
- data/lib/active_support/inflector/inflections.rb +25 -14
- data/lib/active_support/inflector/methods.rb +38 -71
- data/lib/active_support/inflector/transliterate.rb +47 -18
- data/lib/active_support/isolated_execution_state.rb +72 -0
- data/lib/active_support/json/decoding.rb +25 -26
- data/lib/active_support/json/encoding.rb +14 -6
- data/lib/active_support/key_generator.rb +23 -38
- data/lib/active_support/lazy_load_hooks.rb +19 -5
- data/lib/active_support/locale/en.rb +33 -0
- data/lib/active_support/locale/en.yml +8 -4
- data/lib/active_support/log_subscriber/test_helper.rb +2 -2
- data/lib/active_support/log_subscriber.rb +51 -11
- data/lib/active_support/logger.rb +6 -22
- data/lib/active_support/logger_silence.rb +11 -19
- data/lib/active_support/logger_thread_safe_level.rb +45 -10
- data/lib/active_support/message_encryptor.rb +20 -19
- data/lib/active_support/message_verifier.rb +53 -21
- data/lib/active_support/messages/metadata.rb +13 -4
- data/lib/active_support/messages/rotation_configuration.rb +2 -1
- data/lib/active_support/messages/rotator.rb +10 -9
- data/lib/active_support/multibyte/chars.rb +17 -76
- data/lib/active_support/multibyte/unicode.rb +7 -331
- data/lib/active_support/multibyte.rb +1 -1
- data/lib/active_support/notifications/fanout.rb +163 -37
- data/lib/active_support/notifications/instrumenter.rb +90 -11
- data/lib/active_support/notifications.rb +88 -30
- data/lib/active_support/number_helper/number_converter.rb +6 -9
- data/lib/active_support/number_helper/number_to_currency_converter.rb +12 -12
- data/lib/active_support/number_helper/number_to_delimited_converter.rb +4 -3
- data/lib/active_support/number_helper/number_to_human_converter.rb +4 -3
- data/lib/active_support/number_helper/number_to_human_size_converter.rb +5 -4
- data/lib/active_support/number_helper/number_to_percentage_converter.rb +3 -1
- data/lib/active_support/number_helper/number_to_phone_converter.rb +3 -2
- data/lib/active_support/number_helper/number_to_rounded_converter.rb +12 -7
- data/lib/active_support/number_helper/rounding_helper.rb +12 -32
- data/lib/active_support/number_helper.rb +36 -12
- data/lib/active_support/option_merger.rb +15 -4
- data/lib/active_support/ordered_hash.rb +2 -2
- data/lib/active_support/ordered_options.rb +14 -4
- data/lib/active_support/parameter_filter.rb +138 -0
- data/lib/active_support/per_thread_registry.rb +6 -1
- data/lib/active_support/rails.rb +1 -10
- data/lib/active_support/railtie.rb +77 -5
- data/lib/active_support/reloader.rb +5 -6
- data/lib/active_support/rescuable.rb +8 -8
- data/lib/active_support/ruby_features.rb +7 -0
- data/lib/active_support/secure_compare_rotator.rb +51 -0
- data/lib/active_support/security_utils.rb +19 -12
- data/lib/active_support/string_inquirer.rb +2 -3
- data/lib/active_support/subscriber.rb +79 -46
- data/lib/active_support/tagged_logging.rb +58 -9
- data/lib/active_support/test_case.rb +79 -0
- data/lib/active_support/testing/assertions.rb +62 -11
- data/lib/active_support/testing/deprecation.rb +52 -2
- data/lib/active_support/testing/file_fixtures.rb +2 -0
- data/lib/active_support/testing/isolation.rb +4 -4
- data/lib/active_support/testing/method_call_assertions.rb +32 -5
- data/lib/active_support/testing/parallelization/server.rb +82 -0
- data/lib/active_support/testing/parallelization/worker.rb +103 -0
- data/lib/active_support/testing/parallelization.rb +55 -0
- data/lib/active_support/testing/parallelize_executor.rb +76 -0
- data/lib/active_support/testing/stream.rb +4 -7
- data/lib/active_support/testing/tagged_logging.rb +1 -1
- data/lib/active_support/testing/time_helpers.rb +60 -14
- data/lib/active_support/time_with_zone.rb +139 -64
- data/lib/active_support/values/time_zone.rb +66 -30
- data/lib/active_support/version.rb +1 -1
- data/lib/active_support/xml_mini/jdom.rb +3 -4
- data/lib/active_support/xml_mini/libxml.rb +7 -7
- data/lib/active_support/xml_mini/libxmlsax.rb +5 -5
- data/lib/active_support/xml_mini/nokogiri.rb +6 -6
- data/lib/active_support/xml_mini/nokogirisax.rb +4 -4
- data/lib/active_support/xml_mini/rexml.rb +11 -4
- data/lib/active_support/xml_mini.rb +7 -14
- data/lib/active_support.rb +30 -1
- metadata +64 -35
- data/lib/active_support/core_ext/array/prepend_and_append.rb +0 -9
- data/lib/active_support/core_ext/hash/compact.rb +0 -29
- data/lib/active_support/core_ext/hash/transform_values.rb +0 -32
- data/lib/active_support/core_ext/kernel/agnostics.rb +0 -13
- data/lib/active_support/core_ext/marshal.rb +0 -24
- data/lib/active_support/core_ext/module/reachable.rb +0 -11
- data/lib/active_support/core_ext/numeric/inquiry.rb +0 -28
- data/lib/active_support/core_ext/range/include_range.rb +0 -3
- data/lib/active_support/values/unicode_tables.dat +0 -0
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:
|
4
|
+
version: 7.0.3
|
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:
|
11
|
+
date: 2022-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '1.6'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: '2'
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '
|
29
|
+
version: '1.6'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '2'
|
@@ -36,48 +36,48 @@ dependencies:
|
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '
|
39
|
+
version: '2.0'
|
40
40
|
type: :runtime
|
41
41
|
prerelease: false
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: '
|
46
|
+
version: '2.0'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
|
-
name:
|
48
|
+
name: concurrent-ruby
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
53
|
+
version: '1.0'
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: 1.0.2
|
54
57
|
type: :runtime
|
55
58
|
prerelease: false
|
56
59
|
version_requirements: !ruby/object:Gem::Requirement
|
57
60
|
requirements:
|
58
61
|
- - "~>"
|
59
62
|
- !ruby/object:Gem::Version
|
60
|
-
version: '
|
63
|
+
version: '1.0'
|
64
|
+
- - ">="
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: 1.0.2
|
61
67
|
- !ruby/object:Gem::Dependency
|
62
|
-
name:
|
68
|
+
name: minitest
|
63
69
|
requirement: !ruby/object:Gem::Requirement
|
64
70
|
requirements:
|
65
|
-
- - "~>"
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version: '1.0'
|
68
71
|
- - ">="
|
69
72
|
- !ruby/object:Gem::Version
|
70
|
-
version: 1
|
73
|
+
version: '5.1'
|
71
74
|
type: :runtime
|
72
75
|
prerelease: false
|
73
76
|
version_requirements: !ruby/object:Gem::Requirement
|
74
77
|
requirements:
|
75
|
-
- - "~>"
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
version: '1.0'
|
78
78
|
- - ">="
|
79
79
|
- !ruby/object:Gem::Version
|
80
|
-
version: 1
|
80
|
+
version: '5.1'
|
81
81
|
description: A toolkit of support libraries and Ruby core extensions extracted from
|
82
82
|
the Rails framework. Rich support for multibyte strings, internationalization, time
|
83
83
|
zones, and testing.
|
@@ -90,6 +90,7 @@ files:
|
|
90
90
|
- MIT-LICENSE
|
91
91
|
- README.rdoc
|
92
92
|
- lib/active_support.rb
|
93
|
+
- lib/active_support/actionable_error.rb
|
93
94
|
- lib/active_support/all.rb
|
94
95
|
- lib/active_support/array_inquirer.rb
|
95
96
|
- lib/active_support/backtrace_cleaner.rb
|
@@ -104,18 +105,21 @@ files:
|
|
104
105
|
- lib/active_support/cache/strategy/local_cache.rb
|
105
106
|
- lib/active_support/cache/strategy/local_cache_middleware.rb
|
106
107
|
- lib/active_support/callbacks.rb
|
108
|
+
- lib/active_support/code_generator.rb
|
107
109
|
- lib/active_support/concern.rb
|
108
110
|
- lib/active_support/concurrency/load_interlock_aware_monitor.rb
|
109
111
|
- lib/active_support/concurrency/share_lock.rb
|
110
112
|
- lib/active_support/configurable.rb
|
113
|
+
- lib/active_support/configuration_file.rb
|
111
114
|
- lib/active_support/core_ext.rb
|
112
115
|
- lib/active_support/core_ext/array.rb
|
113
116
|
- lib/active_support/core_ext/array/access.rb
|
114
117
|
- lib/active_support/core_ext/array/conversions.rb
|
118
|
+
- lib/active_support/core_ext/array/deprecated_conversions.rb
|
119
|
+
- lib/active_support/core_ext/array/extract.rb
|
115
120
|
- lib/active_support/core_ext/array/extract_options.rb
|
116
121
|
- lib/active_support/core_ext/array/grouping.rb
|
117
122
|
- lib/active_support/core_ext/array/inquiry.rb
|
118
|
-
- lib/active_support/core_ext/array/prepend_and_append.rb
|
119
123
|
- lib/active_support/core_ext/array/wrap.rb
|
120
124
|
- lib/active_support/core_ext/benchmark.rb
|
121
125
|
- lib/active_support/core_ext/big_decimal.rb
|
@@ -129,6 +133,7 @@ files:
|
|
129
133
|
- lib/active_support/core_ext/date/blank.rb
|
130
134
|
- lib/active_support/core_ext/date/calculations.rb
|
131
135
|
- lib/active_support/core_ext/date/conversions.rb
|
136
|
+
- lib/active_support/core_ext/date/deprecated_conversions.rb
|
132
137
|
- lib/active_support/core_ext/date/zones.rb
|
133
138
|
- lib/active_support/core_ext/date_and_time/calculations.rb
|
134
139
|
- lib/active_support/core_ext/date_and_time/compatibility.rb
|
@@ -139,32 +144,30 @@ files:
|
|
139
144
|
- lib/active_support/core_ext/date_time/calculations.rb
|
140
145
|
- lib/active_support/core_ext/date_time/compatibility.rb
|
141
146
|
- lib/active_support/core_ext/date_time/conversions.rb
|
147
|
+
- lib/active_support/core_ext/date_time/deprecated_conversions.rb
|
142
148
|
- lib/active_support/core_ext/digest.rb
|
143
149
|
- lib/active_support/core_ext/digest/uuid.rb
|
144
150
|
- lib/active_support/core_ext/enumerable.rb
|
145
151
|
- lib/active_support/core_ext/file.rb
|
146
152
|
- lib/active_support/core_ext/file/atomic.rb
|
147
153
|
- lib/active_support/core_ext/hash.rb
|
148
|
-
- lib/active_support/core_ext/hash/compact.rb
|
149
154
|
- lib/active_support/core_ext/hash/conversions.rb
|
150
155
|
- lib/active_support/core_ext/hash/deep_merge.rb
|
156
|
+
- lib/active_support/core_ext/hash/deep_transform_values.rb
|
151
157
|
- lib/active_support/core_ext/hash/except.rb
|
152
158
|
- lib/active_support/core_ext/hash/indifferent_access.rb
|
153
159
|
- lib/active_support/core_ext/hash/keys.rb
|
154
160
|
- lib/active_support/core_ext/hash/reverse_merge.rb
|
155
161
|
- lib/active_support/core_ext/hash/slice.rb
|
156
|
-
- lib/active_support/core_ext/hash/transform_values.rb
|
157
162
|
- lib/active_support/core_ext/integer.rb
|
158
163
|
- lib/active_support/core_ext/integer/inflections.rb
|
159
164
|
- lib/active_support/core_ext/integer/multiple.rb
|
160
165
|
- lib/active_support/core_ext/integer/time.rb
|
161
166
|
- lib/active_support/core_ext/kernel.rb
|
162
|
-
- lib/active_support/core_ext/kernel/agnostics.rb
|
163
167
|
- lib/active_support/core_ext/kernel/concern.rb
|
164
168
|
- lib/active_support/core_ext/kernel/reporting.rb
|
165
169
|
- lib/active_support/core_ext/kernel/singleton_class.rb
|
166
170
|
- lib/active_support/core_ext/load_error.rb
|
167
|
-
- lib/active_support/core_ext/marshal.rb
|
168
171
|
- lib/active_support/core_ext/module.rb
|
169
172
|
- lib/active_support/core_ext/module/aliasing.rb
|
170
173
|
- lib/active_support/core_ext/module/anonymous.rb
|
@@ -175,14 +178,13 @@ files:
|
|
175
178
|
- lib/active_support/core_ext/module/delegation.rb
|
176
179
|
- lib/active_support/core_ext/module/deprecation.rb
|
177
180
|
- lib/active_support/core_ext/module/introspection.rb
|
178
|
-
- lib/active_support/core_ext/module/reachable.rb
|
179
181
|
- lib/active_support/core_ext/module/redefine_method.rb
|
180
182
|
- lib/active_support/core_ext/module/remove_method.rb
|
181
183
|
- lib/active_support/core_ext/name_error.rb
|
182
184
|
- lib/active_support/core_ext/numeric.rb
|
183
185
|
- lib/active_support/core_ext/numeric/bytes.rb
|
184
186
|
- lib/active_support/core_ext/numeric/conversions.rb
|
185
|
-
- lib/active_support/core_ext/numeric/
|
187
|
+
- lib/active_support/core_ext/numeric/deprecated_conversions.rb
|
186
188
|
- lib/active_support/core_ext/numeric/time.rb
|
187
189
|
- lib/active_support/core_ext/object.rb
|
188
190
|
- lib/active_support/core_ext/object/acts_like.rb
|
@@ -197,11 +199,13 @@ files:
|
|
197
199
|
- lib/active_support/core_ext/object/to_query.rb
|
198
200
|
- lib/active_support/core_ext/object/try.rb
|
199
201
|
- lib/active_support/core_ext/object/with_options.rb
|
202
|
+
- lib/active_support/core_ext/pathname.rb
|
203
|
+
- lib/active_support/core_ext/pathname/existence.rb
|
200
204
|
- lib/active_support/core_ext/range.rb
|
201
205
|
- lib/active_support/core_ext/range/compare_range.rb
|
202
206
|
- lib/active_support/core_ext/range/conversions.rb
|
207
|
+
- lib/active_support/core_ext/range/deprecated_conversions.rb
|
203
208
|
- lib/active_support/core_ext/range/each.rb
|
204
|
-
- lib/active_support/core_ext/range/include_range.rb
|
205
209
|
- lib/active_support/core_ext/range/include_time_with_zone.rb
|
206
210
|
- lib/active_support/core_ext/range/overlaps.rb
|
207
211
|
- lib/active_support/core_ext/regexp.rb
|
@@ -220,20 +224,26 @@ files:
|
|
220
224
|
- lib/active_support/core_ext/string/starts_ends_with.rb
|
221
225
|
- lib/active_support/core_ext/string/strip.rb
|
222
226
|
- lib/active_support/core_ext/string/zones.rb
|
227
|
+
- lib/active_support/core_ext/symbol.rb
|
228
|
+
- lib/active_support/core_ext/symbol/starts_ends_with.rb
|
223
229
|
- lib/active_support/core_ext/time.rb
|
224
230
|
- lib/active_support/core_ext/time/acts_like.rb
|
225
231
|
- lib/active_support/core_ext/time/calculations.rb
|
226
232
|
- lib/active_support/core_ext/time/compatibility.rb
|
227
233
|
- lib/active_support/core_ext/time/conversions.rb
|
234
|
+
- lib/active_support/core_ext/time/deprecated_conversions.rb
|
228
235
|
- lib/active_support/core_ext/time/zones.rb
|
229
236
|
- lib/active_support/core_ext/uri.rb
|
230
237
|
- lib/active_support/current_attributes.rb
|
238
|
+
- lib/active_support/current_attributes/test_helper.rb
|
231
239
|
- lib/active_support/dependencies.rb
|
232
240
|
- lib/active_support/dependencies/autoload.rb
|
233
241
|
- lib/active_support/dependencies/interlock.rb
|
242
|
+
- lib/active_support/dependencies/require_dependency.rb
|
234
243
|
- lib/active_support/deprecation.rb
|
235
244
|
- lib/active_support/deprecation/behaviors.rb
|
236
245
|
- lib/active_support/deprecation/constant_accessor.rb
|
246
|
+
- lib/active_support/deprecation/disallowed.rb
|
237
247
|
- lib/active_support/deprecation/instance_delegator.rb
|
238
248
|
- lib/active_support/deprecation/method_wrappers.rb
|
239
249
|
- lib/active_support/deprecation/proxy_wrappers.rb
|
@@ -245,13 +255,20 @@ files:
|
|
245
255
|
- lib/active_support/duration/iso8601_serializer.rb
|
246
256
|
- lib/active_support/encrypted_configuration.rb
|
247
257
|
- lib/active_support/encrypted_file.rb
|
258
|
+
- lib/active_support/environment_inquirer.rb
|
259
|
+
- lib/active_support/error_reporter.rb
|
248
260
|
- lib/active_support/evented_file_update_checker.rb
|
261
|
+
- lib/active_support/execution_context.rb
|
262
|
+
- lib/active_support/execution_context/test_helper.rb
|
249
263
|
- lib/active_support/execution_wrapper.rb
|
250
264
|
- lib/active_support/executor.rb
|
265
|
+
- lib/active_support/executor/test_helper.rb
|
251
266
|
- lib/active_support/file_update_checker.rb
|
267
|
+
- lib/active_support/fork_tracker.rb
|
252
268
|
- lib/active_support/gem_version.rb
|
253
269
|
- lib/active_support/gzip.rb
|
254
270
|
- lib/active_support/hash_with_indifferent_access.rb
|
271
|
+
- lib/active_support/html_safe_translation.rb
|
255
272
|
- lib/active_support/i18n.rb
|
256
273
|
- lib/active_support/i18n_railtie.rb
|
257
274
|
- lib/active_support/inflections.rb
|
@@ -259,11 +276,13 @@ files:
|
|
259
276
|
- lib/active_support/inflector/inflections.rb
|
260
277
|
- lib/active_support/inflector/methods.rb
|
261
278
|
- lib/active_support/inflector/transliterate.rb
|
279
|
+
- lib/active_support/isolated_execution_state.rb
|
262
280
|
- lib/active_support/json.rb
|
263
281
|
- lib/active_support/json/decoding.rb
|
264
282
|
- lib/active_support/json/encoding.rb
|
265
283
|
- lib/active_support/key_generator.rb
|
266
284
|
- lib/active_support/lazy_load_hooks.rb
|
285
|
+
- lib/active_support/locale/en.rb
|
267
286
|
- lib/active_support/locale/en.yml
|
268
287
|
- lib/active_support/log_subscriber.rb
|
269
288
|
- lib/active_support/log_subscriber/test_helper.rb
|
@@ -294,12 +313,15 @@ files:
|
|
294
313
|
- lib/active_support/option_merger.rb
|
295
314
|
- lib/active_support/ordered_hash.rb
|
296
315
|
- lib/active_support/ordered_options.rb
|
316
|
+
- lib/active_support/parameter_filter.rb
|
297
317
|
- lib/active_support/per_thread_registry.rb
|
298
318
|
- lib/active_support/proxy_object.rb
|
299
319
|
- lib/active_support/rails.rb
|
300
320
|
- lib/active_support/railtie.rb
|
301
321
|
- lib/active_support/reloader.rb
|
302
322
|
- lib/active_support/rescuable.rb
|
323
|
+
- lib/active_support/ruby_features.rb
|
324
|
+
- lib/active_support/secure_compare_rotator.rb
|
303
325
|
- lib/active_support/security_utils.rb
|
304
326
|
- lib/active_support/string_inquirer.rb
|
305
327
|
- lib/active_support/subscriber.rb
|
@@ -313,6 +335,10 @@ files:
|
|
313
335
|
- lib/active_support/testing/file_fixtures.rb
|
314
336
|
- lib/active_support/testing/isolation.rb
|
315
337
|
- lib/active_support/testing/method_call_assertions.rb
|
338
|
+
- lib/active_support/testing/parallelization.rb
|
339
|
+
- lib/active_support/testing/parallelization/server.rb
|
340
|
+
- lib/active_support/testing/parallelization/worker.rb
|
341
|
+
- lib/active_support/testing/parallelize_executor.rb
|
316
342
|
- lib/active_support/testing/setup_and_teardown.rb
|
317
343
|
- lib/active_support/testing/stream.rb
|
318
344
|
- lib/active_support/testing/tagged_logging.rb
|
@@ -320,7 +346,6 @@ files:
|
|
320
346
|
- lib/active_support/time.rb
|
321
347
|
- lib/active_support/time_with_zone.rb
|
322
348
|
- lib/active_support/values/time_zone.rb
|
323
|
-
- lib/active_support/values/unicode_tables.dat
|
324
349
|
- lib/active_support/version.rb
|
325
350
|
- lib/active_support/xml_mini.rb
|
326
351
|
- lib/active_support/xml_mini/jdom.rb
|
@@ -329,13 +354,17 @@ files:
|
|
329
354
|
- lib/active_support/xml_mini/nokogiri.rb
|
330
355
|
- lib/active_support/xml_mini/nokogirisax.rb
|
331
356
|
- lib/active_support/xml_mini/rexml.rb
|
332
|
-
homepage:
|
357
|
+
homepage: https://rubyonrails.org
|
333
358
|
licenses:
|
334
359
|
- MIT
|
335
360
|
metadata:
|
336
|
-
|
337
|
-
changelog_uri: https://github.com/rails/rails/blob/
|
338
|
-
|
361
|
+
bug_tracker_uri: https://github.com/rails/rails/issues
|
362
|
+
changelog_uri: https://github.com/rails/rails/blob/v7.0.3/activesupport/CHANGELOG.md
|
363
|
+
documentation_uri: https://api.rubyonrails.org/v7.0.3/
|
364
|
+
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
365
|
+
source_code_uri: https://github.com/rails/rails/tree/v7.0.3/activesupport
|
366
|
+
rubygems_mfa_required: 'true'
|
367
|
+
post_install_message:
|
339
368
|
rdoc_options:
|
340
369
|
- "--encoding"
|
341
370
|
- UTF-8
|
@@ -345,15 +374,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
345
374
|
requirements:
|
346
375
|
- - ">="
|
347
376
|
- !ruby/object:Gem::Version
|
348
|
-
version: 2.
|
377
|
+
version: 2.7.0
|
349
378
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
350
379
|
requirements:
|
351
380
|
- - ">="
|
352
381
|
- !ruby/object:Gem::Version
|
353
382
|
version: '0'
|
354
383
|
requirements: []
|
355
|
-
rubygems_version: 3.
|
356
|
-
signing_key:
|
384
|
+
rubygems_version: 3.3.7
|
385
|
+
signing_key:
|
357
386
|
specification_version: 4
|
358
387
|
summary: A toolkit of support libraries and Ruby core extensions extracted from the
|
359
388
|
Rails framework.
|
@@ -1,9 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
class Array
|
4
|
-
# The human way of thinking about adding stuff to the end of a list is with append.
|
5
|
-
alias_method :append, :push unless [].respond_to?(:append)
|
6
|
-
|
7
|
-
# The human way of thinking about adding stuff to the beginning of a list is with prepend.
|
8
|
-
alias_method :prepend, :unshift unless [].respond_to?(:prepend)
|
9
|
-
end
|
@@ -1,29 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
class Hash
|
4
|
-
unless Hash.instance_methods(false).include?(:compact)
|
5
|
-
# Returns a hash with non +nil+ values.
|
6
|
-
#
|
7
|
-
# hash = { a: true, b: false, c: nil }
|
8
|
-
# hash.compact # => { a: true, b: false }
|
9
|
-
# hash # => { a: true, b: false, c: nil }
|
10
|
-
# { c: nil }.compact # => {}
|
11
|
-
# { c: true }.compact # => { c: true }
|
12
|
-
def compact
|
13
|
-
select { |_, value| !value.nil? }
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
unless Hash.instance_methods(false).include?(:compact!)
|
18
|
-
# Replaces current hash with non +nil+ values.
|
19
|
-
# Returns +nil+ if no changes were made, otherwise returns the hash.
|
20
|
-
#
|
21
|
-
# hash = { a: true, b: false, c: nil }
|
22
|
-
# hash.compact! # => { a: true, b: false }
|
23
|
-
# hash # => { a: true, b: false }
|
24
|
-
# { c: true }.compact! # => nil
|
25
|
-
def compact!
|
26
|
-
reject! { |_, value| value.nil? }
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
@@ -1,32 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
class Hash
|
4
|
-
# Returns a new hash with the results of running +block+ once for every value.
|
5
|
-
# The keys are unchanged.
|
6
|
-
#
|
7
|
-
# { a: 1, b: 2, c: 3 }.transform_values { |x| x * 2 } # => { a: 2, b: 4, c: 6 }
|
8
|
-
#
|
9
|
-
# If you do not provide a +block+, it will return an Enumerator
|
10
|
-
# for chaining with other methods:
|
11
|
-
#
|
12
|
-
# { a: 1, b: 2 }.transform_values.with_index { |v, i| [v, i].join.to_i } # => { a: 10, b: 21 }
|
13
|
-
def transform_values
|
14
|
-
return enum_for(:transform_values) { size } unless block_given?
|
15
|
-
return {} if empty?
|
16
|
-
result = self.class.new
|
17
|
-
each do |key, value|
|
18
|
-
result[key] = yield(value)
|
19
|
-
end
|
20
|
-
result
|
21
|
-
end unless method_defined? :transform_values
|
22
|
-
|
23
|
-
# Destructively converts all values using the +block+ operations.
|
24
|
-
# Same as +transform_values+ but modifies +self+.
|
25
|
-
def transform_values!
|
26
|
-
return enum_for(:transform_values!) { size } unless block_given?
|
27
|
-
each do |key, value|
|
28
|
-
self[key] = yield(value)
|
29
|
-
end
|
30
|
-
end unless method_defined? :transform_values!
|
31
|
-
# TODO: Remove this file when supporting only Ruby 2.4+.
|
32
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
class Object
|
4
|
-
# Makes backticks behave (somewhat more) similarly on all platforms.
|
5
|
-
# On win32 `nonexistent_command` raises Errno::ENOENT; on Unix, the
|
6
|
-
# spawned shell prints a message to stderr and sets $?. We emulate
|
7
|
-
# Unix on the former but not the latter.
|
8
|
-
def `(command) #:nodoc:
|
9
|
-
super
|
10
|
-
rescue Errno::ENOENT => e
|
11
|
-
STDERR.puts "#$0: #{e}"
|
12
|
-
end
|
13
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module ActiveSupport
|
4
|
-
module MarshalWithAutoloading # :nodoc:
|
5
|
-
def load(source, proc = nil)
|
6
|
-
super(source, proc)
|
7
|
-
rescue ArgumentError, NameError => exc
|
8
|
-
if exc.message.match(%r|undefined class/module (.+?)(?:::)?\z|)
|
9
|
-
# try loading the class/module
|
10
|
-
loaded = $1.constantize
|
11
|
-
|
12
|
-
raise unless $1 == loaded.name
|
13
|
-
|
14
|
-
# if it is an IO we need to go back to read the object
|
15
|
-
source.rewind if source.respond_to?(:rewind)
|
16
|
-
retry
|
17
|
-
else
|
18
|
-
raise exc
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
Marshal.singleton_class.prepend(ActiveSupport::MarshalWithAutoloading)
|
@@ -1,11 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "active_support/core_ext/module/anonymous"
|
4
|
-
require "active_support/core_ext/string/inflections"
|
5
|
-
|
6
|
-
class Module
|
7
|
-
def reachable? #:nodoc:
|
8
|
-
!anonymous? && name.safe_constantize.equal?(self)
|
9
|
-
end
|
10
|
-
deprecate :reachable?
|
11
|
-
end
|
@@ -1,28 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
unless 1.respond_to?(:positive?) # TODO: Remove this file when we drop support to ruby < 2.3
|
4
|
-
class Numeric
|
5
|
-
# Returns true if the number is positive.
|
6
|
-
#
|
7
|
-
# 1.positive? # => true
|
8
|
-
# 0.positive? # => false
|
9
|
-
# -1.positive? # => false
|
10
|
-
def positive?
|
11
|
-
self > 0
|
12
|
-
end
|
13
|
-
|
14
|
-
# Returns true if the number is negative.
|
15
|
-
#
|
16
|
-
# -1.negative? # => true
|
17
|
-
# 0.negative? # => false
|
18
|
-
# 1.negative? # => false
|
19
|
-
def negative?
|
20
|
-
self < 0
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
class Complex
|
25
|
-
undef :positive?
|
26
|
-
undef :negative?
|
27
|
-
end
|
28
|
-
end
|
Binary file
|