activesupport 6.0.4.4 → 7.0.4.1
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 +257 -532
- data/MIT-LICENSE +1 -1
- data/lib/active_support/actionable_error.rb +1 -1
- data/lib/active_support/array_inquirer.rb +2 -2
- data/lib/active_support/backtrace_cleaner.rb +5 -5
- data/lib/active_support/benchmarkable.rb +3 -3
- data/lib/active_support/cache/file_store.rb +16 -10
- data/lib/active_support/cache/mem_cache_store.rb +163 -42
- data/lib/active_support/cache/memory_store.rb +57 -29
- data/lib/active_support/cache/null_store.rb +10 -2
- data/lib/active_support/cache/redis_cache_store.rb +79 -98
- data/lib/active_support/cache/strategy/local_cache.rb +49 -57
- data/lib/active_support/cache.rb +378 -179
- data/lib/active_support/callbacks.rb +230 -122
- data/lib/active_support/code_generator.rb +65 -0
- data/lib/active_support/concern.rb +49 -5
- data/lib/active_support/concurrency/load_interlock_aware_monitor.rb +2 -4
- data/lib/active_support/concurrency/share_lock.rb +2 -2
- data/lib/active_support/configurable.rb +9 -6
- data/lib/active_support/configuration_file.rb +51 -0
- data/lib/active_support/core_ext/array/access.rb +1 -5
- data/lib/active_support/core_ext/array/conversions.rb +13 -12
- data/lib/active_support/core_ext/array/deprecated_conversions.rb +25 -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 +1 -0
- 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 +34 -44
- 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 +9 -9
- 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 +17 -4
- data/lib/active_support/core_ext/date_and_time/compatibility.rb +15 -0
- data/lib/active_support/core_ext/date_time/blank.rb +1 -1
- data/lib/active_support/core_ext/date_time/conversions.rb +13 -13
- 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 +164 -23
- data/lib/active_support/core_ext/file/atomic.rb +3 -1
- data/lib/active_support/core_ext/hash/conversions.rb +2 -3
- data/lib/active_support/core_ext/hash/deep_transform_values.rb +1 -1
- data/lib/active_support/core_ext/hash/indifferent_access.rb +3 -3
- data/lib/active_support/core_ext/hash/keys.rb +2 -2
- data/lib/active_support/core_ext/hash/slice.rb +3 -2
- 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/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 +25 -29
- data/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb +26 -13
- data/lib/active_support/core_ext/module/concerning.rb +8 -2
- data/lib/active_support/core_ext/module/delegation.rb +40 -36
- data/lib/active_support/core_ext/module/introspection.rb +1 -25
- data/lib/active_support/core_ext/name_error.rb +23 -2
- data/lib/active_support/core_ext/numeric/conversions.rb +80 -73
- data/lib/active_support/core_ext/numeric/deprecated_conversions.rb +60 -0
- data/lib/active_support/core_ext/numeric.rb +1 -0
- data/lib/active_support/core_ext/object/acts_like.rb +29 -5
- data/lib/active_support/core_ext/object/blank.rb +2 -2
- data/lib/active_support/core_ext/object/deep_dup.rb +1 -1
- data/lib/active_support/core_ext/object/duplicable.rb +11 -0
- data/lib/active_support/core_ext/object/json.rb +42 -26
- data/lib/active_support/core_ext/object/to_query.rb +2 -2
- data/lib/active_support/core_ext/object/try.rb +20 -20
- data/lib/active_support/core_ext/object/with_options.rb +20 -1
- 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 +6 -25
- data/lib/active_support/core_ext/range/conversions.rb +8 -8
- data/lib/active_support/core_ext/range/deprecated_conversions.rb +26 -0
- data/lib/active_support/core_ext/range/each.rb +1 -1
- 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 -1
- data/lib/active_support/core_ext/securerandom.rb +1 -1
- data/lib/active_support/core_ext/string/access.rb +5 -24
- data/lib/active_support/core_ext/string/conversions.rb +3 -2
- data/lib/active_support/core_ext/string/filters.rb +1 -1
- data/lib/active_support/core_ext/string/inflections.rb +39 -5
- data/lib/active_support/core_ext/string/inquiry.rb +2 -1
- data/lib/active_support/core_ext/string/multibyte.rb +2 -2
- data/lib/active_support/core_ext/string/output_safety.rb +92 -41
- data/lib/active_support/core_ext/string/starts_ends_with.rb +2 -2
- 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 +25 -7
- 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 -23
- 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 +39 -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 +58 -769
- data/lib/active_support/deprecation/behaviors.rb +23 -7
- 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 +6 -5
- data/lib/active_support/deprecation/proxy_wrappers.rb +4 -4
- data/lib/active_support/deprecation/reporting.rb +50 -7
- data/lib/active_support/deprecation.rb +7 -2
- data/lib/active_support/descendants_tracker.rb +174 -64
- data/lib/active_support/digest.rb +5 -3
- data/lib/active_support/duration/iso8601_parser.rb +3 -3
- data/lib/active_support/duration/iso8601_serializer.rb +24 -10
- data/lib/active_support/duration.rb +134 -55
- data/lib/active_support/encrypted_configuration.rb +13 -2
- data/lib/active_support/encrypted_file.rb +32 -3
- 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 +72 -138
- 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 +43 -21
- data/lib/active_support/executor/test_helper.rb +7 -0
- data/lib/active_support/fork_tracker.rb +71 -0
- data/lib/active_support/gem_version.rb +3 -3
- data/lib/active_support/hash_with_indifferent_access.rb +51 -25
- data/lib/active_support/html_safe_translation.rb +43 -0
- data/lib/active_support/i18n.rb +1 -0
- data/lib/active_support/i18n_railtie.rb +14 -19
- data/lib/active_support/inflector/inflections.rb +24 -9
- data/lib/active_support/inflector/methods.rb +29 -49
- data/lib/active_support/inflector/transliterate.rb +5 -5
- data/lib/active_support/isolated_execution_state.rb +72 -0
- data/lib/active_support/json/decoding.rb +4 -4
- data/lib/active_support/json/encoding.rb +8 -4
- data/lib/active_support/key_generator.rb +23 -6
- data/lib/active_support/lazy_load_hooks.rb +28 -4
- 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 +23 -5
- data/lib/active_support/logger.rb +1 -1
- data/lib/active_support/logger_silence.rb +2 -26
- data/lib/active_support/logger_thread_safe_level.rb +34 -21
- data/lib/active_support/message_encryptor.rb +16 -13
- data/lib/active_support/message_verifier.rb +50 -18
- data/lib/active_support/messages/metadata.rb +2 -2
- data/lib/active_support/messages/rotation_configuration.rb +2 -1
- data/lib/active_support/messages/rotator.rb +6 -5
- data/lib/active_support/multibyte/chars.rb +13 -52
- data/lib/active_support/multibyte/unicode.rb +1 -87
- data/lib/active_support/multibyte.rb +1 -1
- data/lib/active_support/notifications/fanout.rb +110 -69
- data/lib/active_support/notifications/instrumenter.rb +37 -29
- data/lib/active_support/notifications.rb +55 -28
- data/lib/active_support/number_helper/number_converter.rb +2 -4
- data/lib/active_support/number_helper/number_to_currency_converter.rb +11 -6
- data/lib/active_support/number_helper/number_to_delimited_converter.rb +1 -1
- data/lib/active_support/number_helper/number_to_human_converter.rb +1 -1
- data/lib/active_support/number_helper/number_to_human_size_converter.rb +2 -2
- data/lib/active_support/number_helper/number_to_phone_converter.rb +1 -1
- data/lib/active_support/number_helper/number_to_rounded_converter.rb +9 -5
- data/lib/active_support/number_helper/rounding_helper.rb +12 -32
- data/lib/active_support/number_helper.rb +29 -16
- data/lib/active_support/option_merger.rb +11 -18
- data/lib/active_support/ordered_hash.rb +1 -1
- data/lib/active_support/ordered_options.rb +9 -3
- data/lib/active_support/parameter_filter.rb +21 -11
- data/lib/active_support/per_thread_registry.rb +6 -1
- data/lib/active_support/rails.rb +1 -4
- data/lib/active_support/railtie.rb +77 -5
- data/lib/active_support/reloader.rb +1 -1
- data/lib/active_support/rescuable.rb +16 -16
- 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 -2
- data/lib/active_support/subscriber.rb +19 -25
- data/lib/active_support/tagged_logging.rb +31 -6
- data/lib/active_support/test_case.rb +13 -21
- data/lib/active_support/testing/assertions.rb +50 -13
- data/lib/active_support/testing/deprecation.rb +52 -1
- data/lib/active_support/testing/isolation.rb +2 -2
- data/lib/active_support/testing/method_call_assertions.rb +5 -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 +16 -95
- data/lib/active_support/testing/parallelize_executor.rb +76 -0
- data/lib/active_support/testing/stream.rb +3 -5
- data/lib/active_support/testing/tagged_logging.rb +1 -1
- data/lib/active_support/testing/time_helpers.rb +53 -5
- data/lib/active_support/time_with_zone.rb +126 -62
- data/lib/active_support/values/time_zone.rb +54 -23
- data/lib/active_support/version.rb +1 -1
- data/lib/active_support/xml_mini/jdom.rb +1 -1
- data/lib/active_support/xml_mini/libxml.rb +5 -5
- data/lib/active_support/xml_mini/libxmlsax.rb +1 -1
- data/lib/active_support/xml_mini/nokogiri.rb +4 -4
- data/lib/active_support/xml_mini/nokogirisax.rb +1 -1
- data/lib/active_support/xml_mini/rexml.rb +9 -2
- data/lib/active_support/xml_mini.rb +5 -4
- data/lib/active_support.rb +29 -1
- metadata +46 -45
- data/lib/active_support/core_ext/array/prepend_and_append.rb +0 -5
- data/lib/active_support/core_ext/hash/compact.rb +0 -5
- data/lib/active_support/core_ext/hash/transform_values.rb +0 -5
- data/lib/active_support/core_ext/marshal.rb +0 -24
- data/lib/active_support/core_ext/module/reachable.rb +0 -6
- data/lib/active_support/core_ext/numeric/inquiry.rb +0 -5
- data/lib/active_support/core_ext/range/include_range.rb +0 -9
- data/lib/active_support/dependencies/zeitwerk_integration.rb +0 -117
@@ -5,7 +5,7 @@ require "active_support/core_ext/object/blank"
|
|
5
5
|
require "stringio"
|
6
6
|
|
7
7
|
module ActiveSupport
|
8
|
-
module XmlMini_REXML
|
8
|
+
module XmlMini_REXML # :nodoc:
|
9
9
|
extend self
|
10
10
|
|
11
11
|
CONTENT_KEY = "__content__"
|
@@ -25,7 +25,7 @@ module ActiveSupport
|
|
25
25
|
if data.eof?
|
26
26
|
{}
|
27
27
|
else
|
28
|
-
|
28
|
+
require_rexml unless defined?(REXML::Document)
|
29
29
|
doc = REXML::Document.new(data)
|
30
30
|
|
31
31
|
if doc.root
|
@@ -38,6 +38,13 @@ module ActiveSupport
|
|
38
38
|
end
|
39
39
|
|
40
40
|
private
|
41
|
+
def require_rexml
|
42
|
+
silence_warnings { require "rexml/document" }
|
43
|
+
rescue LoadError => e
|
44
|
+
$stderr.puts "You don't have rexml installed in your application. Please add it to your Gemfile and run bundle install"
|
45
|
+
raise e
|
46
|
+
end
|
47
|
+
|
41
48
|
# Convert an XML element and merge into the hash
|
42
49
|
#
|
43
50
|
# hash::
|
@@ -19,7 +19,7 @@ module ActiveSupport
|
|
19
19
|
|
20
20
|
# This module decorates files deserialized using Hash.from_xml with
|
21
21
|
# the <tt>original_filename</tt> and <tt>content_type</tt> methods.
|
22
|
-
module FileLike
|
22
|
+
module FileLike # :nodoc:
|
23
23
|
attr_writer :original_filename, :content_type
|
24
24
|
|
25
25
|
def original_filename
|
@@ -50,10 +50,11 @@ module ActiveSupport
|
|
50
50
|
"Hash" => "hash"
|
51
51
|
}
|
52
52
|
end
|
53
|
+
TYPE_NAMES["ActiveSupport::TimeWithZone"] = TYPE_NAMES["Time"]
|
53
54
|
|
54
55
|
FORMATTING = {
|
55
56
|
"symbol" => Proc.new { |symbol| symbol.to_s },
|
56
|
-
"date" => Proc.new { |date| date.
|
57
|
+
"date" => Proc.new { |date| date.to_fs(:db) },
|
57
58
|
"dateTime" => Proc.new { |time| time.xmlschema },
|
58
59
|
"binary" => Proc.new { |binary| ::Base64.encode64(binary) },
|
59
60
|
"yaml" => Proc.new { |yaml| yaml.to_yaml }
|
@@ -180,11 +181,11 @@ module ActiveSupport
|
|
180
181
|
end
|
181
182
|
|
182
183
|
def current_thread_backend
|
183
|
-
|
184
|
+
IsolatedExecutionState[:xml_mini_backend]
|
184
185
|
end
|
185
186
|
|
186
187
|
def current_thread_backend=(name)
|
187
|
-
|
188
|
+
IsolatedExecutionState[:xml_mini_backend] = name && cast_backend_name_to_module(name)
|
188
189
|
end
|
189
190
|
|
190
191
|
def cast_backend_name_to_module(name)
|
data/lib/active_support.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
#--
|
4
|
-
# Copyright (c) 2005-
|
4
|
+
# Copyright (c) 2005-2022 David Heinemeier Hansson
|
5
5
|
#
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining
|
7
7
|
# a copy of this software and associated documentation files (the
|
@@ -34,17 +34,25 @@ module ActiveSupport
|
|
34
34
|
extend ActiveSupport::Autoload
|
35
35
|
|
36
36
|
autoload :Concern
|
37
|
+
autoload :CodeGenerator
|
37
38
|
autoload :ActionableError
|
39
|
+
autoload :ConfigurationFile
|
38
40
|
autoload :CurrentAttributes
|
39
41
|
autoload :Dependencies
|
40
42
|
autoload :DescendantsTracker
|
43
|
+
autoload :ExecutionContext
|
41
44
|
autoload :ExecutionWrapper
|
42
45
|
autoload :Executor
|
46
|
+
autoload :ErrorReporter
|
43
47
|
autoload :FileUpdateChecker
|
44
48
|
autoload :EventedFileUpdateChecker
|
49
|
+
autoload :ForkTracker
|
45
50
|
autoload :LogSubscriber
|
51
|
+
autoload :IsolatedExecutionState
|
46
52
|
autoload :Notifications
|
47
53
|
autoload :Reloader
|
54
|
+
autoload :PerThreadRegistry
|
55
|
+
autoload :SecureCompareRotator
|
48
56
|
|
49
57
|
eager_autoload do
|
50
58
|
autoload :BacktraceCleaner
|
@@ -67,6 +75,7 @@ module ActiveSupport
|
|
67
75
|
autoload :OrderedHash
|
68
76
|
autoload :OrderedOptions
|
69
77
|
autoload :StringInquirer
|
78
|
+
autoload :EnvironmentInquirer
|
70
79
|
autoload :TaggedLogging
|
71
80
|
autoload :XmlMini
|
72
81
|
autoload :ArrayInquirer
|
@@ -83,6 +92,17 @@ module ActiveSupport
|
|
83
92
|
end
|
84
93
|
|
85
94
|
cattr_accessor :test_order # :nodoc:
|
95
|
+
cattr_accessor :test_parallelization_threshold, default: 50 # :nodoc:
|
96
|
+
|
97
|
+
singleton_class.attr_accessor :error_reporter # :nodoc:
|
98
|
+
|
99
|
+
def self.cache_format_version
|
100
|
+
Cache.format_version
|
101
|
+
end
|
102
|
+
|
103
|
+
def self.cache_format_version=(value)
|
104
|
+
Cache.format_version = value
|
105
|
+
end
|
86
106
|
|
87
107
|
def self.to_time_preserves_timezone
|
88
108
|
DateAndTime::Compatibility.preserve_timezone
|
@@ -91,6 +111,14 @@ module ActiveSupport
|
|
91
111
|
def self.to_time_preserves_timezone=(value)
|
92
112
|
DateAndTime::Compatibility.preserve_timezone = value
|
93
113
|
end
|
114
|
+
|
115
|
+
def self.utc_to_local_returns_utc_offset_times
|
116
|
+
DateAndTime::Compatibility.utc_to_local_returns_utc_offset_times
|
117
|
+
end
|
118
|
+
|
119
|
+
def self.utc_to_local_returns_utc_offset_times=(value)
|
120
|
+
DateAndTime::Compatibility.utc_to_local_returns_utc_offset_times = value
|
121
|
+
end
|
94
122
|
end
|
95
123
|
|
96
124
|
autoload :I18n, "active_support/i18n"
|
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.4.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: 2023-01-17 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,28 +36,14 @@ 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: '
|
47
|
-
- !ruby/object:Gem::Dependency
|
48
|
-
name: minitest
|
49
|
-
requirement: !ruby/object:Gem::Requirement
|
50
|
-
requirements:
|
51
|
-
- - "~>"
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '5.1'
|
54
|
-
type: :runtime
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
requirements:
|
58
|
-
- - "~>"
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
version: '5.1'
|
46
|
+
version: '2.0'
|
61
47
|
- !ruby/object:Gem::Dependency
|
62
48
|
name: concurrent-ruby
|
63
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -79,25 +65,19 @@ dependencies:
|
|
79
65
|
- !ruby/object:Gem::Version
|
80
66
|
version: 1.0.2
|
81
67
|
- !ruby/object:Gem::Dependency
|
82
|
-
name:
|
68
|
+
name: minitest
|
83
69
|
requirement: !ruby/object:Gem::Requirement
|
84
70
|
requirements:
|
85
|
-
- - "~>"
|
86
|
-
- !ruby/object:Gem::Version
|
87
|
-
version: '2.2'
|
88
71
|
- - ">="
|
89
72
|
- !ruby/object:Gem::Version
|
90
|
-
version:
|
73
|
+
version: '5.1'
|
91
74
|
type: :runtime
|
92
75
|
prerelease: false
|
93
76
|
version_requirements: !ruby/object:Gem::Requirement
|
94
77
|
requirements:
|
95
|
-
- - "~>"
|
96
|
-
- !ruby/object:Gem::Version
|
97
|
-
version: '2.2'
|
98
78
|
- - ">="
|
99
79
|
- !ruby/object:Gem::Version
|
100
|
-
version:
|
80
|
+
version: '5.1'
|
101
81
|
description: A toolkit of support libraries and Ruby core extensions extracted from
|
102
82
|
the Rails framework. Rich support for multibyte strings, internationalization, time
|
103
83
|
zones, and testing.
|
@@ -125,19 +105,21 @@ files:
|
|
125
105
|
- lib/active_support/cache/strategy/local_cache.rb
|
126
106
|
- lib/active_support/cache/strategy/local_cache_middleware.rb
|
127
107
|
- lib/active_support/callbacks.rb
|
108
|
+
- lib/active_support/code_generator.rb
|
128
109
|
- lib/active_support/concern.rb
|
129
110
|
- lib/active_support/concurrency/load_interlock_aware_monitor.rb
|
130
111
|
- lib/active_support/concurrency/share_lock.rb
|
131
112
|
- lib/active_support/configurable.rb
|
113
|
+
- lib/active_support/configuration_file.rb
|
132
114
|
- lib/active_support/core_ext.rb
|
133
115
|
- lib/active_support/core_ext/array.rb
|
134
116
|
- lib/active_support/core_ext/array/access.rb
|
135
117
|
- lib/active_support/core_ext/array/conversions.rb
|
118
|
+
- lib/active_support/core_ext/array/deprecated_conversions.rb
|
136
119
|
- lib/active_support/core_ext/array/extract.rb
|
137
120
|
- lib/active_support/core_ext/array/extract_options.rb
|
138
121
|
- lib/active_support/core_ext/array/grouping.rb
|
139
122
|
- lib/active_support/core_ext/array/inquiry.rb
|
140
|
-
- lib/active_support/core_ext/array/prepend_and_append.rb
|
141
123
|
- lib/active_support/core_ext/array/wrap.rb
|
142
124
|
- lib/active_support/core_ext/benchmark.rb
|
143
125
|
- lib/active_support/core_ext/big_decimal.rb
|
@@ -151,6 +133,7 @@ files:
|
|
151
133
|
- lib/active_support/core_ext/date/blank.rb
|
152
134
|
- lib/active_support/core_ext/date/calculations.rb
|
153
135
|
- lib/active_support/core_ext/date/conversions.rb
|
136
|
+
- lib/active_support/core_ext/date/deprecated_conversions.rb
|
154
137
|
- lib/active_support/core_ext/date/zones.rb
|
155
138
|
- lib/active_support/core_ext/date_and_time/calculations.rb
|
156
139
|
- lib/active_support/core_ext/date_and_time/compatibility.rb
|
@@ -161,13 +144,13 @@ files:
|
|
161
144
|
- lib/active_support/core_ext/date_time/calculations.rb
|
162
145
|
- lib/active_support/core_ext/date_time/compatibility.rb
|
163
146
|
- lib/active_support/core_ext/date_time/conversions.rb
|
147
|
+
- lib/active_support/core_ext/date_time/deprecated_conversions.rb
|
164
148
|
- lib/active_support/core_ext/digest.rb
|
165
149
|
- lib/active_support/core_ext/digest/uuid.rb
|
166
150
|
- lib/active_support/core_ext/enumerable.rb
|
167
151
|
- lib/active_support/core_ext/file.rb
|
168
152
|
- lib/active_support/core_ext/file/atomic.rb
|
169
153
|
- lib/active_support/core_ext/hash.rb
|
170
|
-
- lib/active_support/core_ext/hash/compact.rb
|
171
154
|
- lib/active_support/core_ext/hash/conversions.rb
|
172
155
|
- lib/active_support/core_ext/hash/deep_merge.rb
|
173
156
|
- lib/active_support/core_ext/hash/deep_transform_values.rb
|
@@ -176,7 +159,6 @@ files:
|
|
176
159
|
- lib/active_support/core_ext/hash/keys.rb
|
177
160
|
- lib/active_support/core_ext/hash/reverse_merge.rb
|
178
161
|
- lib/active_support/core_ext/hash/slice.rb
|
179
|
-
- lib/active_support/core_ext/hash/transform_values.rb
|
180
162
|
- lib/active_support/core_ext/integer.rb
|
181
163
|
- lib/active_support/core_ext/integer/inflections.rb
|
182
164
|
- lib/active_support/core_ext/integer/multiple.rb
|
@@ -186,7 +168,6 @@ files:
|
|
186
168
|
- lib/active_support/core_ext/kernel/reporting.rb
|
187
169
|
- lib/active_support/core_ext/kernel/singleton_class.rb
|
188
170
|
- lib/active_support/core_ext/load_error.rb
|
189
|
-
- lib/active_support/core_ext/marshal.rb
|
190
171
|
- lib/active_support/core_ext/module.rb
|
191
172
|
- lib/active_support/core_ext/module/aliasing.rb
|
192
173
|
- lib/active_support/core_ext/module/anonymous.rb
|
@@ -197,14 +178,13 @@ files:
|
|
197
178
|
- lib/active_support/core_ext/module/delegation.rb
|
198
179
|
- lib/active_support/core_ext/module/deprecation.rb
|
199
180
|
- lib/active_support/core_ext/module/introspection.rb
|
200
|
-
- lib/active_support/core_ext/module/reachable.rb
|
201
181
|
- lib/active_support/core_ext/module/redefine_method.rb
|
202
182
|
- lib/active_support/core_ext/module/remove_method.rb
|
203
183
|
- lib/active_support/core_ext/name_error.rb
|
204
184
|
- lib/active_support/core_ext/numeric.rb
|
205
185
|
- lib/active_support/core_ext/numeric/bytes.rb
|
206
186
|
- lib/active_support/core_ext/numeric/conversions.rb
|
207
|
-
- lib/active_support/core_ext/numeric/
|
187
|
+
- lib/active_support/core_ext/numeric/deprecated_conversions.rb
|
208
188
|
- lib/active_support/core_ext/numeric/time.rb
|
209
189
|
- lib/active_support/core_ext/object.rb
|
210
190
|
- lib/active_support/core_ext/object/acts_like.rb
|
@@ -219,11 +199,13 @@ files:
|
|
219
199
|
- lib/active_support/core_ext/object/to_query.rb
|
220
200
|
- lib/active_support/core_ext/object/try.rb
|
221
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
|
222
204
|
- lib/active_support/core_ext/range.rb
|
223
205
|
- lib/active_support/core_ext/range/compare_range.rb
|
224
206
|
- lib/active_support/core_ext/range/conversions.rb
|
207
|
+
- lib/active_support/core_ext/range/deprecated_conversions.rb
|
225
208
|
- lib/active_support/core_ext/range/each.rb
|
226
|
-
- lib/active_support/core_ext/range/include_range.rb
|
227
209
|
- lib/active_support/core_ext/range/include_time_with_zone.rb
|
228
210
|
- lib/active_support/core_ext/range/overlaps.rb
|
229
211
|
- lib/active_support/core_ext/regexp.rb
|
@@ -242,21 +224,26 @@ files:
|
|
242
224
|
- lib/active_support/core_ext/string/starts_ends_with.rb
|
243
225
|
- lib/active_support/core_ext/string/strip.rb
|
244
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
|
245
229
|
- lib/active_support/core_ext/time.rb
|
246
230
|
- lib/active_support/core_ext/time/acts_like.rb
|
247
231
|
- lib/active_support/core_ext/time/calculations.rb
|
248
232
|
- lib/active_support/core_ext/time/compatibility.rb
|
249
233
|
- lib/active_support/core_ext/time/conversions.rb
|
234
|
+
- lib/active_support/core_ext/time/deprecated_conversions.rb
|
250
235
|
- lib/active_support/core_ext/time/zones.rb
|
251
236
|
- lib/active_support/core_ext/uri.rb
|
252
237
|
- lib/active_support/current_attributes.rb
|
238
|
+
- lib/active_support/current_attributes/test_helper.rb
|
253
239
|
- lib/active_support/dependencies.rb
|
254
240
|
- lib/active_support/dependencies/autoload.rb
|
255
241
|
- lib/active_support/dependencies/interlock.rb
|
256
|
-
- lib/active_support/dependencies/
|
242
|
+
- lib/active_support/dependencies/require_dependency.rb
|
257
243
|
- lib/active_support/deprecation.rb
|
258
244
|
- lib/active_support/deprecation/behaviors.rb
|
259
245
|
- lib/active_support/deprecation/constant_accessor.rb
|
246
|
+
- lib/active_support/deprecation/disallowed.rb
|
260
247
|
- lib/active_support/deprecation/instance_delegator.rb
|
261
248
|
- lib/active_support/deprecation/method_wrappers.rb
|
262
249
|
- lib/active_support/deprecation/proxy_wrappers.rb
|
@@ -268,13 +255,20 @@ files:
|
|
268
255
|
- lib/active_support/duration/iso8601_serializer.rb
|
269
256
|
- lib/active_support/encrypted_configuration.rb
|
270
257
|
- lib/active_support/encrypted_file.rb
|
258
|
+
- lib/active_support/environment_inquirer.rb
|
259
|
+
- lib/active_support/error_reporter.rb
|
271
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
|
272
263
|
- lib/active_support/execution_wrapper.rb
|
273
264
|
- lib/active_support/executor.rb
|
265
|
+
- lib/active_support/executor/test_helper.rb
|
274
266
|
- lib/active_support/file_update_checker.rb
|
267
|
+
- lib/active_support/fork_tracker.rb
|
275
268
|
- lib/active_support/gem_version.rb
|
276
269
|
- lib/active_support/gzip.rb
|
277
270
|
- lib/active_support/hash_with_indifferent_access.rb
|
271
|
+
- lib/active_support/html_safe_translation.rb
|
278
272
|
- lib/active_support/i18n.rb
|
279
273
|
- lib/active_support/i18n_railtie.rb
|
280
274
|
- lib/active_support/inflections.rb
|
@@ -282,6 +276,7 @@ files:
|
|
282
276
|
- lib/active_support/inflector/inflections.rb
|
283
277
|
- lib/active_support/inflector/methods.rb
|
284
278
|
- lib/active_support/inflector/transliterate.rb
|
279
|
+
- lib/active_support/isolated_execution_state.rb
|
285
280
|
- lib/active_support/json.rb
|
286
281
|
- lib/active_support/json/decoding.rb
|
287
282
|
- lib/active_support/json/encoding.rb
|
@@ -325,6 +320,8 @@ files:
|
|
325
320
|
- lib/active_support/railtie.rb
|
326
321
|
- lib/active_support/reloader.rb
|
327
322
|
- lib/active_support/rescuable.rb
|
323
|
+
- lib/active_support/ruby_features.rb
|
324
|
+
- lib/active_support/secure_compare_rotator.rb
|
328
325
|
- lib/active_support/security_utils.rb
|
329
326
|
- lib/active_support/string_inquirer.rb
|
330
327
|
- lib/active_support/subscriber.rb
|
@@ -339,6 +336,9 @@ files:
|
|
339
336
|
- lib/active_support/testing/isolation.rb
|
340
337
|
- lib/active_support/testing/method_call_assertions.rb
|
341
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
|
342
342
|
- lib/active_support/testing/setup_and_teardown.rb
|
343
343
|
- lib/active_support/testing/stream.rb
|
344
344
|
- lib/active_support/testing/tagged_logging.rb
|
@@ -359,11 +359,12 @@ licenses:
|
|
359
359
|
- MIT
|
360
360
|
metadata:
|
361
361
|
bug_tracker_uri: https://github.com/rails/rails/issues
|
362
|
-
changelog_uri: https://github.com/rails/rails/blob/
|
363
|
-
documentation_uri: https://api.rubyonrails.org/
|
362
|
+
changelog_uri: https://github.com/rails/rails/blob/v7.0.4.1/activesupport/CHANGELOG.md
|
363
|
+
documentation_uri: https://api.rubyonrails.org/v7.0.4.1/
|
364
364
|
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
365
|
-
source_code_uri: https://github.com/rails/rails/tree/
|
366
|
-
|
365
|
+
source_code_uri: https://github.com/rails/rails/tree/v7.0.4.1/activesupport
|
366
|
+
rubygems_mfa_required: 'true'
|
367
|
+
post_install_message:
|
367
368
|
rdoc_options:
|
368
369
|
- "--encoding"
|
369
370
|
- UTF-8
|
@@ -373,15 +374,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
373
374
|
requirements:
|
374
375
|
- - ">="
|
375
376
|
- !ruby/object:Gem::Version
|
376
|
-
version: 2.
|
377
|
+
version: 2.7.0
|
377
378
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
378
379
|
requirements:
|
379
380
|
- - ">="
|
380
381
|
- !ruby/object:Gem::Version
|
381
382
|
version: '0'
|
382
383
|
requirements: []
|
383
|
-
rubygems_version: 3.
|
384
|
-
signing_key:
|
384
|
+
rubygems_version: 3.4.3
|
385
|
+
signing_key:
|
385
386
|
specification_version: 4
|
386
387
|
summary: A toolkit of support libraries and Ruby core extensions extracted from the
|
387
388
|
Rails framework.
|
@@ -1,5 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "active_support/deprecation"
|
4
|
-
|
5
|
-
ActiveSupport::Deprecation.warn "Ruby 2.5+ (required by Rails 6) provides Array#append and Array#prepend natively, so requiring active_support/core_ext/array/prepend_and_append is no longer necessary. Requiring it will raise LoadError in Rails 6.1."
|
@@ -1,5 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "active_support/deprecation"
|
4
|
-
|
5
|
-
ActiveSupport::Deprecation.warn "Ruby 2.5+ (required by Rails 6) provides Hash#compact and Hash#compact! natively, so requiring active_support/core_ext/hash/compact is no longer necessary. Requiring it will raise LoadError in Rails 6.1."
|
@@ -1,5 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "active_support/deprecation"
|
4
|
-
|
5
|
-
ActiveSupport::Deprecation.warn "Ruby 2.5+ (required by Rails 6) provides Hash#transform_values natively, so requiring active_support/core_ext/hash/transform_values is no longer necessary. Requiring it will raise LoadError in Rails 6.1."
|
@@ -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,5 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "active_support/deprecation"
|
4
|
-
|
5
|
-
ActiveSupport::Deprecation.warn "Ruby 2.5+ (required by Rails 6) provides Numeric#positive? and Numeric#negative? natively, so requiring active_support/core_ext/numeric/inquiry is no longer necessary. Requiring it will raise LoadError in Rails 6.1."
|
@@ -1,9 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "active_support/deprecation"
|
4
|
-
|
5
|
-
ActiveSupport::Deprecation.warn "You have required `active_support/core_ext/range/include_range`. " \
|
6
|
-
"This file will be removed in Rails 6.1. You should require `active_support/core_ext/range/compare_range` " \
|
7
|
-
"instead."
|
8
|
-
|
9
|
-
require "active_support/core_ext/range/compare_range"
|
@@ -1,117 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "set"
|
4
|
-
require "active_support/core_ext/string/inflections"
|
5
|
-
|
6
|
-
module ActiveSupport
|
7
|
-
module Dependencies
|
8
|
-
module ZeitwerkIntegration # :nodoc: all
|
9
|
-
module Decorations
|
10
|
-
def clear
|
11
|
-
Dependencies.unload_interlock do
|
12
|
-
Rails.autoloaders.main.reload
|
13
|
-
rescue Zeitwerk::ReloadingDisabledError
|
14
|
-
raise "reloading is disabled because config.cache_classes is true"
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
def constantize(cpath)
|
19
|
-
ActiveSupport::Inflector.constantize(cpath)
|
20
|
-
end
|
21
|
-
|
22
|
-
def safe_constantize(cpath)
|
23
|
-
ActiveSupport::Inflector.safe_constantize(cpath)
|
24
|
-
end
|
25
|
-
|
26
|
-
def autoloaded_constants
|
27
|
-
Rails.autoloaders.main.unloadable_cpaths
|
28
|
-
end
|
29
|
-
|
30
|
-
def autoloaded?(object)
|
31
|
-
cpath = object.is_a?(Module) ? real_mod_name(object) : object.to_s
|
32
|
-
Rails.autoloaders.main.unloadable_cpath?(cpath)
|
33
|
-
end
|
34
|
-
|
35
|
-
def verbose=(verbose)
|
36
|
-
l = verbose ? logger || Rails.logger : nil
|
37
|
-
Rails.autoloaders.each { |autoloader| autoloader.logger = l }
|
38
|
-
end
|
39
|
-
|
40
|
-
def unhook!
|
41
|
-
:no_op
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
module RequireDependency
|
46
|
-
def require_dependency(filename)
|
47
|
-
filename = filename.to_path if filename.respond_to?(:to_path)
|
48
|
-
if abspath = ActiveSupport::Dependencies.search_for_file(filename)
|
49
|
-
require abspath
|
50
|
-
else
|
51
|
-
require filename
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
module Inflector
|
57
|
-
# Concurrent::Map is not needed. This is a private class, and overrides
|
58
|
-
# must be defined while the application boots.
|
59
|
-
@overrides = {}
|
60
|
-
|
61
|
-
def self.camelize(basename, _abspath)
|
62
|
-
@overrides[basename] || basename.camelize
|
63
|
-
end
|
64
|
-
|
65
|
-
def self.inflect(overrides)
|
66
|
-
@overrides.merge!(overrides)
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
|
-
class << self
|
71
|
-
def take_over(enable_reloading:)
|
72
|
-
setup_autoloaders(enable_reloading)
|
73
|
-
freeze_paths
|
74
|
-
decorate_dependencies
|
75
|
-
end
|
76
|
-
|
77
|
-
private
|
78
|
-
def setup_autoloaders(enable_reloading)
|
79
|
-
Dependencies.autoload_paths.each do |autoload_path|
|
80
|
-
# Zeitwerk only accepts existing directories in `push_dir` to
|
81
|
-
# prevent misconfigurations.
|
82
|
-
next unless File.directory?(autoload_path)
|
83
|
-
|
84
|
-
autoloader = \
|
85
|
-
autoload_once?(autoload_path) ? Rails.autoloaders.once : Rails.autoloaders.main
|
86
|
-
|
87
|
-
autoloader.push_dir(autoload_path)
|
88
|
-
autoloader.do_not_eager_load(autoload_path) unless eager_load?(autoload_path)
|
89
|
-
end
|
90
|
-
|
91
|
-
Rails.autoloaders.main.enable_reloading if enable_reloading
|
92
|
-
Rails.autoloaders.each(&:setup)
|
93
|
-
end
|
94
|
-
|
95
|
-
def autoload_once?(autoload_path)
|
96
|
-
Dependencies.autoload_once_paths.include?(autoload_path)
|
97
|
-
end
|
98
|
-
|
99
|
-
def eager_load?(autoload_path)
|
100
|
-
Dependencies._eager_load_paths.member?(autoload_path)
|
101
|
-
end
|
102
|
-
|
103
|
-
def freeze_paths
|
104
|
-
Dependencies.autoload_paths.freeze
|
105
|
-
Dependencies.autoload_once_paths.freeze
|
106
|
-
Dependencies._eager_load_paths.freeze
|
107
|
-
end
|
108
|
-
|
109
|
-
def decorate_dependencies
|
110
|
-
Dependencies.unhook!
|
111
|
-
Dependencies.singleton_class.prepend(Decorations)
|
112
|
-
Object.prepend(RequireDependency)
|
113
|
-
end
|
114
|
-
end
|
115
|
-
end
|
116
|
-
end
|
117
|
-
end
|