activesupport 5.0.0 → 6.1.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of activesupport might be problematic. Click here for more details.
- checksums.yaml +5 -5
- data/CHANGELOG.md +343 -590
- data/MIT-LICENSE +1 -1
- data/README.rdoc +5 -4
- data/lib/active_support/actionable_error.rb +48 -0
- data/lib/active_support/all.rb +5 -3
- data/lib/active_support/array_inquirer.rb +11 -5
- data/lib/active_support/backtrace_cleaner.rb +33 -5
- data/lib/active_support/benchmarkable.rb +5 -3
- data/lib/active_support/builder.rb +3 -1
- data/lib/active_support/cache/file_store.rb +45 -53
- data/lib/active_support/cache/mem_cache_store.rb +81 -79
- data/lib/active_support/cache/memory_store.rb +69 -41
- data/lib/active_support/cache/null_store.rb +11 -4
- data/lib/active_support/cache/redis_cache_store.rb +493 -0
- data/lib/active_support/cache/strategy/local_cache.rb +74 -37
- data/lib/active_support/cache/strategy/local_cache_middleware.rb +10 -9
- data/lib/active_support/cache.rb +332 -161
- data/lib/active_support/callbacks.rb +657 -586
- data/lib/active_support/concern.rb +79 -6
- data/lib/active_support/concurrency/load_interlock_aware_monitor.rb +35 -0
- data/lib/active_support/concurrency/share_lock.rb +59 -19
- data/lib/active_support/configurable.rb +15 -17
- data/lib/active_support/configuration_file.rb +46 -0
- data/lib/active_support/core_ext/array/access.rb +21 -7
- data/lib/active_support/core_ext/array/conversions.rb +20 -18
- data/lib/active_support/core_ext/array/extract.rb +21 -0
- data/lib/active_support/core_ext/array/extract_options.rb +2 -0
- data/lib/active_support/core_ext/array/grouping.rb +3 -1
- data/lib/active_support/core_ext/array/inquiry.rb +3 -1
- data/lib/active_support/core_ext/array/wrap.rb +2 -0
- data/lib/active_support/core_ext/array.rb +9 -7
- data/lib/active_support/core_ext/benchmark.rb +5 -3
- data/lib/active_support/core_ext/big_decimal/conversions.rb +6 -6
- data/lib/active_support/core_ext/big_decimal.rb +3 -1
- data/lib/active_support/core_ext/class/attribute.rb +52 -49
- data/lib/active_support/core_ext/class/attribute_accessors.rb +3 -1
- data/lib/active_support/core_ext/class/subclasses.rb +18 -26
- data/lib/active_support/core_ext/class.rb +4 -2
- data/lib/active_support/core_ext/date/acts_like.rb +3 -1
- data/lib/active_support/core_ext/date/blank.rb +3 -1
- data/lib/active_support/core_ext/date/calculations.rb +16 -13
- data/lib/active_support/core_ext/date/conversions.rb +23 -21
- data/lib/active_support/core_ext/date/zones.rb +4 -2
- data/lib/active_support/core_ext/date.rb +7 -5
- data/lib/active_support/core_ext/date_and_time/calculations.rb +82 -53
- data/lib/active_support/core_ext/date_and_time/compatibility.rb +18 -5
- data/lib/active_support/core_ext/date_and_time/zones.rb +9 -9
- data/lib/active_support/core_ext/date_time/acts_like.rb +4 -2
- data/lib/active_support/core_ext/date_time/blank.rb +3 -1
- data/lib/active_support/core_ext/date_time/calculations.rb +23 -11
- data/lib/active_support/core_ext/date_time/compatibility.rb +15 -2
- data/lib/active_support/core_ext/date_time/conversions.rb +14 -13
- data/lib/active_support/core_ext/date_time.rb +7 -5
- data/lib/active_support/core_ext/digest/uuid.rb +7 -5
- data/lib/active_support/core_ext/digest.rb +3 -0
- data/lib/active_support/core_ext/enumerable.rb +165 -29
- data/lib/active_support/core_ext/file/atomic.rb +7 -5
- data/lib/active_support/core_ext/file.rb +3 -1
- data/lib/active_support/core_ext/hash/conversions.rb +40 -39
- data/lib/active_support/core_ext/hash/deep_merge.rb +8 -12
- data/lib/active_support/core_ext/hash/deep_transform_values.rb +46 -0
- data/lib/active_support/core_ext/hash/except.rb +4 -2
- data/lib/active_support/core_ext/hash/indifferent_access.rb +3 -2
- data/lib/active_support/core_ext/hash/keys.rb +9 -36
- data/lib/active_support/core_ext/hash/reverse_merge.rb +5 -2
- data/lib/active_support/core_ext/hash/slice.rb +8 -29
- data/lib/active_support/core_ext/hash.rb +10 -9
- data/lib/active_support/core_ext/integer/inflections.rb +3 -1
- data/lib/active_support/core_ext/integer/multiple.rb +3 -1
- data/lib/active_support/core_ext/integer/time.rb +11 -18
- data/lib/active_support/core_ext/integer.rb +5 -3
- data/lib/active_support/core_ext/kernel/concern.rb +3 -1
- data/lib/active_support/core_ext/kernel/reporting.rb +3 -1
- data/lib/active_support/core_ext/kernel/singleton_class.rb +2 -0
- data/lib/active_support/core_ext/kernel.rb +5 -4
- data/lib/active_support/core_ext/load_error.rb +2 -23
- data/lib/active_support/core_ext/marshal.rb +6 -2
- data/lib/active_support/core_ext/module/aliasing.rb +5 -48
- data/lib/active_support/core_ext/module/anonymous.rb +2 -0
- data/lib/active_support/core_ext/module/attr_internal.rb +7 -5
- data/lib/active_support/core_ext/module/attribute_accessors.rb +53 -59
- data/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb +31 -24
- data/lib/active_support/core_ext/module/concerning.rb +16 -11
- data/lib/active_support/core_ext/module/delegation.rb +159 -44
- data/lib/active_support/core_ext/module/deprecation.rb +2 -0
- data/lib/active_support/core_ext/module/introspection.rb +23 -26
- data/lib/active_support/core_ext/module/redefine_method.rb +40 -0
- data/lib/active_support/core_ext/module/remove_method.rb +5 -23
- data/lib/active_support/core_ext/module.rb +13 -12
- data/lib/active_support/core_ext/name_error.rb +36 -2
- data/lib/active_support/core_ext/numeric/bytes.rb +2 -0
- data/lib/active_support/core_ext/numeric/conversions.rb +129 -134
- data/lib/active_support/core_ext/numeric/time.rb +18 -26
- data/lib/active_support/core_ext/numeric.rb +5 -4
- data/lib/active_support/core_ext/object/acts_like.rb +12 -1
- data/lib/active_support/core_ext/object/blank.rb +14 -2
- data/lib/active_support/core_ext/object/conversions.rb +6 -4
- data/lib/active_support/core_ext/object/deep_dup.rb +4 -2
- data/lib/active_support/core_ext/object/duplicable.rb +13 -62
- data/lib/active_support/core_ext/object/inclusion.rb +3 -1
- data/lib/active_support/core_ext/object/instance_variables.rb +2 -0
- data/lib/active_support/core_ext/object/json.rb +42 -15
- data/lib/active_support/core_ext/object/to_param.rb +3 -1
- data/lib/active_support/core_ext/object/to_query.rb +10 -5
- data/lib/active_support/core_ext/object/try.rb +20 -8
- data/lib/active_support/core_ext/object/with_options.rb +15 -2
- data/lib/active_support/core_ext/object.rb +14 -12
- data/lib/active_support/core_ext/range/compare_range.rb +82 -0
- data/lib/active_support/core_ext/range/conversions.rb +35 -25
- data/lib/active_support/core_ext/range/each.rb +5 -2
- data/lib/active_support/core_ext/range/include_time_with_zone.rb +28 -0
- data/lib/active_support/core_ext/range/overlaps.rb +2 -0
- data/lib/active_support/core_ext/range.rb +7 -4
- data/lib/active_support/core_ext/regexp.rb +10 -1
- data/lib/active_support/core_ext/securerandom.rb +28 -6
- data/lib/active_support/core_ext/string/access.rb +9 -18
- data/lib/active_support/core_ext/string/behavior.rb +2 -0
- data/lib/active_support/core_ext/string/conversions.rb +5 -2
- data/lib/active_support/core_ext/string/exclude.rb +2 -0
- data/lib/active_support/core_ext/string/filters.rb +47 -4
- data/lib/active_support/core_ext/string/indent.rb +6 -4
- data/lib/active_support/core_ext/string/inflections.rb +78 -29
- data/lib/active_support/core_ext/string/inquiry.rb +4 -1
- data/lib/active_support/core_ext/string/multibyte.rb +10 -5
- data/lib/active_support/core_ext/string/output_safety.rb +86 -31
- data/lib/active_support/core_ext/string/starts_ends_with.rb +4 -2
- data/lib/active_support/core_ext/string/strip.rb +5 -1
- data/lib/active_support/core_ext/string/zones.rb +4 -2
- data/lib/active_support/core_ext/string.rb +15 -13
- data/lib/active_support/core_ext/symbol/starts_ends_with.rb +14 -0
- data/lib/active_support/core_ext/symbol.rb +3 -0
- data/lib/active_support/core_ext/time/acts_like.rb +3 -1
- data/lib/active_support/core_ext/time/calculations.rb +117 -45
- data/lib/active_support/core_ext/time/compatibility.rb +13 -2
- data/lib/active_support/core_ext/time/conversions.rb +18 -12
- data/lib/active_support/core_ext/time/zones.rb +9 -7
- data/lib/active_support/core_ext/time.rb +7 -5
- data/lib/active_support/core_ext/uri.rb +12 -7
- data/lib/active_support/core_ext.rb +3 -2
- data/lib/active_support/current_attributes/test_helper.rb +13 -0
- data/lib/active_support/current_attributes.rb +208 -0
- data/lib/active_support/dependencies/autoload.rb +2 -0
- data/lib/active_support/dependencies/interlock.rb +7 -1
- data/lib/active_support/dependencies/zeitwerk_integration.rb +117 -0
- data/lib/active_support/dependencies.rb +172 -98
- data/lib/active_support/deprecation/behaviors.rb +45 -13
- data/lib/active_support/deprecation/constant_accessor.rb +52 -0
- data/lib/active_support/deprecation/disallowed.rb +56 -0
- data/lib/active_support/deprecation/instance_delegator.rb +16 -2
- data/lib/active_support/deprecation/method_wrappers.rb +32 -17
- data/lib/active_support/deprecation/proxy_wrappers.rb +35 -7
- data/lib/active_support/deprecation/reporting.rb +61 -16
- data/lib/active_support/deprecation.rb +17 -9
- data/lib/active_support/descendants_tracker.rb +61 -9
- data/lib/active_support/digest.rb +20 -0
- data/lib/active_support/duration/iso8601_parser.rb +67 -66
- data/lib/active_support/duration/iso8601_serializer.rb +25 -17
- data/lib/active_support/duration.rb +349 -46
- data/lib/active_support/encrypted_configuration.rb +45 -0
- data/lib/active_support/encrypted_file.rb +117 -0
- data/lib/active_support/environment_inquirer.rb +20 -0
- data/lib/active_support/evented_file_update_checker.rb +88 -112
- data/lib/active_support/execution_wrapper.rb +25 -13
- data/lib/active_support/executor.rb +3 -1
- data/lib/active_support/file_update_checker.rb +56 -51
- data/lib/active_support/fork_tracker.rb +62 -0
- data/lib/active_support/gem_version.rb +4 -2
- data/lib/active_support/gzip.rb +7 -5
- data/lib/active_support/hash_with_indifferent_access.rb +153 -49
- data/lib/active_support/i18n.rb +9 -6
- data/lib/active_support/i18n_railtie.rb +30 -20
- data/lib/active_support/inflections.rb +13 -11
- data/lib/active_support/inflector/inflections.rb +28 -15
- data/lib/active_support/inflector/methods.rb +120 -109
- data/lib/active_support/inflector/transliterate.rb +60 -25
- data/lib/active_support/inflector.rb +7 -5
- data/lib/active_support/json/decoding.rb +30 -29
- data/lib/active_support/json/encoding.rb +22 -11
- data/lib/active_support/json.rb +4 -2
- data/lib/active_support/key_generator.rb +6 -36
- data/lib/active_support/lazy_load_hooks.rb +53 -20
- data/lib/active_support/locale/en.rb +33 -0
- data/lib/active_support/locale/en.yml +7 -3
- data/lib/active_support/log_subscriber/test_helper.rb +11 -9
- data/lib/active_support/log_subscriber.rb +51 -18
- data/lib/active_support/logger.rb +9 -22
- data/lib/active_support/logger_silence.rb +14 -21
- data/lib/active_support/logger_thread_safe_level.rb +55 -8
- data/lib/active_support/message_encryptor.rb +170 -53
- data/lib/active_support/message_verifier.rb +91 -20
- data/lib/active_support/messages/metadata.rb +80 -0
- data/lib/active_support/messages/rotation_configuration.rb +23 -0
- data/lib/active_support/messages/rotator.rb +57 -0
- data/lib/active_support/multibyte/chars.rb +24 -78
- data/lib/active_support/multibyte/unicode.rb +21 -352
- data/lib/active_support/multibyte.rb +4 -2
- data/lib/active_support/notifications/fanout.rb +121 -19
- data/lib/active_support/notifications/instrumenter.rb +78 -14
- data/lib/active_support/notifications.rb +80 -12
- data/lib/active_support/number_helper/number_converter.rb +17 -16
- data/lib/active_support/number_helper/number_to_currency_converter.rb +6 -9
- data/lib/active_support/number_helper/number_to_delimited_converter.rb +5 -3
- data/lib/active_support/number_helper/number_to_human_converter.rb +13 -12
- data/lib/active_support/number_helper/number_to_human_size_converter.rb +11 -13
- data/lib/active_support/number_helper/number_to_percentage_converter.rb +5 -1
- data/lib/active_support/number_helper/number_to_phone_converter.rb +5 -4
- data/lib/active_support/number_helper/number_to_rounded_converter.rb +18 -55
- data/lib/active_support/number_helper/rounding_helper.rb +50 -0
- data/lib/active_support/number_helper.rb +45 -16
- data/lib/active_support/option_merger.rb +25 -4
- data/lib/active_support/ordered_hash.rb +6 -4
- data/lib/active_support/ordered_options.rb +23 -9
- data/lib/active_support/parameter_filter.rb +133 -0
- data/lib/active_support/per_thread_registry.rb +7 -5
- data/lib/active_support/proxy_object.rb +2 -0
- data/lib/active_support/rails.rb +8 -9
- data/lib/active_support/railtie.rb +62 -11
- data/lib/active_support/reloader.rb +12 -11
- data/lib/active_support/rescuable.rb +20 -11
- data/lib/active_support/secure_compare_rotator.rb +51 -0
- data/lib/active_support/security_utils.rb +26 -15
- data/lib/active_support/string_inquirer.rb +12 -3
- data/lib/active_support/subscriber.rb +77 -23
- data/lib/active_support/tagged_logging.rb +52 -17
- data/lib/active_support/test_case.rb +106 -29
- data/lib/active_support/testing/assertions.rb +144 -8
- data/lib/active_support/testing/autorun.rb +5 -10
- data/lib/active_support/testing/constant_lookup.rb +2 -1
- data/lib/active_support/testing/declarative.rb +3 -1
- data/lib/active_support/testing/deprecation.rb +4 -2
- data/lib/active_support/testing/file_fixtures.rb +4 -0
- data/lib/active_support/testing/isolation.rb +19 -24
- data/lib/active_support/testing/method_call_assertions.rb +31 -2
- data/lib/active_support/testing/parallelization/server.rb +78 -0
- data/lib/active_support/testing/parallelization/worker.rb +100 -0
- data/lib/active_support/testing/parallelization.rb +51 -0
- data/lib/active_support/testing/setup_and_teardown.rb +13 -8
- data/lib/active_support/testing/stream.rb +30 -29
- data/lib/active_support/testing/tagged_logging.rb +3 -1
- data/lib/active_support/testing/time_helpers.rb +125 -24
- data/lib/active_support/time.rb +14 -12
- data/lib/active_support/time_with_zone.rb +142 -55
- data/lib/active_support/values/time_zone.rb +160 -53
- data/lib/active_support/version.rb +3 -1
- data/lib/active_support/xml_mini/jdom.rb +115 -114
- data/lib/active_support/xml_mini/libxml.rb +15 -14
- data/lib/active_support/xml_mini/libxmlsax.rb +16 -18
- data/lib/active_support/xml_mini/nokogiri.rb +13 -13
- data/lib/active_support/xml_mini/nokogirisax.rb +15 -16
- data/lib/active_support/xml_mini/rexml.rb +18 -9
- data/lib/active_support/xml_mini.rb +44 -42
- data/lib/active_support.rb +19 -10
- metadata +79 -37
- data/lib/active_support/concurrency/latch.rb +0 -19
- data/lib/active_support/core_ext/array/prepend_and_append.rb +0 -7
- data/lib/active_support/core_ext/hash/compact.rb +0 -20
- data/lib/active_support/core_ext/hash/transform_values.rb +0 -29
- data/lib/active_support/core_ext/kernel/agnostics.rb +0 -11
- data/lib/active_support/core_ext/kernel/debugger.rb +0 -3
- data/lib/active_support/core_ext/module/method_transplanting.rb +0 -3
- data/lib/active_support/core_ext/module/qualified_const.rb +0 -70
- data/lib/active_support/core_ext/module/reachable.rb +0 -8
- data/lib/active_support/core_ext/numeric/inquiry.rb +0 -26
- data/lib/active_support/core_ext/range/include_range.rb +0 -23
- data/lib/active_support/core_ext/struct.rb +0 -3
- data/lib/active_support/core_ext/time/marshal.rb +0 -3
- data/lib/active_support/values/unicode_tables.dat +0 -0
metadata
CHANGED
@@ -1,77 +1,97 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activesupport
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 6.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.6'
|
20
|
+
- - "<"
|
18
21
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
22
|
+
version: '2'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
29
|
+
version: '1.6'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '2'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: tzinfo
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
31
37
|
- - "~>"
|
32
38
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
39
|
+
version: '2.0'
|
34
40
|
type: :runtime
|
35
41
|
prerelease: false
|
36
42
|
version_requirements: !ruby/object:Gem::Requirement
|
37
43
|
requirements:
|
38
44
|
- - "~>"
|
39
45
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
46
|
+
version: '2.0'
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
48
|
+
name: concurrent-ruby
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
44
50
|
requirements:
|
45
51
|
- - "~>"
|
46
52
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
53
|
+
version: '1.0'
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: 1.0.2
|
48
57
|
type: :runtime
|
49
58
|
prerelease: false
|
50
59
|
version_requirements: !ruby/object:Gem::Requirement
|
51
60
|
requirements:
|
52
61
|
- - "~>"
|
53
62
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
63
|
+
version: '1.0'
|
64
|
+
- - ">="
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: 1.0.2
|
55
67
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
68
|
+
name: zeitwerk
|
57
69
|
requirement: !ruby/object:Gem::Requirement
|
58
70
|
requirements:
|
59
71
|
- - "~>"
|
60
72
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
62
|
-
- - ">="
|
63
|
-
- !ruby/object:Gem::Version
|
64
|
-
version: 1.0.2
|
73
|
+
version: '2.3'
|
65
74
|
type: :runtime
|
66
75
|
prerelease: false
|
67
76
|
version_requirements: !ruby/object:Gem::Requirement
|
68
77
|
requirements:
|
69
78
|
- - "~>"
|
70
79
|
- !ruby/object:Gem::Version
|
71
|
-
version: '
|
80
|
+
version: '2.3'
|
81
|
+
- !ruby/object:Gem::Dependency
|
82
|
+
name: minitest
|
83
|
+
requirement: !ruby/object:Gem::Requirement
|
84
|
+
requirements:
|
72
85
|
- - ">="
|
73
86
|
- !ruby/object:Gem::Version
|
74
|
-
version: 1
|
87
|
+
version: '5.1'
|
88
|
+
type: :runtime
|
89
|
+
prerelease: false
|
90
|
+
version_requirements: !ruby/object:Gem::Requirement
|
91
|
+
requirements:
|
92
|
+
- - ">="
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: '5.1'
|
75
95
|
description: A toolkit of support libraries and Ruby core extensions extracted from
|
76
96
|
the Rails framework. Rich support for multibyte strings, internationalization, time
|
77
97
|
zones, and testing.
|
@@ -84,6 +104,7 @@ files:
|
|
84
104
|
- MIT-LICENSE
|
85
105
|
- README.rdoc
|
86
106
|
- lib/active_support.rb
|
107
|
+
- lib/active_support/actionable_error.rb
|
87
108
|
- lib/active_support/all.rb
|
88
109
|
- lib/active_support/array_inquirer.rb
|
89
110
|
- lib/active_support/backtrace_cleaner.rb
|
@@ -94,21 +115,23 @@ files:
|
|
94
115
|
- lib/active_support/cache/mem_cache_store.rb
|
95
116
|
- lib/active_support/cache/memory_store.rb
|
96
117
|
- lib/active_support/cache/null_store.rb
|
118
|
+
- lib/active_support/cache/redis_cache_store.rb
|
97
119
|
- lib/active_support/cache/strategy/local_cache.rb
|
98
120
|
- lib/active_support/cache/strategy/local_cache_middleware.rb
|
99
121
|
- lib/active_support/callbacks.rb
|
100
122
|
- lib/active_support/concern.rb
|
101
|
-
- lib/active_support/concurrency/
|
123
|
+
- lib/active_support/concurrency/load_interlock_aware_monitor.rb
|
102
124
|
- lib/active_support/concurrency/share_lock.rb
|
103
125
|
- lib/active_support/configurable.rb
|
126
|
+
- lib/active_support/configuration_file.rb
|
104
127
|
- lib/active_support/core_ext.rb
|
105
128
|
- lib/active_support/core_ext/array.rb
|
106
129
|
- lib/active_support/core_ext/array/access.rb
|
107
130
|
- lib/active_support/core_ext/array/conversions.rb
|
131
|
+
- lib/active_support/core_ext/array/extract.rb
|
108
132
|
- lib/active_support/core_ext/array/extract_options.rb
|
109
133
|
- lib/active_support/core_ext/array/grouping.rb
|
110
134
|
- lib/active_support/core_ext/array/inquiry.rb
|
111
|
-
- lib/active_support/core_ext/array/prepend_and_append.rb
|
112
135
|
- lib/active_support/core_ext/array/wrap.rb
|
113
136
|
- lib/active_support/core_ext/benchmark.rb
|
114
137
|
- lib/active_support/core_ext/big_decimal.rb
|
@@ -132,28 +155,26 @@ files:
|
|
132
155
|
- lib/active_support/core_ext/date_time/calculations.rb
|
133
156
|
- lib/active_support/core_ext/date_time/compatibility.rb
|
134
157
|
- lib/active_support/core_ext/date_time/conversions.rb
|
158
|
+
- lib/active_support/core_ext/digest.rb
|
135
159
|
- lib/active_support/core_ext/digest/uuid.rb
|
136
160
|
- lib/active_support/core_ext/enumerable.rb
|
137
161
|
- lib/active_support/core_ext/file.rb
|
138
162
|
- lib/active_support/core_ext/file/atomic.rb
|
139
163
|
- lib/active_support/core_ext/hash.rb
|
140
|
-
- lib/active_support/core_ext/hash/compact.rb
|
141
164
|
- lib/active_support/core_ext/hash/conversions.rb
|
142
165
|
- lib/active_support/core_ext/hash/deep_merge.rb
|
166
|
+
- lib/active_support/core_ext/hash/deep_transform_values.rb
|
143
167
|
- lib/active_support/core_ext/hash/except.rb
|
144
168
|
- lib/active_support/core_ext/hash/indifferent_access.rb
|
145
169
|
- lib/active_support/core_ext/hash/keys.rb
|
146
170
|
- lib/active_support/core_ext/hash/reverse_merge.rb
|
147
171
|
- lib/active_support/core_ext/hash/slice.rb
|
148
|
-
- lib/active_support/core_ext/hash/transform_values.rb
|
149
172
|
- lib/active_support/core_ext/integer.rb
|
150
173
|
- lib/active_support/core_ext/integer/inflections.rb
|
151
174
|
- lib/active_support/core_ext/integer/multiple.rb
|
152
175
|
- lib/active_support/core_ext/integer/time.rb
|
153
176
|
- lib/active_support/core_ext/kernel.rb
|
154
|
-
- lib/active_support/core_ext/kernel/agnostics.rb
|
155
177
|
- lib/active_support/core_ext/kernel/concern.rb
|
156
|
-
- lib/active_support/core_ext/kernel/debugger.rb
|
157
178
|
- lib/active_support/core_ext/kernel/reporting.rb
|
158
179
|
- lib/active_support/core_ext/kernel/singleton_class.rb
|
159
180
|
- lib/active_support/core_ext/load_error.rb
|
@@ -168,15 +189,12 @@ files:
|
|
168
189
|
- lib/active_support/core_ext/module/delegation.rb
|
169
190
|
- lib/active_support/core_ext/module/deprecation.rb
|
170
191
|
- lib/active_support/core_ext/module/introspection.rb
|
171
|
-
- lib/active_support/core_ext/module/
|
172
|
-
- lib/active_support/core_ext/module/qualified_const.rb
|
173
|
-
- lib/active_support/core_ext/module/reachable.rb
|
192
|
+
- lib/active_support/core_ext/module/redefine_method.rb
|
174
193
|
- lib/active_support/core_ext/module/remove_method.rb
|
175
194
|
- lib/active_support/core_ext/name_error.rb
|
176
195
|
- lib/active_support/core_ext/numeric.rb
|
177
196
|
- lib/active_support/core_ext/numeric/bytes.rb
|
178
197
|
- lib/active_support/core_ext/numeric/conversions.rb
|
179
|
-
- lib/active_support/core_ext/numeric/inquiry.rb
|
180
198
|
- lib/active_support/core_ext/numeric/time.rb
|
181
199
|
- lib/active_support/core_ext/object.rb
|
182
200
|
- lib/active_support/core_ext/object/acts_like.rb
|
@@ -192,9 +210,10 @@ files:
|
|
192
210
|
- lib/active_support/core_ext/object/try.rb
|
193
211
|
- lib/active_support/core_ext/object/with_options.rb
|
194
212
|
- lib/active_support/core_ext/range.rb
|
213
|
+
- lib/active_support/core_ext/range/compare_range.rb
|
195
214
|
- lib/active_support/core_ext/range/conversions.rb
|
196
215
|
- lib/active_support/core_ext/range/each.rb
|
197
|
-
- lib/active_support/core_ext/range/
|
216
|
+
- lib/active_support/core_ext/range/include_time_with_zone.rb
|
198
217
|
- lib/active_support/core_ext/range/overlaps.rb
|
199
218
|
- lib/active_support/core_ext/regexp.rb
|
200
219
|
- lib/active_support/core_ext/securerandom.rb
|
@@ -212,32 +231,42 @@ files:
|
|
212
231
|
- lib/active_support/core_ext/string/starts_ends_with.rb
|
213
232
|
- lib/active_support/core_ext/string/strip.rb
|
214
233
|
- lib/active_support/core_ext/string/zones.rb
|
215
|
-
- lib/active_support/core_ext/
|
234
|
+
- lib/active_support/core_ext/symbol.rb
|
235
|
+
- lib/active_support/core_ext/symbol/starts_ends_with.rb
|
216
236
|
- lib/active_support/core_ext/time.rb
|
217
237
|
- lib/active_support/core_ext/time/acts_like.rb
|
218
238
|
- lib/active_support/core_ext/time/calculations.rb
|
219
239
|
- lib/active_support/core_ext/time/compatibility.rb
|
220
240
|
- lib/active_support/core_ext/time/conversions.rb
|
221
|
-
- lib/active_support/core_ext/time/marshal.rb
|
222
241
|
- lib/active_support/core_ext/time/zones.rb
|
223
242
|
- lib/active_support/core_ext/uri.rb
|
243
|
+
- lib/active_support/current_attributes.rb
|
244
|
+
- lib/active_support/current_attributes/test_helper.rb
|
224
245
|
- lib/active_support/dependencies.rb
|
225
246
|
- lib/active_support/dependencies/autoload.rb
|
226
247
|
- lib/active_support/dependencies/interlock.rb
|
248
|
+
- lib/active_support/dependencies/zeitwerk_integration.rb
|
227
249
|
- lib/active_support/deprecation.rb
|
228
250
|
- lib/active_support/deprecation/behaviors.rb
|
251
|
+
- lib/active_support/deprecation/constant_accessor.rb
|
252
|
+
- lib/active_support/deprecation/disallowed.rb
|
229
253
|
- lib/active_support/deprecation/instance_delegator.rb
|
230
254
|
- lib/active_support/deprecation/method_wrappers.rb
|
231
255
|
- lib/active_support/deprecation/proxy_wrappers.rb
|
232
256
|
- lib/active_support/deprecation/reporting.rb
|
233
257
|
- lib/active_support/descendants_tracker.rb
|
258
|
+
- lib/active_support/digest.rb
|
234
259
|
- lib/active_support/duration.rb
|
235
260
|
- lib/active_support/duration/iso8601_parser.rb
|
236
261
|
- lib/active_support/duration/iso8601_serializer.rb
|
262
|
+
- lib/active_support/encrypted_configuration.rb
|
263
|
+
- lib/active_support/encrypted_file.rb
|
264
|
+
- lib/active_support/environment_inquirer.rb
|
237
265
|
- lib/active_support/evented_file_update_checker.rb
|
238
266
|
- lib/active_support/execution_wrapper.rb
|
239
267
|
- lib/active_support/executor.rb
|
240
268
|
- lib/active_support/file_update_checker.rb
|
269
|
+
- lib/active_support/fork_tracker.rb
|
241
270
|
- lib/active_support/gem_version.rb
|
242
271
|
- lib/active_support/gzip.rb
|
243
272
|
- lib/active_support/hash_with_indifferent_access.rb
|
@@ -253,6 +282,7 @@ files:
|
|
253
282
|
- lib/active_support/json/encoding.rb
|
254
283
|
- lib/active_support/key_generator.rb
|
255
284
|
- lib/active_support/lazy_load_hooks.rb
|
285
|
+
- lib/active_support/locale/en.rb
|
256
286
|
- lib/active_support/locale/en.yml
|
257
287
|
- lib/active_support/log_subscriber.rb
|
258
288
|
- lib/active_support/log_subscriber/test_helper.rb
|
@@ -261,6 +291,9 @@ files:
|
|
261
291
|
- lib/active_support/logger_thread_safe_level.rb
|
262
292
|
- lib/active_support/message_encryptor.rb
|
263
293
|
- lib/active_support/message_verifier.rb
|
294
|
+
- lib/active_support/messages/metadata.rb
|
295
|
+
- lib/active_support/messages/rotation_configuration.rb
|
296
|
+
- lib/active_support/messages/rotator.rb
|
264
297
|
- lib/active_support/multibyte.rb
|
265
298
|
- lib/active_support/multibyte/chars.rb
|
266
299
|
- lib/active_support/multibyte/unicode.rb
|
@@ -276,15 +309,18 @@ files:
|
|
276
309
|
- lib/active_support/number_helper/number_to_percentage_converter.rb
|
277
310
|
- lib/active_support/number_helper/number_to_phone_converter.rb
|
278
311
|
- lib/active_support/number_helper/number_to_rounded_converter.rb
|
312
|
+
- lib/active_support/number_helper/rounding_helper.rb
|
279
313
|
- lib/active_support/option_merger.rb
|
280
314
|
- lib/active_support/ordered_hash.rb
|
281
315
|
- lib/active_support/ordered_options.rb
|
316
|
+
- lib/active_support/parameter_filter.rb
|
282
317
|
- lib/active_support/per_thread_registry.rb
|
283
318
|
- lib/active_support/proxy_object.rb
|
284
319
|
- lib/active_support/rails.rb
|
285
320
|
- lib/active_support/railtie.rb
|
286
321
|
- lib/active_support/reloader.rb
|
287
322
|
- lib/active_support/rescuable.rb
|
323
|
+
- lib/active_support/secure_compare_rotator.rb
|
288
324
|
- lib/active_support/security_utils.rb
|
289
325
|
- lib/active_support/string_inquirer.rb
|
290
326
|
- lib/active_support/subscriber.rb
|
@@ -298,6 +334,9 @@ files:
|
|
298
334
|
- lib/active_support/testing/file_fixtures.rb
|
299
335
|
- lib/active_support/testing/isolation.rb
|
300
336
|
- lib/active_support/testing/method_call_assertions.rb
|
337
|
+
- lib/active_support/testing/parallelization.rb
|
338
|
+
- lib/active_support/testing/parallelization/server.rb
|
339
|
+
- lib/active_support/testing/parallelization/worker.rb
|
301
340
|
- lib/active_support/testing/setup_and_teardown.rb
|
302
341
|
- lib/active_support/testing/stream.rb
|
303
342
|
- lib/active_support/testing/tagged_logging.rb
|
@@ -305,7 +344,6 @@ files:
|
|
305
344
|
- lib/active_support/time.rb
|
306
345
|
- lib/active_support/time_with_zone.rb
|
307
346
|
- lib/active_support/values/time_zone.rb
|
308
|
-
- lib/active_support/values/unicode_tables.dat
|
309
347
|
- lib/active_support/version.rb
|
310
348
|
- lib/active_support/xml_mini.rb
|
311
349
|
- lib/active_support/xml_mini/jdom.rb
|
@@ -314,10 +352,15 @@ files:
|
|
314
352
|
- lib/active_support/xml_mini/nokogiri.rb
|
315
353
|
- lib/active_support/xml_mini/nokogirisax.rb
|
316
354
|
- lib/active_support/xml_mini/rexml.rb
|
317
|
-
homepage:
|
355
|
+
homepage: https://rubyonrails.org
|
318
356
|
licenses:
|
319
357
|
- MIT
|
320
|
-
metadata:
|
358
|
+
metadata:
|
359
|
+
bug_tracker_uri: https://github.com/rails/rails/issues
|
360
|
+
changelog_uri: https://github.com/rails/rails/blob/v6.1.0/activesupport/CHANGELOG.md
|
361
|
+
documentation_uri: https://api.rubyonrails.org/v6.1.0/
|
362
|
+
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
363
|
+
source_code_uri: https://github.com/rails/rails/tree/v6.1.0/activesupport
|
321
364
|
post_install_message:
|
322
365
|
rdoc_options:
|
323
366
|
- "--encoding"
|
@@ -328,15 +371,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
328
371
|
requirements:
|
329
372
|
- - ">="
|
330
373
|
- !ruby/object:Gem::Version
|
331
|
-
version: 2.
|
374
|
+
version: 2.5.0
|
332
375
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
333
376
|
requirements:
|
334
377
|
- - ">="
|
335
378
|
- !ruby/object:Gem::Version
|
336
379
|
version: '0'
|
337
380
|
requirements: []
|
338
|
-
|
339
|
-
rubygems_version: 2.6.4
|
381
|
+
rubygems_version: 3.1.4
|
340
382
|
signing_key:
|
341
383
|
specification_version: 4
|
342
384
|
summary: A toolkit of support libraries and Ruby core extensions extracted from the
|
@@ -1,19 +0,0 @@
|
|
1
|
-
require 'concurrent/atomic/count_down_latch'
|
2
|
-
|
3
|
-
module ActiveSupport
|
4
|
-
module Concurrency
|
5
|
-
class Latch < Concurrent::CountDownLatch
|
6
|
-
|
7
|
-
def initialize(count = 1)
|
8
|
-
ActiveSupport::Deprecation.warn("ActiveSupport::Concurrency::Latch is deprecated. Please use Concurrent::CountDownLatch instead.")
|
9
|
-
super(count)
|
10
|
-
end
|
11
|
-
|
12
|
-
alias_method :release, :count_down
|
13
|
-
|
14
|
-
def await
|
15
|
-
wait(nil)
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
class Hash
|
2
|
-
# Returns a hash with non +nil+ values.
|
3
|
-
#
|
4
|
-
# hash = { a: true, b: false, c: nil}
|
5
|
-
# hash.compact # => { a: true, b: false}
|
6
|
-
# hash # => { a: true, b: false, c: nil}
|
7
|
-
# { c: nil }.compact # => {}
|
8
|
-
def compact
|
9
|
-
self.select { |_, value| !value.nil? }
|
10
|
-
end
|
11
|
-
|
12
|
-
# Replaces current hash with non +nil+ values.
|
13
|
-
#
|
14
|
-
# hash = { a: true, b: false, c: nil}
|
15
|
-
# hash.compact! # => { a: true, b: false}
|
16
|
-
# hash # => { a: true, b: false}
|
17
|
-
def compact!
|
18
|
-
self.reject! { |_, value| value.nil? }
|
19
|
-
end
|
20
|
-
end
|
@@ -1,29 +0,0 @@
|
|
1
|
-
class Hash
|
2
|
-
# Returns a new hash with the results of running +block+ once for every value.
|
3
|
-
# The keys are unchanged.
|
4
|
-
#
|
5
|
-
# { a: 1, b: 2, c: 3 }.transform_values { |x| x * 2 } # => { a: 2, b: 4, c: 6 }
|
6
|
-
#
|
7
|
-
# If you do not provide a +block+, it will return an Enumerator
|
8
|
-
# for chaining with other methods:
|
9
|
-
#
|
10
|
-
# { a: 1, b: 2 }.transform_values.with_index { |v, i| [v, i].join.to_i } # => { a: 10, b: 21 }
|
11
|
-
def transform_values
|
12
|
-
return enum_for(:transform_values) { size } unless block_given?
|
13
|
-
return {} if empty?
|
14
|
-
result = self.class.new
|
15
|
-
each do |key, value|
|
16
|
-
result[key] = yield(value)
|
17
|
-
end
|
18
|
-
result
|
19
|
-
end
|
20
|
-
|
21
|
-
# Destructively converts all values using the +block+ operations.
|
22
|
-
# Same as +transform_values+ but modifies +self+.
|
23
|
-
def transform_values!
|
24
|
-
return enum_for(:transform_values!) { size } unless block_given?
|
25
|
-
each do |key, value|
|
26
|
-
self[key] = yield(value)
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
@@ -1,11 +0,0 @@
|
|
1
|
-
class Object
|
2
|
-
# Makes backticks behave (somewhat more) similarly on all platforms.
|
3
|
-
# On win32 `nonexistent_command` raises Errno::ENOENT; on Unix, the
|
4
|
-
# spawned shell prints a message to stderr and sets $?. We emulate
|
5
|
-
# Unix on the former but not the latter.
|
6
|
-
def `(command) #:nodoc:
|
7
|
-
super
|
8
|
-
rescue Errno::ENOENT => e
|
9
|
-
STDERR.puts "#$0: #{e}"
|
10
|
-
end
|
11
|
-
end
|
@@ -1,70 +0,0 @@
|
|
1
|
-
require 'active_support/core_ext/string/inflections'
|
2
|
-
|
3
|
-
#--
|
4
|
-
# Allows code reuse in the methods below without polluting Module.
|
5
|
-
#++
|
6
|
-
|
7
|
-
module ActiveSupport
|
8
|
-
module QualifiedConstUtils
|
9
|
-
def self.raise_if_absolute(path)
|
10
|
-
raise NameError.new("wrong constant name #$&") if path =~ /\A::[^:]+/
|
11
|
-
end
|
12
|
-
|
13
|
-
def self.names(path)
|
14
|
-
path.split('::')
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
##
|
20
|
-
# Extends the API for constants to be able to deal with qualified names. Arguments
|
21
|
-
# are assumed to be relative to the receiver.
|
22
|
-
#
|
23
|
-
#--
|
24
|
-
# Qualified names are required to be relative because we are extending existing
|
25
|
-
# methods that expect constant names, ie, relative paths of length 1. For example,
|
26
|
-
# Object.const_get('::String') raises NameError and so does qualified_const_get.
|
27
|
-
#++
|
28
|
-
class Module
|
29
|
-
def qualified_const_defined?(path, search_parents=true)
|
30
|
-
ActiveSupport::Deprecation.warn(<<-MESSAGE.squish)
|
31
|
-
Module#qualified_const_defined? is deprecated in favour of the builtin
|
32
|
-
Module#const_defined? and will be removed in Rails 5.1.
|
33
|
-
MESSAGE
|
34
|
-
|
35
|
-
ActiveSupport::QualifiedConstUtils.raise_if_absolute(path)
|
36
|
-
|
37
|
-
ActiveSupport::QualifiedConstUtils.names(path).inject(self) do |mod, name|
|
38
|
-
return unless mod.const_defined?(name, search_parents)
|
39
|
-
mod.const_get(name)
|
40
|
-
end
|
41
|
-
return true
|
42
|
-
end
|
43
|
-
|
44
|
-
def qualified_const_get(path)
|
45
|
-
ActiveSupport::Deprecation.warn(<<-MESSAGE.squish)
|
46
|
-
Module#qualified_const_get is deprecated in favour of the builtin
|
47
|
-
Module#const_get and will be removed in Rails 5.1.
|
48
|
-
MESSAGE
|
49
|
-
|
50
|
-
ActiveSupport::QualifiedConstUtils.raise_if_absolute(path)
|
51
|
-
|
52
|
-
ActiveSupport::QualifiedConstUtils.names(path).inject(self) do |mod, name|
|
53
|
-
mod.const_get(name)
|
54
|
-
end
|
55
|
-
end
|
56
|
-
|
57
|
-
def qualified_const_set(path, value)
|
58
|
-
ActiveSupport::Deprecation.warn(<<-MESSAGE.squish)
|
59
|
-
Module#qualified_const_set is deprecated in favour of the builtin
|
60
|
-
Module#const_set and will be removed in Rails 5.1.
|
61
|
-
MESSAGE
|
62
|
-
|
63
|
-
ActiveSupport::QualifiedConstUtils.raise_if_absolute(path)
|
64
|
-
|
65
|
-
const_name = path.demodulize
|
66
|
-
mod_name = path.deconstantize
|
67
|
-
mod = mod_name.empty? ? self : const_get(mod_name)
|
68
|
-
mod.const_set(const_name, value)
|
69
|
-
end
|
70
|
-
end
|
@@ -1,26 +0,0 @@
|
|
1
|
-
unless 1.respond_to?(:positive?) # TODO: Remove this file when we drop support to ruby < 2.3
|
2
|
-
class Numeric
|
3
|
-
# Returns true if the number is positive.
|
4
|
-
#
|
5
|
-
# 1.positive? # => true
|
6
|
-
# 0.positive? # => false
|
7
|
-
# -1.positive? # => false
|
8
|
-
def positive?
|
9
|
-
self > 0
|
10
|
-
end
|
11
|
-
|
12
|
-
# Returns true if the number is negative.
|
13
|
-
#
|
14
|
-
# -1.negative? # => true
|
15
|
-
# 0.negative? # => false
|
16
|
-
# 1.negative? # => false
|
17
|
-
def negative?
|
18
|
-
self < 0
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
class Complex
|
23
|
-
undef :positive?
|
24
|
-
undef :negative?
|
25
|
-
end
|
26
|
-
end
|
@@ -1,23 +0,0 @@
|
|
1
|
-
module ActiveSupport
|
2
|
-
module IncludeWithRange #:nodoc:
|
3
|
-
# Extends the default Range#include? to support range comparisons.
|
4
|
-
# (1..5).include?(1..5) # => true
|
5
|
-
# (1..5).include?(2..3) # => true
|
6
|
-
# (1..5).include?(2..6) # => false
|
7
|
-
#
|
8
|
-
# The native Range#include? behavior is untouched.
|
9
|
-
# ('a'..'f').include?('c') # => true
|
10
|
-
# (5..9).include?(11) # => false
|
11
|
-
def include?(value)
|
12
|
-
if value.is_a?(::Range)
|
13
|
-
# 1...10 includes 1..9 but it does not include 1..10.
|
14
|
-
operator = exclude_end? && !value.exclude_end? ? :< : :<=
|
15
|
-
super(value.first) && value.last.send(operator, last)
|
16
|
-
else
|
17
|
-
super
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
Range.prepend(ActiveSupport::IncludeWithRange)
|
Binary file
|