activesupport 4.2.11.1 → 5.2.8.1
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 +4 -4
- data/CHANGELOG.md +441 -399
- data/MIT-LICENSE +2 -2
- data/README.rdoc +4 -5
- data/lib/active_support/all.rb +5 -3
- data/lib/active_support/array_inquirer.rb +48 -0
- data/lib/active_support/backtrace_cleaner.rb +7 -5
- data/lib/active_support/benchmarkable.rb +6 -4
- data/lib/active_support/builder.rb +3 -1
- data/lib/active_support/cache/file_store.rb +41 -35
- data/lib/active_support/cache/mem_cache_store.rb +91 -91
- data/lib/active_support/cache/memory_store.rb +27 -30
- data/lib/active_support/cache/null_store.rb +7 -8
- data/lib/active_support/cache/redis_cache_store.rb +466 -0
- data/lib/active_support/cache/strategy/local_cache.rb +67 -34
- data/lib/active_support/cache/strategy/local_cache_middleware.rb +10 -9
- data/lib/active_support/cache.rb +287 -196
- data/lib/active_support/callbacks.rb +640 -590
- data/lib/active_support/concern.rb +11 -5
- data/lib/active_support/concurrency/load_interlock_aware_monitor.rb +35 -0
- data/lib/active_support/concurrency/share_lock.rb +227 -0
- data/lib/active_support/configurable.rb +8 -5
- data/lib/active_support/core_ext/array/access.rb +29 -1
- data/lib/active_support/core_ext/array/conversions.rb +22 -18
- data/lib/active_support/core_ext/array/extract_options.rb +2 -0
- data/lib/active_support/core_ext/array/grouping.rb +11 -18
- data/lib/active_support/core_ext/array/inquiry.rb +19 -0
- data/lib/active_support/core_ext/array/prepend_and_append.rb +5 -3
- data/lib/active_support/core_ext/array/wrap.rb +7 -4
- data/lib/active_support/core_ext/array.rb +9 -6
- data/lib/active_support/core_ext/benchmark.rb +3 -1
- data/lib/active_support/core_ext/big_decimal/conversions.rb +10 -12
- data/lib/active_support/core_ext/big_decimal.rb +3 -1
- data/lib/active_support/core_ext/class/attribute.rb +41 -22
- data/lib/active_support/core_ext/class/attribute_accessors.rb +3 -1
- data/lib/active_support/core_ext/class/subclasses.rb +20 -6
- data/lib/active_support/core_ext/class.rb +4 -3
- data/lib/active_support/core_ext/date/acts_like.rb +3 -1
- data/lib/active_support/core_ext/date/blank.rb +14 -0
- data/lib/active_support/core_ext/date/calculations.rb +11 -9
- data/lib/active_support/core_ext/date/conversions.rb +25 -23
- data/lib/active_support/core_ext/date/zones.rb +4 -2
- data/lib/active_support/core_ext/date.rb +6 -4
- data/lib/active_support/core_ext/date_and_time/calculations.rb +170 -58
- data/lib/active_support/core_ext/date_and_time/compatibility.rb +4 -3
- data/lib/active_support/core_ext/date_and_time/zones.rb +12 -12
- data/lib/active_support/core_ext/date_time/acts_like.rb +4 -2
- data/lib/active_support/core_ext/date_time/blank.rb +14 -0
- data/lib/active_support/core_ext/date_time/calculations.rb +36 -18
- data/lib/active_support/core_ext/date_time/compatibility.rb +8 -6
- data/lib/active_support/core_ext/date_time/conversions.rb +16 -12
- 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 +101 -33
- data/lib/active_support/core_ext/file/atomic.rb +38 -31
- data/lib/active_support/core_ext/file.rb +3 -1
- data/lib/active_support/core_ext/hash/compact.rb +14 -9
- data/lib/active_support/core_ext/hash/conversions.rb +62 -41
- data/lib/active_support/core_ext/hash/deep_merge.rb +9 -13
- data/lib/active_support/core_ext/hash/except.rb +11 -8
- data/lib/active_support/core_ext/hash/indifferent_access.rb +4 -3
- data/lib/active_support/core_ext/hash/keys.rb +33 -27
- data/lib/active_support/core_ext/hash/reverse_merge.rb +5 -2
- data/lib/active_support/core_ext/hash/slice.rb +8 -8
- data/lib/active_support/core_ext/hash/transform_values.rb +14 -5
- data/lib/active_support/core_ext/hash.rb +11 -9
- data/lib/active_support/core_ext/integer/inflections.rb +3 -1
- data/lib/active_support/core_ext/integer/multiple.rb +2 -0
- 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/agnostics.rb +2 -0
- data/lib/active_support/core_ext/kernel/concern.rb +5 -1
- data/lib/active_support/core_ext/kernel/reporting.rb +4 -84
- data/lib/active_support/core_ext/kernel/singleton_class.rb +2 -0
- data/lib/active_support/core_ext/kernel.rb +6 -5
- data/lib/active_support/core_ext/load_error.rb +3 -22
- data/lib/active_support/core_ext/marshal.rb +8 -8
- data/lib/active_support/core_ext/module/aliasing.rb +6 -44
- data/lib/active_support/core_ext/module/anonymous.rb +12 -1
- data/lib/active_support/core_ext/module/attr_internal.rb +8 -9
- data/lib/active_support/core_ext/module/attribute_accessors.rb +43 -40
- data/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb +150 -0
- data/lib/active_support/core_ext/module/concerning.rb +11 -12
- data/lib/active_support/core_ext/module/delegation.rb +99 -29
- data/lib/active_support/core_ext/module/deprecation.rb +4 -2
- data/lib/active_support/core_ext/module/introspection.rb +9 -9
- data/lib/active_support/core_ext/module/reachable.rb +5 -2
- data/lib/active_support/core_ext/module/redefine_method.rb +49 -0
- data/lib/active_support/core_ext/module/remove_method.rb +8 -3
- data/lib/active_support/core_ext/module.rb +14 -11
- data/lib/active_support/core_ext/name_error.rb +22 -2
- data/lib/active_support/core_ext/numeric/bytes.rb +22 -0
- data/lib/active_support/core_ext/numeric/conversions.rb +78 -81
- data/lib/active_support/core_ext/numeric/inquiry.rb +28 -0
- data/lib/active_support/core_ext/numeric/time.rb +35 -23
- data/lib/active_support/core_ext/numeric.rb +6 -3
- data/lib/active_support/core_ext/object/acts_like.rb +12 -1
- data/lib/active_support/core_ext/object/blank.rb +27 -2
- data/lib/active_support/core_ext/object/conversions.rb +6 -4
- data/lib/active_support/core_ext/object/deep_dup.rb +13 -4
- data/lib/active_support/core_ext/object/duplicable.rb +41 -14
- data/lib/active_support/core_ext/object/inclusion.rb +5 -3
- data/lib/active_support/core_ext/object/instance_variables.rb +3 -1
- data/lib/active_support/core_ext/object/json.rb +49 -19
- 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 +69 -21
- data/lib/active_support/core_ext/object/with_options.rb +16 -3
- data/lib/active_support/core_ext/object.rb +14 -13
- data/lib/active_support/core_ext/range/compare_range.rb +61 -0
- data/lib/active_support/core_ext/range/conversions.rb +27 -7
- data/lib/active_support/core_ext/range/each.rb +19 -17
- data/lib/active_support/core_ext/range/include_range.rb +2 -22
- data/lib/active_support/core_ext/range/include_time_with_zone.rb +23 -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 +6 -0
- data/lib/active_support/core_ext/securerandom.rb +25 -0
- data/lib/active_support/core_ext/string/access.rb +8 -6
- data/lib/active_support/core_ext/string/behavior.rb +3 -1
- data/lib/active_support/core_ext/string/conversions.rb +7 -4
- data/lib/active_support/core_ext/string/exclude.rb +2 -0
- data/lib/active_support/core_ext/string/filters.rb +6 -5
- data/lib/active_support/core_ext/string/indent.rb +6 -4
- data/lib/active_support/core_ext/string/inflections.rb +61 -24
- data/lib/active_support/core_ext/string/inquiry.rb +3 -1
- data/lib/active_support/core_ext/string/multibyte.rb +15 -7
- data/lib/active_support/core_ext/string/output_safety.rb +62 -38
- data/lib/active_support/core_ext/string/starts_ends_with.rb +2 -0
- data/lib/active_support/core_ext/string/strip.rb +4 -5
- 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/time/acts_like.rb +3 -1
- data/lib/active_support/core_ext/time/calculations.rb +85 -51
- data/lib/active_support/core_ext/time/compatibility.rb +4 -2
- data/lib/active_support/core_ext/time/conversions.rb +20 -13
- data/lib/active_support/core_ext/time/zones.rb +41 -7
- data/lib/active_support/core_ext/time.rb +7 -6
- data/lib/active_support/core_ext/uri.rb +6 -8
- data/lib/active_support/core_ext.rb +3 -1
- data/lib/active_support/current_attributes.rb +195 -0
- data/lib/active_support/dependencies/autoload.rb +2 -0
- data/lib/active_support/dependencies/interlock.rb +57 -0
- data/lib/active_support/dependencies.rb +152 -161
- data/lib/active_support/deprecation/behaviors.rb +44 -11
- data/lib/active_support/deprecation/constant_accessor.rb +52 -0
- data/lib/active_support/deprecation/instance_delegator.rb +17 -2
- data/lib/active_support/deprecation/method_wrappers.rb +66 -20
- data/lib/active_support/deprecation/proxy_wrappers.rb +56 -28
- data/lib/active_support/deprecation/reporting.rb +32 -12
- data/lib/active_support/deprecation.rb +12 -9
- data/lib/active_support/descendants_tracker.rb +2 -0
- data/lib/active_support/digest.rb +20 -0
- data/lib/active_support/duration/iso8601_parser.rb +125 -0
- data/lib/active_support/duration/iso8601_serializer.rb +55 -0
- data/lib/active_support/duration.rb +314 -38
- data/lib/active_support/encrypted_configuration.rb +49 -0
- data/lib/active_support/encrypted_file.rb +99 -0
- data/lib/active_support/evented_file_update_checker.rb +205 -0
- data/lib/active_support/execution_wrapper.rb +131 -0
- data/lib/active_support/executor.rb +8 -0
- data/lib/active_support/file_update_checker.rb +63 -37
- data/lib/active_support/gem_version.rb +5 -3
- data/lib/active_support/gzip.rb +7 -5
- data/lib/active_support/hash_with_indifferent_access.rb +123 -28
- data/lib/active_support/i18n.rb +8 -6
- data/lib/active_support/i18n_railtie.rb +37 -13
- data/lib/active_support/inflections.rb +13 -11
- data/lib/active_support/inflector/inflections.rb +61 -12
- data/lib/active_support/inflector/methods.rb +163 -136
- data/lib/active_support/inflector/transliterate.rb +48 -27
- data/lib/active_support/inflector.rb +7 -5
- data/lib/active_support/json/decoding.rb +16 -13
- data/lib/active_support/json/encoding.rb +11 -58
- data/lib/active_support/json.rb +4 -2
- data/lib/active_support/key_generator.rb +25 -25
- data/lib/active_support/lazy_load_hooks.rb +50 -20
- data/lib/active_support/locale/en.yml +2 -0
- data/lib/active_support/log_subscriber/test_helper.rb +14 -12
- data/lib/active_support/log_subscriber.rb +13 -10
- data/lib/active_support/logger.rb +8 -7
- data/lib/active_support/logger_silence.rb +6 -4
- data/lib/active_support/logger_thread_safe_level.rb +7 -5
- data/lib/active_support/message_encryptor.rb +168 -53
- data/lib/active_support/message_verifier.rb +150 -17
- data/lib/active_support/messages/metadata.rb +71 -0
- data/lib/active_support/messages/rotation_configuration.rb +22 -0
- data/lib/active_support/messages/rotator.rb +56 -0
- data/lib/active_support/multibyte/chars.rb +36 -23
- data/lib/active_support/multibyte/unicode.rb +100 -96
- data/lib/active_support/multibyte.rb +4 -2
- data/lib/active_support/notifications/fanout.rb +11 -9
- data/lib/active_support/notifications/instrumenter.rb +27 -7
- data/lib/active_support/notifications.rb +11 -7
- data/lib/active_support/number_helper/number_converter.rb +13 -11
- data/lib/active_support/number_helper/number_to_currency_converter.rb +9 -9
- data/lib/active_support/number_helper/number_to_delimited_converter.rb +9 -3
- data/lib/active_support/number_helper/number_to_human_converter.rb +11 -9
- data/lib/active_support/number_helper/number_to_human_size_converter.rb +9 -8
- data/lib/active_support/number_helper/number_to_percentage_converter.rb +3 -1
- data/lib/active_support/number_helper/number_to_phone_converter.rb +13 -4
- data/lib/active_support/number_helper/number_to_rounded_converter.rb +23 -56
- data/lib/active_support/number_helper/rounding_helper.rb +66 -0
- data/lib/active_support/number_helper.rb +94 -68
- data/lib/active_support/option_merger.rb +3 -1
- data/lib/active_support/ordered_hash.rb +6 -4
- data/lib/active_support/ordered_options.rb +23 -5
- data/lib/active_support/per_thread_registry.rb +9 -4
- data/lib/active_support/proxy_object.rb +2 -0
- data/lib/active_support/rails.rb +16 -8
- data/lib/active_support/railtie.rb +43 -9
- data/lib/active_support/reloader.rb +131 -0
- data/lib/active_support/rescuable.rb +108 -53
- data/lib/active_support/security_utils.rb +15 -11
- data/lib/active_support/string_inquirer.rb +11 -3
- data/lib/active_support/subscriber.rb +21 -16
- data/lib/active_support/tagged_logging.rb +14 -11
- data/lib/active_support/test_case.rb +19 -47
- data/lib/active_support/testing/assertions.rb +137 -20
- data/lib/active_support/testing/autorun.rb +4 -2
- 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 +14 -10
- data/lib/active_support/testing/file_fixtures.rb +36 -0
- data/lib/active_support/testing/isolation.rb +34 -25
- data/lib/active_support/testing/method_call_assertions.rb +43 -0
- data/lib/active_support/testing/setup_and_teardown.rb +13 -8
- data/lib/active_support/testing/stream.rb +44 -0
- data/lib/active_support/testing/tagged_logging.rb +3 -1
- data/lib/active_support/testing/time_helpers.rb +81 -15
- data/lib/active_support/time.rb +14 -12
- data/lib/active_support/time_with_zone.rb +169 -39
- data/lib/active_support/values/time_zone.rb +196 -61
- data/lib/active_support/values/unicode_tables.dat +0 -0
- data/lib/active_support/version.rb +3 -1
- data/lib/active_support/xml_mini/jdom.rb +116 -114
- data/lib/active_support/xml_mini/libxml.rb +16 -13
- data/lib/active_support/xml_mini/libxmlsax.rb +15 -14
- data/lib/active_support/xml_mini/nokogiri.rb +14 -12
- data/lib/active_support/xml_mini/nokogirisax.rb +14 -13
- data/lib/active_support/xml_mini/rexml.rb +11 -9
- data/lib/active_support/xml_mini.rb +37 -37
- data/lib/active_support.rb +12 -11
- metadata +57 -27
- data/lib/active_support/concurrency/latch.rb +0 -27
- data/lib/active_support/core_ext/big_decimal/yaml_conversions.rb +0 -16
- data/lib/active_support/core_ext/class/delegating_attributes.rb +0 -45
- data/lib/active_support/core_ext/date_time/zones.rb +0 -6
- data/lib/active_support/core_ext/kernel/debugger.rb +0 -10
- data/lib/active_support/core_ext/module/method_transplanting.rb +0 -13
- data/lib/active_support/core_ext/module/qualified_const.rb +0 -52
- data/lib/active_support/core_ext/object/itself.rb +0 -15
- data/lib/active_support/core_ext/struct.rb +0 -6
- data/lib/active_support/core_ext/thread.rb +0 -86
- data/lib/active_support/core_ext/time/marshal.rb +0 -30
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activesupport
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 5.2.8.1
|
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-07-12 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
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0.7'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::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
29
|
version: '0.7'
|
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
|
@@ -53,25 +59,25 @@ dependencies:
|
|
53
59
|
- !ruby/object:Gem::Version
|
54
60
|
version: '5.1'
|
55
61
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
62
|
+
name: concurrent-ruby
|
57
63
|
requirement: !ruby/object:Gem::Requirement
|
58
64
|
requirements:
|
59
65
|
- - "~>"
|
60
66
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0
|
67
|
+
version: '1.0'
|
62
68
|
- - ">="
|
63
69
|
- !ruby/object:Gem::Version
|
64
|
-
version: 0.
|
70
|
+
version: 1.0.2
|
65
71
|
type: :runtime
|
66
72
|
prerelease: false
|
67
73
|
version_requirements: !ruby/object:Gem::Requirement
|
68
74
|
requirements:
|
69
75
|
- - "~>"
|
70
76
|
- !ruby/object:Gem::Version
|
71
|
-
version: '0
|
77
|
+
version: '1.0'
|
72
78
|
- - ">="
|
73
79
|
- !ruby/object:Gem::Version
|
74
|
-
version: 0.
|
80
|
+
version: 1.0.2
|
75
81
|
description: A toolkit of support libraries and Ruby core extensions extracted from
|
76
82
|
the Rails framework. Rich support for multibyte strings, internationalization, time
|
77
83
|
zones, and testing.
|
@@ -85,6 +91,7 @@ files:
|
|
85
91
|
- README.rdoc
|
86
92
|
- lib/active_support.rb
|
87
93
|
- lib/active_support/all.rb
|
94
|
+
- lib/active_support/array_inquirer.rb
|
88
95
|
- lib/active_support/backtrace_cleaner.rb
|
89
96
|
- lib/active_support/benchmarkable.rb
|
90
97
|
- lib/active_support/builder.rb
|
@@ -93,11 +100,13 @@ files:
|
|
93
100
|
- lib/active_support/cache/mem_cache_store.rb
|
94
101
|
- lib/active_support/cache/memory_store.rb
|
95
102
|
- lib/active_support/cache/null_store.rb
|
103
|
+
- lib/active_support/cache/redis_cache_store.rb
|
96
104
|
- lib/active_support/cache/strategy/local_cache.rb
|
97
105
|
- lib/active_support/cache/strategy/local_cache_middleware.rb
|
98
106
|
- lib/active_support/callbacks.rb
|
99
107
|
- lib/active_support/concern.rb
|
100
|
-
- lib/active_support/concurrency/
|
108
|
+
- lib/active_support/concurrency/load_interlock_aware_monitor.rb
|
109
|
+
- lib/active_support/concurrency/share_lock.rb
|
101
110
|
- lib/active_support/configurable.rb
|
102
111
|
- lib/active_support/core_ext.rb
|
103
112
|
- lib/active_support/core_ext/array.rb
|
@@ -105,19 +114,19 @@ files:
|
|
105
114
|
- lib/active_support/core_ext/array/conversions.rb
|
106
115
|
- lib/active_support/core_ext/array/extract_options.rb
|
107
116
|
- lib/active_support/core_ext/array/grouping.rb
|
117
|
+
- lib/active_support/core_ext/array/inquiry.rb
|
108
118
|
- lib/active_support/core_ext/array/prepend_and_append.rb
|
109
119
|
- lib/active_support/core_ext/array/wrap.rb
|
110
120
|
- lib/active_support/core_ext/benchmark.rb
|
111
121
|
- lib/active_support/core_ext/big_decimal.rb
|
112
122
|
- lib/active_support/core_ext/big_decimal/conversions.rb
|
113
|
-
- lib/active_support/core_ext/big_decimal/yaml_conversions.rb
|
114
123
|
- lib/active_support/core_ext/class.rb
|
115
124
|
- lib/active_support/core_ext/class/attribute.rb
|
116
125
|
- lib/active_support/core_ext/class/attribute_accessors.rb
|
117
|
-
- lib/active_support/core_ext/class/delegating_attributes.rb
|
118
126
|
- lib/active_support/core_ext/class/subclasses.rb
|
119
127
|
- lib/active_support/core_ext/date.rb
|
120
128
|
- lib/active_support/core_ext/date/acts_like.rb
|
129
|
+
- lib/active_support/core_ext/date/blank.rb
|
121
130
|
- lib/active_support/core_ext/date/calculations.rb
|
122
131
|
- lib/active_support/core_ext/date/conversions.rb
|
123
132
|
- lib/active_support/core_ext/date/zones.rb
|
@@ -126,10 +135,11 @@ files:
|
|
126
135
|
- lib/active_support/core_ext/date_and_time/zones.rb
|
127
136
|
- lib/active_support/core_ext/date_time.rb
|
128
137
|
- lib/active_support/core_ext/date_time/acts_like.rb
|
138
|
+
- lib/active_support/core_ext/date_time/blank.rb
|
129
139
|
- lib/active_support/core_ext/date_time/calculations.rb
|
130
140
|
- lib/active_support/core_ext/date_time/compatibility.rb
|
131
141
|
- lib/active_support/core_ext/date_time/conversions.rb
|
132
|
-
- lib/active_support/core_ext/
|
142
|
+
- lib/active_support/core_ext/digest.rb
|
133
143
|
- lib/active_support/core_ext/digest/uuid.rb
|
134
144
|
- lib/active_support/core_ext/enumerable.rb
|
135
145
|
- lib/active_support/core_ext/file.rb
|
@@ -151,7 +161,6 @@ files:
|
|
151
161
|
- lib/active_support/core_ext/kernel.rb
|
152
162
|
- lib/active_support/core_ext/kernel/agnostics.rb
|
153
163
|
- lib/active_support/core_ext/kernel/concern.rb
|
154
|
-
- lib/active_support/core_ext/kernel/debugger.rb
|
155
164
|
- lib/active_support/core_ext/kernel/reporting.rb
|
156
165
|
- lib/active_support/core_ext/kernel/singleton_class.rb
|
157
166
|
- lib/active_support/core_ext/load_error.rb
|
@@ -161,18 +170,19 @@ files:
|
|
161
170
|
- lib/active_support/core_ext/module/anonymous.rb
|
162
171
|
- lib/active_support/core_ext/module/attr_internal.rb
|
163
172
|
- lib/active_support/core_ext/module/attribute_accessors.rb
|
173
|
+
- lib/active_support/core_ext/module/attribute_accessors_per_thread.rb
|
164
174
|
- lib/active_support/core_ext/module/concerning.rb
|
165
175
|
- lib/active_support/core_ext/module/delegation.rb
|
166
176
|
- lib/active_support/core_ext/module/deprecation.rb
|
167
177
|
- lib/active_support/core_ext/module/introspection.rb
|
168
|
-
- lib/active_support/core_ext/module/method_transplanting.rb
|
169
|
-
- lib/active_support/core_ext/module/qualified_const.rb
|
170
178
|
- lib/active_support/core_ext/module/reachable.rb
|
179
|
+
- lib/active_support/core_ext/module/redefine_method.rb
|
171
180
|
- lib/active_support/core_ext/module/remove_method.rb
|
172
181
|
- lib/active_support/core_ext/name_error.rb
|
173
182
|
- lib/active_support/core_ext/numeric.rb
|
174
183
|
- lib/active_support/core_ext/numeric/bytes.rb
|
175
184
|
- lib/active_support/core_ext/numeric/conversions.rb
|
185
|
+
- lib/active_support/core_ext/numeric/inquiry.rb
|
176
186
|
- lib/active_support/core_ext/numeric/time.rb
|
177
187
|
- lib/active_support/core_ext/object.rb
|
178
188
|
- lib/active_support/core_ext/object/acts_like.rb
|
@@ -182,18 +192,20 @@ files:
|
|
182
192
|
- lib/active_support/core_ext/object/duplicable.rb
|
183
193
|
- lib/active_support/core_ext/object/inclusion.rb
|
184
194
|
- lib/active_support/core_ext/object/instance_variables.rb
|
185
|
-
- lib/active_support/core_ext/object/itself.rb
|
186
195
|
- lib/active_support/core_ext/object/json.rb
|
187
196
|
- lib/active_support/core_ext/object/to_param.rb
|
188
197
|
- lib/active_support/core_ext/object/to_query.rb
|
189
198
|
- lib/active_support/core_ext/object/try.rb
|
190
199
|
- lib/active_support/core_ext/object/with_options.rb
|
191
200
|
- lib/active_support/core_ext/range.rb
|
201
|
+
- lib/active_support/core_ext/range/compare_range.rb
|
192
202
|
- lib/active_support/core_ext/range/conversions.rb
|
193
203
|
- lib/active_support/core_ext/range/each.rb
|
194
204
|
- lib/active_support/core_ext/range/include_range.rb
|
205
|
+
- lib/active_support/core_ext/range/include_time_with_zone.rb
|
195
206
|
- lib/active_support/core_ext/range/overlaps.rb
|
196
207
|
- lib/active_support/core_ext/regexp.rb
|
208
|
+
- lib/active_support/core_ext/securerandom.rb
|
197
209
|
- lib/active_support/core_ext/string.rb
|
198
210
|
- lib/active_support/core_ext/string/access.rb
|
199
211
|
- lib/active_support/core_ext/string/behavior.rb
|
@@ -208,26 +220,34 @@ files:
|
|
208
220
|
- lib/active_support/core_ext/string/starts_ends_with.rb
|
209
221
|
- lib/active_support/core_ext/string/strip.rb
|
210
222
|
- lib/active_support/core_ext/string/zones.rb
|
211
|
-
- lib/active_support/core_ext/struct.rb
|
212
|
-
- lib/active_support/core_ext/thread.rb
|
213
223
|
- lib/active_support/core_ext/time.rb
|
214
224
|
- lib/active_support/core_ext/time/acts_like.rb
|
215
225
|
- lib/active_support/core_ext/time/calculations.rb
|
216
226
|
- lib/active_support/core_ext/time/compatibility.rb
|
217
227
|
- lib/active_support/core_ext/time/conversions.rb
|
218
|
-
- lib/active_support/core_ext/time/marshal.rb
|
219
228
|
- lib/active_support/core_ext/time/zones.rb
|
220
229
|
- lib/active_support/core_ext/uri.rb
|
230
|
+
- lib/active_support/current_attributes.rb
|
221
231
|
- lib/active_support/dependencies.rb
|
222
232
|
- lib/active_support/dependencies/autoload.rb
|
233
|
+
- lib/active_support/dependencies/interlock.rb
|
223
234
|
- lib/active_support/deprecation.rb
|
224
235
|
- lib/active_support/deprecation/behaviors.rb
|
236
|
+
- lib/active_support/deprecation/constant_accessor.rb
|
225
237
|
- lib/active_support/deprecation/instance_delegator.rb
|
226
238
|
- lib/active_support/deprecation/method_wrappers.rb
|
227
239
|
- lib/active_support/deprecation/proxy_wrappers.rb
|
228
240
|
- lib/active_support/deprecation/reporting.rb
|
229
241
|
- lib/active_support/descendants_tracker.rb
|
242
|
+
- lib/active_support/digest.rb
|
230
243
|
- lib/active_support/duration.rb
|
244
|
+
- lib/active_support/duration/iso8601_parser.rb
|
245
|
+
- lib/active_support/duration/iso8601_serializer.rb
|
246
|
+
- lib/active_support/encrypted_configuration.rb
|
247
|
+
- lib/active_support/encrypted_file.rb
|
248
|
+
- lib/active_support/evented_file_update_checker.rb
|
249
|
+
- lib/active_support/execution_wrapper.rb
|
250
|
+
- lib/active_support/executor.rb
|
231
251
|
- lib/active_support/file_update_checker.rb
|
232
252
|
- lib/active_support/gem_version.rb
|
233
253
|
- lib/active_support/gzip.rb
|
@@ -252,6 +272,9 @@ files:
|
|
252
272
|
- lib/active_support/logger_thread_safe_level.rb
|
253
273
|
- lib/active_support/message_encryptor.rb
|
254
274
|
- lib/active_support/message_verifier.rb
|
275
|
+
- lib/active_support/messages/metadata.rb
|
276
|
+
- lib/active_support/messages/rotation_configuration.rb
|
277
|
+
- lib/active_support/messages/rotator.rb
|
255
278
|
- lib/active_support/multibyte.rb
|
256
279
|
- lib/active_support/multibyte/chars.rb
|
257
280
|
- lib/active_support/multibyte/unicode.rb
|
@@ -267,6 +290,7 @@ files:
|
|
267
290
|
- lib/active_support/number_helper/number_to_percentage_converter.rb
|
268
291
|
- lib/active_support/number_helper/number_to_phone_converter.rb
|
269
292
|
- lib/active_support/number_helper/number_to_rounded_converter.rb
|
293
|
+
- lib/active_support/number_helper/rounding_helper.rb
|
270
294
|
- lib/active_support/option_merger.rb
|
271
295
|
- lib/active_support/ordered_hash.rb
|
272
296
|
- lib/active_support/ordered_options.rb
|
@@ -274,6 +298,7 @@ files:
|
|
274
298
|
- lib/active_support/proxy_object.rb
|
275
299
|
- lib/active_support/rails.rb
|
276
300
|
- lib/active_support/railtie.rb
|
301
|
+
- lib/active_support/reloader.rb
|
277
302
|
- lib/active_support/rescuable.rb
|
278
303
|
- lib/active_support/security_utils.rb
|
279
304
|
- lib/active_support/string_inquirer.rb
|
@@ -285,8 +310,11 @@ files:
|
|
285
310
|
- lib/active_support/testing/constant_lookup.rb
|
286
311
|
- lib/active_support/testing/declarative.rb
|
287
312
|
- lib/active_support/testing/deprecation.rb
|
313
|
+
- lib/active_support/testing/file_fixtures.rb
|
288
314
|
- lib/active_support/testing/isolation.rb
|
315
|
+
- lib/active_support/testing/method_call_assertions.rb
|
289
316
|
- lib/active_support/testing/setup_and_teardown.rb
|
317
|
+
- lib/active_support/testing/stream.rb
|
290
318
|
- lib/active_support/testing/tagged_logging.rb
|
291
319
|
- lib/active_support/testing/time_helpers.rb
|
292
320
|
- lib/active_support/time.rb
|
@@ -301,11 +329,13 @@ files:
|
|
301
329
|
- lib/active_support/xml_mini/nokogiri.rb
|
302
330
|
- lib/active_support/xml_mini/nokogirisax.rb
|
303
331
|
- lib/active_support/xml_mini/rexml.rb
|
304
|
-
homepage: http://
|
332
|
+
homepage: http://rubyonrails.org
|
305
333
|
licenses:
|
306
334
|
- MIT
|
307
|
-
metadata:
|
308
|
-
|
335
|
+
metadata:
|
336
|
+
source_code_uri: https://github.com/rails/rails/tree/v5.2.8.1/activesupport
|
337
|
+
changelog_uri: https://github.com/rails/rails/blob/v5.2.8.1/activesupport/CHANGELOG.md
|
338
|
+
post_install_message:
|
309
339
|
rdoc_options:
|
310
340
|
- "--encoding"
|
311
341
|
- UTF-8
|
@@ -315,15 +345,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
315
345
|
requirements:
|
316
346
|
- - ">="
|
317
347
|
- !ruby/object:Gem::Version
|
318
|
-
version:
|
348
|
+
version: 2.2.2
|
319
349
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
320
350
|
requirements:
|
321
351
|
- - ">="
|
322
352
|
- !ruby/object:Gem::Version
|
323
353
|
version: '0'
|
324
354
|
requirements: []
|
325
|
-
rubygems_version: 3.
|
326
|
-
signing_key:
|
355
|
+
rubygems_version: 3.3.3
|
356
|
+
signing_key:
|
327
357
|
specification_version: 4
|
328
358
|
summary: A toolkit of support libraries and Ruby core extensions extracted from the
|
329
359
|
Rails framework.
|
@@ -1,27 +0,0 @@
|
|
1
|
-
require 'thread'
|
2
|
-
require 'monitor'
|
3
|
-
|
4
|
-
module ActiveSupport
|
5
|
-
module Concurrency
|
6
|
-
class Latch
|
7
|
-
def initialize(count = 1)
|
8
|
-
@count = count
|
9
|
-
@lock = Monitor.new
|
10
|
-
@cv = @lock.new_cond
|
11
|
-
end
|
12
|
-
|
13
|
-
def release
|
14
|
-
@lock.synchronize do
|
15
|
-
@count -= 1 if @count > 0
|
16
|
-
@cv.broadcast if @count.zero?
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
def await
|
21
|
-
@lock.synchronize do
|
22
|
-
@cv.wait_while { @count > 0 }
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
require 'active_support/deprecation'
|
2
|
-
|
3
|
-
ActiveSupport::Deprecation.warn 'core_ext/big_decimal/yaml_conversions is deprecated and will be removed in the future.'
|
4
|
-
|
5
|
-
require 'bigdecimal'
|
6
|
-
require 'yaml'
|
7
|
-
require 'active_support/core_ext/big_decimal/conversions'
|
8
|
-
|
9
|
-
class BigDecimal
|
10
|
-
YAML_MAPPING = { 'Infinity' => '.Inf', '-Infinity' => '-.Inf', 'NaN' => '.NaN' }
|
11
|
-
|
12
|
-
def encode_with(coder)
|
13
|
-
string = to_s
|
14
|
-
coder.represent_scalar(nil, YAML_MAPPING[string] || string)
|
15
|
-
end
|
16
|
-
end
|
@@ -1,45 +0,0 @@
|
|
1
|
-
require 'active_support/core_ext/kernel/singleton_class'
|
2
|
-
require 'active_support/core_ext/module/remove_method'
|
3
|
-
require 'active_support/core_ext/module/deprecation'
|
4
|
-
|
5
|
-
|
6
|
-
class Class
|
7
|
-
def superclass_delegating_accessor(name, options = {})
|
8
|
-
# Create private _name and _name= methods that can still be used if the public
|
9
|
-
# methods are overridden.
|
10
|
-
_superclass_delegating_accessor("_#{name}", options)
|
11
|
-
|
12
|
-
# Generate the public methods name, name=, and name?.
|
13
|
-
# These methods dispatch to the private _name, and _name= methods, making them
|
14
|
-
# overridable.
|
15
|
-
singleton_class.send(:define_method, name) { send("_#{name}") }
|
16
|
-
singleton_class.send(:define_method, "#{name}?") { !!send("_#{name}") }
|
17
|
-
singleton_class.send(:define_method, "#{name}=") { |value| send("_#{name}=", value) }
|
18
|
-
|
19
|
-
# If an instance_reader is needed, generate public instance methods name and name?.
|
20
|
-
if options[:instance_reader] != false
|
21
|
-
define_method(name) { send("_#{name}") }
|
22
|
-
define_method("#{name}?") { !!send("#{name}") }
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
deprecate superclass_delegating_accessor: :class_attribute
|
27
|
-
|
28
|
-
private
|
29
|
-
# Take the object being set and store it in a method. This gives us automatic
|
30
|
-
# inheritance behavior, without having to store the object in an instance
|
31
|
-
# variable and look up the superclass chain manually.
|
32
|
-
def _stash_object_in_method(object, method, instance_reader = true)
|
33
|
-
singleton_class.remove_possible_method(method)
|
34
|
-
singleton_class.send(:define_method, method) { object }
|
35
|
-
remove_possible_method(method)
|
36
|
-
define_method(method) { object } if instance_reader
|
37
|
-
end
|
38
|
-
|
39
|
-
def _superclass_delegating_accessor(name, options = {})
|
40
|
-
singleton_class.send(:define_method, "#{name}=") do |value|
|
41
|
-
_stash_object_in_method(value, name, options[:instance_reader] != false)
|
42
|
-
end
|
43
|
-
send("#{name}=", nil)
|
44
|
-
end
|
45
|
-
end
|
@@ -1,10 +0,0 @@
|
|
1
|
-
module Kernel
|
2
|
-
unless respond_to?(:debugger)
|
3
|
-
# Starts a debugging session if the +debugger+ gem has been loaded (call rails server --debugger to do load it).
|
4
|
-
def debugger
|
5
|
-
message = "\n***** Debugger requested, but was not available (ensure the debugger gem is listed in Gemfile/installed as gem): Start server with --debugger to enable *****\n"
|
6
|
-
defined?(Rails.logger) ? Rails.logger.info(message) : $stderr.puts(message)
|
7
|
-
end
|
8
|
-
alias breakpoint debugger unless respond_to?(:breakpoint)
|
9
|
-
end
|
10
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
class Module
|
2
|
-
###
|
3
|
-
# TODO: remove this after 1.9 support is dropped
|
4
|
-
def methods_transplantable? # :nodoc:
|
5
|
-
x = Module.new {
|
6
|
-
def foo; end # :nodoc:
|
7
|
-
}
|
8
|
-
Module.new { define_method :bar, x.instance_method(:foo) }
|
9
|
-
true
|
10
|
-
rescue TypeError
|
11
|
-
false
|
12
|
-
end
|
13
|
-
end
|
@@ -1,52 +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
|
-
module QualifiedConstUtils
|
7
|
-
def self.raise_if_absolute(path)
|
8
|
-
raise NameError.new("wrong constant name #$&") if path =~ /\A::[^:]+/
|
9
|
-
end
|
10
|
-
|
11
|
-
def self.names(path)
|
12
|
-
path.split('::')
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
##
|
17
|
-
# Extends the API for constants to be able to deal with qualified names. Arguments
|
18
|
-
# are assumed to be relative to the receiver.
|
19
|
-
#
|
20
|
-
#--
|
21
|
-
# Qualified names are required to be relative because we are extending existing
|
22
|
-
# methods that expect constant names, ie, relative paths of length 1. For example,
|
23
|
-
# Object.const_get('::String') raises NameError and so does qualified_const_get.
|
24
|
-
#++
|
25
|
-
class Module
|
26
|
-
def qualified_const_defined?(path, search_parents=true)
|
27
|
-
QualifiedConstUtils.raise_if_absolute(path)
|
28
|
-
|
29
|
-
QualifiedConstUtils.names(path).inject(self) do |mod, name|
|
30
|
-
return unless mod.const_defined?(name, search_parents)
|
31
|
-
mod.const_get(name)
|
32
|
-
end
|
33
|
-
return true
|
34
|
-
end
|
35
|
-
|
36
|
-
def qualified_const_get(path)
|
37
|
-
QualifiedConstUtils.raise_if_absolute(path)
|
38
|
-
|
39
|
-
QualifiedConstUtils.names(path).inject(self) do |mod, name|
|
40
|
-
mod.const_get(name)
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
def qualified_const_set(path, value)
|
45
|
-
QualifiedConstUtils.raise_if_absolute(path)
|
46
|
-
|
47
|
-
const_name = path.demodulize
|
48
|
-
mod_name = path.deconstantize
|
49
|
-
mod = mod_name.empty? ? self : qualified_const_get(mod_name)
|
50
|
-
mod.const_set(const_name, value)
|
51
|
-
end
|
52
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
class Object
|
2
|
-
# TODO: Remove this file when we drop support for Ruby < 2.2
|
3
|
-
unless respond_to?(:itself)
|
4
|
-
# Returns the object itself.
|
5
|
-
#
|
6
|
-
# Useful for chaining methods, such as Active Record scopes:
|
7
|
-
#
|
8
|
-
# Event.public_send(state.presence_in([ :trashed, :drafted ]) || :itself).order(:created_at)
|
9
|
-
#
|
10
|
-
# @return Object
|
11
|
-
def itself
|
12
|
-
self
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
@@ -1,86 +0,0 @@
|
|
1
|
-
class Thread
|
2
|
-
LOCK = Mutex.new # :nodoc:
|
3
|
-
|
4
|
-
# Returns the value of a thread local variable that has been set. Note that
|
5
|
-
# these are different than fiber local values.
|
6
|
-
#
|
7
|
-
# Thread local values are carried along with threads, and do not respect
|
8
|
-
# fibers. For example:
|
9
|
-
#
|
10
|
-
# Thread.new {
|
11
|
-
# Thread.current.thread_variable_set("foo", "bar") # set a thread local
|
12
|
-
# Thread.current["foo"] = "bar" # set a fiber local
|
13
|
-
#
|
14
|
-
# Fiber.new {
|
15
|
-
# Fiber.yield [
|
16
|
-
# Thread.current.thread_variable_get("foo"), # get the thread local
|
17
|
-
# Thread.current["foo"], # get the fiber local
|
18
|
-
# ]
|
19
|
-
# }.resume
|
20
|
-
# }.join.value # => ['bar', nil]
|
21
|
-
#
|
22
|
-
# The value <tt>"bar"</tt> is returned for the thread local, where +nil+ is returned
|
23
|
-
# for the fiber local. The fiber is executed in the same thread, so the
|
24
|
-
# thread local values are available.
|
25
|
-
def thread_variable_get(key)
|
26
|
-
_locals[key.to_sym]
|
27
|
-
end
|
28
|
-
|
29
|
-
# Sets a thread local with +key+ to +value+. Note that these are local to
|
30
|
-
# threads, and not to fibers. Please see Thread#thread_variable_get for
|
31
|
-
# more information.
|
32
|
-
def thread_variable_set(key, value)
|
33
|
-
_locals[key.to_sym] = value
|
34
|
-
end
|
35
|
-
|
36
|
-
# Returns an array of the names of the thread-local variables (as Symbols).
|
37
|
-
#
|
38
|
-
# thr = Thread.new do
|
39
|
-
# Thread.current.thread_variable_set(:cat, 'meow')
|
40
|
-
# Thread.current.thread_variable_set("dog", 'woof')
|
41
|
-
# end
|
42
|
-
# thr.join # => #<Thread:0x401b3f10 dead>
|
43
|
-
# thr.thread_variables # => [:dog, :cat]
|
44
|
-
#
|
45
|
-
# Note that these are not fiber local variables. Please see Thread#thread_variable_get
|
46
|
-
# for more details.
|
47
|
-
def thread_variables
|
48
|
-
_locals.keys
|
49
|
-
end
|
50
|
-
|
51
|
-
# Returns <tt>true</tt> if the given string (or symbol) exists as a
|
52
|
-
# thread-local variable.
|
53
|
-
#
|
54
|
-
# me = Thread.current
|
55
|
-
# me.thread_variable_set(:oliver, "a")
|
56
|
-
# me.thread_variable?(:oliver) # => true
|
57
|
-
# me.thread_variable?(:stanley) # => false
|
58
|
-
#
|
59
|
-
# Note that these are not fiber local variables. Please see Thread#thread_variable_get
|
60
|
-
# for more details.
|
61
|
-
def thread_variable?(key)
|
62
|
-
_locals.has_key?(key.to_sym)
|
63
|
-
end
|
64
|
-
|
65
|
-
# Freezes the thread so that thread local variables cannot be set via
|
66
|
-
# Thread#thread_variable_set, nor can fiber local variables be set.
|
67
|
-
#
|
68
|
-
# me = Thread.current
|
69
|
-
# me.freeze
|
70
|
-
# me.thread_variable_set(:oliver, "a") #=> RuntimeError: can't modify frozen thread locals
|
71
|
-
# me[:oliver] = "a" #=> RuntimeError: can't modify frozen thread locals
|
72
|
-
def freeze
|
73
|
-
_locals.freeze
|
74
|
-
super
|
75
|
-
end
|
76
|
-
|
77
|
-
private
|
78
|
-
|
79
|
-
def _locals
|
80
|
-
if defined?(@_locals)
|
81
|
-
@_locals
|
82
|
-
else
|
83
|
-
LOCK.synchronize { @_locals ||= {} }
|
84
|
-
end
|
85
|
-
end
|
86
|
-
end unless Thread.instance_methods.include?(:thread_variable_set)
|
@@ -1,30 +0,0 @@
|
|
1
|
-
# Ruby 1.9.2 adds utc_offset and zone to Time, but marshaling only
|
2
|
-
# preserves utc_offset. Preserve zone also, even though it may not
|
3
|
-
# work in some edge cases.
|
4
|
-
if Time.local(2010).zone != Marshal.load(Marshal.dump(Time.local(2010))).zone
|
5
|
-
class Time
|
6
|
-
class << self
|
7
|
-
alias_method :_load_without_zone, :_load
|
8
|
-
def _load(marshaled_time)
|
9
|
-
time = _load_without_zone(marshaled_time)
|
10
|
-
time.instance_eval do
|
11
|
-
if zone = defined?(@_zone) && remove_instance_variable('@_zone')
|
12
|
-
ary = to_a
|
13
|
-
ary[0] += subsec if ary[0] == sec
|
14
|
-
ary[-1] = zone
|
15
|
-
utc? ? Time.utc(*ary) : Time.local(*ary)
|
16
|
-
else
|
17
|
-
self
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
alias_method :_dump_without_zone, :_dump
|
24
|
-
def _dump(*args)
|
25
|
-
obj = dup
|
26
|
-
obj.instance_variable_set('@_zone', zone)
|
27
|
-
obj.send :_dump_without_zone, *args
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|