activesupport 8.0.2 → 8.1.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +333 -128
- data/README.rdoc +1 -1
- data/lib/active_support/backtrace_cleaner.rb +71 -0
- data/lib/active_support/broadcast_logger.rb +46 -59
- data/lib/active_support/cache/mem_cache_store.rb +25 -27
- data/lib/active_support/cache/redis_cache_store.rb +36 -30
- data/lib/active_support/cache/strategy/local_cache.rb +16 -7
- data/lib/active_support/cache/strategy/local_cache_middleware.rb +7 -7
- data/lib/active_support/cache.rb +70 -6
- data/lib/active_support/callbacks.rb +20 -8
- data/lib/active_support/concurrency/load_interlock_aware_monitor.rb +8 -62
- data/lib/active_support/concurrency/thread_monitor.rb +55 -0
- data/lib/active_support/configurable.rb +34 -0
- data/lib/active_support/continuous_integration.rb +145 -0
- data/lib/active_support/core_ext/array.rb +7 -7
- data/lib/active_support/core_ext/benchmark.rb +4 -11
- data/lib/active_support/core_ext/big_decimal.rb +1 -1
- data/lib/active_support/core_ext/class/attribute.rb +8 -6
- data/lib/active_support/core_ext/class.rb +2 -2
- data/lib/active_support/core_ext/date.rb +5 -5
- data/lib/active_support/core_ext/date_and_time/compatibility.rb +0 -35
- data/lib/active_support/core_ext/date_time/compatibility.rb +3 -5
- data/lib/active_support/core_ext/date_time/conversions.rb +4 -2
- data/lib/active_support/core_ext/date_time.rb +5 -5
- data/lib/active_support/core_ext/digest.rb +1 -1
- data/lib/active_support/core_ext/enumerable.rb +16 -4
- data/lib/active_support/core_ext/erb/util.rb +3 -3
- data/lib/active_support/core_ext/file.rb +1 -1
- data/lib/active_support/core_ext/hash.rb +8 -8
- data/lib/active_support/core_ext/integer.rb +3 -3
- data/lib/active_support/core_ext/kernel.rb +3 -3
- data/lib/active_support/core_ext/module.rb +11 -11
- data/lib/active_support/core_ext/numeric.rb +3 -3
- data/lib/active_support/core_ext/object/json.rb +8 -1
- data/lib/active_support/core_ext/object/to_query.rb +7 -1
- data/lib/active_support/core_ext/object/try.rb +2 -2
- data/lib/active_support/core_ext/object.rb +13 -13
- data/lib/active_support/core_ext/pathname.rb +2 -2
- data/lib/active_support/core_ext/range/overlap.rb +3 -3
- data/lib/active_support/core_ext/range/sole.rb +17 -0
- data/lib/active_support/core_ext/range.rb +4 -4
- data/lib/active_support/core_ext/string/filters.rb +3 -3
- data/lib/active_support/core_ext/string/multibyte.rb +12 -3
- data/lib/active_support/core_ext/string/output_safety.rb +19 -12
- data/lib/active_support/core_ext/string.rb +13 -13
- data/lib/active_support/core_ext/symbol.rb +1 -1
- data/lib/active_support/core_ext/time/calculations.rb +0 -7
- data/lib/active_support/core_ext/time/compatibility.rb +2 -27
- data/lib/active_support/core_ext/time.rb +5 -5
- data/lib/active_support/core_ext.rb +1 -1
- data/lib/active_support/current_attributes/test_helper.rb +2 -2
- data/lib/active_support/current_attributes.rb +26 -16
- data/lib/active_support/dependencies/interlock.rb +11 -5
- data/lib/active_support/dependencies.rb +6 -1
- data/lib/active_support/deprecation/reporting.rb +4 -2
- data/lib/active_support/deprecation.rb +1 -1
- data/lib/active_support/editor.rb +70 -0
- data/lib/active_support/error_reporter.rb +50 -6
- data/lib/active_support/event_reporter/test_helper.rb +32 -0
- data/lib/active_support/event_reporter.rb +592 -0
- data/lib/active_support/evented_file_update_checker.rb +5 -1
- data/lib/active_support/execution_context.rb +64 -7
- data/lib/active_support/file_update_checker.rb +8 -6
- data/lib/active_support/gem_version.rb +2 -2
- data/lib/active_support/gzip.rb +1 -0
- data/lib/active_support/hash_with_indifferent_access.rb +47 -24
- data/lib/active_support/i18n_railtie.rb +1 -2
- data/lib/active_support/inflector/inflections.rb +31 -15
- data/lib/active_support/inflector/transliterate.rb +6 -8
- data/lib/active_support/isolated_execution_state.rb +12 -15
- data/lib/active_support/json/decoding.rb +6 -4
- data/lib/active_support/json/encoding.rb +135 -17
- data/lib/active_support/lazy_load_hooks.rb +1 -1
- data/lib/active_support/log_subscriber.rb +2 -6
- data/lib/active_support/logger_thread_safe_level.rb +6 -3
- data/lib/active_support/message_encryptors.rb +52 -0
- data/lib/active_support/message_pack/extensions.rb +5 -0
- data/lib/active_support/message_verifiers.rb +52 -0
- data/lib/active_support/messages/rotation_coordinator.rb +9 -0
- data/lib/active_support/messages/rotator.rb +5 -0
- data/lib/active_support/multibyte/chars.rb +8 -1
- data/lib/active_support/multibyte.rb +4 -0
- data/lib/active_support/notifications/fanout.rb +64 -42
- data/lib/active_support/notifications/instrumenter.rb +1 -1
- data/lib/active_support/railtie.rb +32 -15
- data/lib/active_support/structured_event_subscriber.rb +99 -0
- data/lib/active_support/subscriber.rb +0 -5
- data/lib/active_support/syntax_error_proxy.rb +3 -0
- data/lib/active_support/test_case.rb +61 -6
- data/lib/active_support/testing/assertions.rb +34 -6
- data/lib/active_support/testing/error_reporter_assertions.rb +18 -1
- data/lib/active_support/testing/event_reporter_assertions.rb +227 -0
- data/lib/active_support/testing/notification_assertions.rb +92 -0
- data/lib/active_support/testing/parallelization/server.rb +15 -2
- data/lib/active_support/testing/parallelization/worker.rb +4 -2
- data/lib/active_support/testing/parallelization.rb +25 -1
- data/lib/active_support/testing/tests_without_assertions.rb +1 -1
- data/lib/active_support/testing/time_helpers.rb +7 -3
- data/lib/active_support/time_with_zone.rb +22 -22
- data/lib/active_support/values/time_zone.rb +8 -1
- data/lib/active_support/xml_mini.rb +3 -2
- data/lib/active_support.rb +20 -15
- metadata +27 -19
- data/lib/active_support/core_ext/range/each.rb +0 -24
|
@@ -11,7 +11,7 @@ module ActiveSupport
|
|
|
11
11
|
|
|
12
12
|
if assertions.zero? && !skipped? && !error?
|
|
13
13
|
file, line = method(name).source_location
|
|
14
|
-
warn "Test is missing assertions: `#{name}` #{file}:#{line}"
|
|
14
|
+
warn "Test is missing assertions: `#{name}` #{File.expand_path(file)}:#{line}"
|
|
15
15
|
end
|
|
16
16
|
end
|
|
17
17
|
end
|
|
@@ -238,12 +238,16 @@ module ActiveSupport
|
|
|
238
238
|
end
|
|
239
239
|
alias_method :unfreeze_time, :travel_back
|
|
240
240
|
|
|
241
|
-
# Calls +travel_to+ with +
|
|
241
|
+
# Calls +travel_to+ with +date_or_time+, which defaults to +Time.now+.
|
|
242
|
+
# Forwards optional <tt>with_usec</tt> argument.
|
|
242
243
|
#
|
|
243
244
|
# Time.current # => Sun, 09 Jul 2017 15:34:49 EST -05:00
|
|
244
245
|
# freeze_time
|
|
245
246
|
# sleep(1)
|
|
246
247
|
# Time.current # => Sun, 09 Jul 2017 15:34:49 EST -05:00
|
|
248
|
+
# freeze_time Time.current + 1.day
|
|
249
|
+
# sleep(1)
|
|
250
|
+
# Time.current # => Mon, 10 Jul 2017 15:34:49 EST -05:00
|
|
247
251
|
#
|
|
248
252
|
# This method also accepts a block, which will return the current time back to its original
|
|
249
253
|
# state at the end of the block:
|
|
@@ -254,8 +258,8 @@ module ActiveSupport
|
|
|
254
258
|
# User.create.created_at # => Sun, 09 Jul 2017 15:34:49 EST -05:00
|
|
255
259
|
# end
|
|
256
260
|
# Time.current # => Sun, 09 Jul 2017 15:34:50 EST -05:00
|
|
257
|
-
def freeze_time(with_usec: false, &block)
|
|
258
|
-
travel_to
|
|
261
|
+
def freeze_time(date_or_time = Time.now, with_usec: false, &block)
|
|
262
|
+
travel_to date_or_time, with_usec: with_usec, &block
|
|
259
263
|
end
|
|
260
264
|
|
|
261
265
|
private
|
|
@@ -49,9 +49,15 @@ module ActiveSupport
|
|
|
49
49
|
attr_reader :time_zone
|
|
50
50
|
|
|
51
51
|
def initialize(utc_time, time_zone, local_time = nil, period = nil)
|
|
52
|
-
@utc = utc_time ? transfer_time_values_to_utc_constructor(utc_time) : nil
|
|
53
52
|
@time_zone, @time = time_zone, local_time
|
|
54
|
-
|
|
53
|
+
if utc_time
|
|
54
|
+
@utc = transfer_time_values_to_utc_constructor(utc_time)
|
|
55
|
+
@period = period
|
|
56
|
+
else
|
|
57
|
+
@utc = nil
|
|
58
|
+
@period = get_period_and_ensure_valid_local_time(period)
|
|
59
|
+
end
|
|
60
|
+
@is_utc = zone == "UTC" || zone == "UCT"
|
|
55
61
|
end
|
|
56
62
|
|
|
57
63
|
# Returns a <tt>Time</tt> instance that represents the time in +time_zone+.
|
|
@@ -103,7 +109,7 @@ module ActiveSupport
|
|
|
103
109
|
# Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)'
|
|
104
110
|
# Time.zone.now.utc? # => false
|
|
105
111
|
def utc?
|
|
106
|
-
|
|
112
|
+
@is_utc
|
|
107
113
|
end
|
|
108
114
|
alias_method :gmt?, :utc?
|
|
109
115
|
|
|
@@ -146,7 +152,13 @@ module ActiveSupport
|
|
|
146
152
|
#
|
|
147
153
|
# Time.zone.now.xmlschema # => "2014-12-04T11:02:37-05:00"
|
|
148
154
|
def xmlschema(fraction_digits = 0)
|
|
149
|
-
|
|
155
|
+
if @is_utc
|
|
156
|
+
utc.iso8601(fraction_digits || 0)
|
|
157
|
+
else
|
|
158
|
+
str = time.iso8601(fraction_digits || 0)
|
|
159
|
+
str[-1] = formatted_offset(true, "Z")
|
|
160
|
+
str
|
|
161
|
+
end
|
|
150
162
|
end
|
|
151
163
|
alias_method :iso8601, :xmlschema
|
|
152
164
|
alias_method :rfc3339, :xmlschema
|
|
@@ -299,16 +311,8 @@ module ActiveSupport
|
|
|
299
311
|
if duration_of_variable_length?(other)
|
|
300
312
|
method_missing(:+, other)
|
|
301
313
|
else
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
rescue TypeError
|
|
305
|
-
result = utc.to_datetime.since(other)
|
|
306
|
-
ActiveSupport.deprecator.warn(
|
|
307
|
-
"Adding an instance of #{other.class} to an instance of #{self.class} is deprecated. This behavior will raise " \
|
|
308
|
-
"a `TypeError` in Rails 8.1."
|
|
309
|
-
)
|
|
310
|
-
result.in_time_zone(time_zone)
|
|
311
|
-
end
|
|
314
|
+
result = utc + other
|
|
315
|
+
|
|
312
316
|
result.in_time_zone(time_zone)
|
|
313
317
|
end
|
|
314
318
|
end
|
|
@@ -491,13 +495,7 @@ module ActiveSupport
|
|
|
491
495
|
# with the same UTC offset as +self+ or in the local system timezone
|
|
492
496
|
# depending on the setting of +ActiveSupport.to_time_preserves_timezone+.
|
|
493
497
|
def to_time
|
|
494
|
-
|
|
495
|
-
@to_time_with_timezone ||= getlocal(time_zone)
|
|
496
|
-
elsif preserve_timezone
|
|
497
|
-
@to_time_with_instance_offset ||= getlocal(utc_offset)
|
|
498
|
-
else
|
|
499
|
-
@to_time_with_system_offset ||= getlocal
|
|
500
|
-
end
|
|
498
|
+
@to_time_with_timezone ||= getlocal(time_zone)
|
|
501
499
|
end
|
|
502
500
|
|
|
503
501
|
# So that +self+ <tt>acts_like?(:time)</tt>.
|
|
@@ -560,7 +558,9 @@ module ActiveSupport
|
|
|
560
558
|
SECONDS_PER_DAY = 86400
|
|
561
559
|
|
|
562
560
|
def incorporate_utc_offset(time, offset)
|
|
563
|
-
if
|
|
561
|
+
if offset.zero?
|
|
562
|
+
time
|
|
563
|
+
elsif time.kind_of?(Date)
|
|
564
564
|
time + Rational(offset, SECONDS_PER_DAY)
|
|
565
565
|
else
|
|
566
566
|
time + offset
|
|
@@ -57,13 +57,14 @@ module ActiveSupport
|
|
|
57
57
|
"Caracas" => "America/Caracas",
|
|
58
58
|
"La Paz" => "America/La_Paz",
|
|
59
59
|
"Santiago" => "America/Santiago",
|
|
60
|
+
"Asuncion" => "America/Asuncion",
|
|
60
61
|
"Newfoundland" => "America/St_Johns",
|
|
61
62
|
"Brasilia" => "America/Sao_Paulo",
|
|
62
63
|
"Buenos Aires" => "America/Argentina/Buenos_Aires",
|
|
63
64
|
"Montevideo" => "America/Montevideo",
|
|
64
65
|
"Georgetown" => "America/Guyana",
|
|
65
66
|
"Puerto Rico" => "America/Puerto_Rico",
|
|
66
|
-
"Greenland" => "America/
|
|
67
|
+
"Greenland" => "America/Nuuk",
|
|
67
68
|
"Mid-Atlantic" => "Atlantic/South_Georgia",
|
|
68
69
|
"Azores" => "Atlantic/Azores",
|
|
69
70
|
"Cape Verde Is." => "Atlantic/Cape_Verde",
|
|
@@ -313,6 +314,12 @@ module ActiveSupport
|
|
|
313
314
|
end
|
|
314
315
|
# :startdoc:
|
|
315
316
|
|
|
317
|
+
# Returns a standard time zone name defined by IANA
|
|
318
|
+
# https://www.iana.org/time-zones
|
|
319
|
+
def standard_name
|
|
320
|
+
MAPPING[name] || name
|
|
321
|
+
end
|
|
322
|
+
|
|
316
323
|
# Returns the offset of this time zone from UTC in seconds.
|
|
317
324
|
def utc_offset
|
|
318
325
|
@utc_offset || tzinfo&.current_period&.base_utc_offset
|
|
@@ -62,11 +62,10 @@ module ActiveSupport
|
|
|
62
62
|
"yaml" => Proc.new { |yaml| yaml.to_yaml }
|
|
63
63
|
} unless defined?(FORMATTING)
|
|
64
64
|
|
|
65
|
-
# TODO use regexp instead of Date.parse
|
|
66
65
|
unless defined?(PARSING)
|
|
67
66
|
PARSING = {
|
|
68
67
|
"symbol" => Proc.new { |symbol| symbol.to_s.to_sym },
|
|
69
|
-
"date" => Proc.new { |date| ::Date.
|
|
68
|
+
"date" => Proc.new { |date| ::Date.strptime(date, "%Y-%m-%d") },
|
|
70
69
|
"datetime" => Proc.new { |time| Time.xmlschema(time).utc rescue ::DateTime.parse(time).utc },
|
|
71
70
|
"duration" => Proc.new { |duration| Duration.parse(duration) },
|
|
72
71
|
"integer" => Proc.new { |integer| integer.to_i },
|
|
@@ -74,6 +73,8 @@ module ActiveSupport
|
|
|
74
73
|
"decimal" => Proc.new do |number|
|
|
75
74
|
if String === number
|
|
76
75
|
number.to_d
|
|
76
|
+
elsif Float === number
|
|
77
|
+
BigDecimal(number, 0)
|
|
77
78
|
else
|
|
78
79
|
BigDecimal(number)
|
|
79
80
|
end
|
data/lib/active_support.rb
CHANGED
|
@@ -39,17 +39,22 @@ module ActiveSupport
|
|
|
39
39
|
autoload :Concern
|
|
40
40
|
autoload :CodeGenerator
|
|
41
41
|
autoload :ActionableError
|
|
42
|
+
autoload :Configurable
|
|
42
43
|
autoload :ConfigurationFile
|
|
44
|
+
autoload :ContinuousIntegration
|
|
43
45
|
autoload :CurrentAttributes
|
|
44
46
|
autoload :Dependencies
|
|
45
47
|
autoload :DescendantsTracker
|
|
48
|
+
autoload :Editor
|
|
46
49
|
autoload :ExecutionWrapper
|
|
47
50
|
autoload :Executor
|
|
48
51
|
autoload :ErrorReporter
|
|
52
|
+
autoload :EventReporter
|
|
49
53
|
autoload :FileUpdateChecker
|
|
50
54
|
autoload :EventedFileUpdateChecker
|
|
51
55
|
autoload :ForkTracker
|
|
52
56
|
autoload :LogSubscriber
|
|
57
|
+
autoload :StructuredEventSubscriber
|
|
53
58
|
autoload :IsolatedExecutionState
|
|
54
59
|
autoload :Notifications
|
|
55
60
|
autoload :Reloader
|
|
@@ -61,7 +66,6 @@ module ActiveSupport
|
|
|
61
66
|
autoload :Benchmarkable
|
|
62
67
|
autoload :Cache
|
|
63
68
|
autoload :Callbacks
|
|
64
|
-
autoload :Configurable
|
|
65
69
|
autoload :ClassAttribute
|
|
66
70
|
autoload :Deprecation
|
|
67
71
|
autoload :Delegation
|
|
@@ -99,10 +103,16 @@ module ActiveSupport
|
|
|
99
103
|
|
|
100
104
|
cattr_accessor :test_order # :nodoc:
|
|
101
105
|
cattr_accessor :test_parallelization_threshold, default: 50 # :nodoc:
|
|
106
|
+
cattr_accessor :parallelize_test_databases, default: true # :nodoc:
|
|
102
107
|
|
|
103
108
|
@error_reporter = ActiveSupport::ErrorReporter.new
|
|
104
109
|
singleton_class.attr_accessor :error_reporter # :nodoc:
|
|
105
110
|
|
|
111
|
+
@event_reporter = ActiveSupport::EventReporter.new
|
|
112
|
+
singleton_class.attr_accessor :event_reporter # :nodoc:
|
|
113
|
+
|
|
114
|
+
cattr_accessor :filter_parameters, default: [] # :nodoc:
|
|
115
|
+
|
|
106
116
|
def self.cache_format_version
|
|
107
117
|
Cache.format_version
|
|
108
118
|
end
|
|
@@ -112,23 +122,18 @@ module ActiveSupport
|
|
|
112
122
|
end
|
|
113
123
|
|
|
114
124
|
def self.to_time_preserves_timezone
|
|
115
|
-
|
|
125
|
+
ActiveSupport.deprecator.warn(
|
|
126
|
+
"`config.active_support.to_time_preserves_timezone` is deprecated and will be removed in Rails 8.2"
|
|
127
|
+
)
|
|
128
|
+
@to_time_preserves_timezone
|
|
116
129
|
end
|
|
117
130
|
|
|
118
131
|
def self.to_time_preserves_timezone=(value)
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
elsif value != :zone
|
|
125
|
-
ActiveSupport.deprecator.warn(
|
|
126
|
-
"`to_time` will always preserve the full timezone rather than offset of the receiver in Rails 8.1. " \
|
|
127
|
-
"To opt in to the new behavior, set `config.active_support.to_time_preserves_timezone = :zone`."
|
|
128
|
-
)
|
|
129
|
-
end
|
|
130
|
-
|
|
131
|
-
DateAndTime::Compatibility.preserve_timezone = value
|
|
132
|
+
ActiveSupport.deprecator.warn(
|
|
133
|
+
"`config.active_support.to_time_preserves_timezone` is deprecated and will be removed in Rails 8.2"
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
@to_time_preserves_timezone = value
|
|
132
137
|
end
|
|
133
138
|
|
|
134
139
|
def self.utc_to_local_returns_utc_offset_times
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: activesupport
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 8.0
|
|
4
|
+
version: 8.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Heinemeier Hansson
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: i18n
|
|
@@ -140,61 +140,61 @@ dependencies:
|
|
|
140
140
|
- !ruby/object:Gem::Version
|
|
141
141
|
version: '0'
|
|
142
142
|
- !ruby/object:Gem::Dependency
|
|
143
|
-
name:
|
|
143
|
+
name: json
|
|
144
144
|
requirement: !ruby/object:Gem::Requirement
|
|
145
145
|
requirements:
|
|
146
146
|
- - ">="
|
|
147
147
|
- !ruby/object:Gem::Version
|
|
148
|
-
version:
|
|
148
|
+
version: '0'
|
|
149
149
|
type: :runtime
|
|
150
150
|
prerelease: false
|
|
151
151
|
version_requirements: !ruby/object:Gem::Requirement
|
|
152
152
|
requirements:
|
|
153
153
|
- - ">="
|
|
154
154
|
- !ruby/object:Gem::Version
|
|
155
|
-
version:
|
|
155
|
+
version: '0'
|
|
156
156
|
- !ruby/object:Gem::Dependency
|
|
157
|
-
name:
|
|
157
|
+
name: logger
|
|
158
158
|
requirement: !ruby/object:Gem::Requirement
|
|
159
159
|
requirements:
|
|
160
160
|
- - ">="
|
|
161
161
|
- !ruby/object:Gem::Version
|
|
162
|
-
version:
|
|
162
|
+
version: 1.4.2
|
|
163
163
|
type: :runtime
|
|
164
164
|
prerelease: false
|
|
165
165
|
version_requirements: !ruby/object:Gem::Requirement
|
|
166
166
|
requirements:
|
|
167
167
|
- - ">="
|
|
168
168
|
- !ruby/object:Gem::Version
|
|
169
|
-
version:
|
|
169
|
+
version: 1.4.2
|
|
170
170
|
- !ruby/object:Gem::Dependency
|
|
171
|
-
name:
|
|
171
|
+
name: securerandom
|
|
172
172
|
requirement: !ruby/object:Gem::Requirement
|
|
173
173
|
requirements:
|
|
174
174
|
- - ">="
|
|
175
175
|
- !ruby/object:Gem::Version
|
|
176
|
-
version: 0.
|
|
176
|
+
version: '0.3'
|
|
177
177
|
type: :runtime
|
|
178
178
|
prerelease: false
|
|
179
179
|
version_requirements: !ruby/object:Gem::Requirement
|
|
180
180
|
requirements:
|
|
181
181
|
- - ">="
|
|
182
182
|
- !ruby/object:Gem::Version
|
|
183
|
-
version: 0.
|
|
183
|
+
version: '0.3'
|
|
184
184
|
- !ruby/object:Gem::Dependency
|
|
185
|
-
name:
|
|
185
|
+
name: uri
|
|
186
186
|
requirement: !ruby/object:Gem::Requirement
|
|
187
187
|
requirements:
|
|
188
188
|
- - ">="
|
|
189
189
|
- !ruby/object:Gem::Version
|
|
190
|
-
version:
|
|
190
|
+
version: 0.13.1
|
|
191
191
|
type: :runtime
|
|
192
192
|
prerelease: false
|
|
193
193
|
version_requirements: !ruby/object:Gem::Requirement
|
|
194
194
|
requirements:
|
|
195
195
|
- - ">="
|
|
196
196
|
- !ruby/object:Gem::Version
|
|
197
|
-
version:
|
|
197
|
+
version: 0.13.1
|
|
198
198
|
description: A toolkit of support libraries and Ruby core extensions extracted from
|
|
199
199
|
the Rails framework. Rich support for multibyte strings, internationalization, time
|
|
200
200
|
zones, and testing.
|
|
@@ -233,8 +233,10 @@ files:
|
|
|
233
233
|
- lib/active_support/concurrency/load_interlock_aware_monitor.rb
|
|
234
234
|
- lib/active_support/concurrency/null_lock.rb
|
|
235
235
|
- lib/active_support/concurrency/share_lock.rb
|
|
236
|
+
- lib/active_support/concurrency/thread_monitor.rb
|
|
236
237
|
- lib/active_support/configurable.rb
|
|
237
238
|
- lib/active_support/configuration_file.rb
|
|
239
|
+
- lib/active_support/continuous_integration.rb
|
|
238
240
|
- lib/active_support/core_ext.rb
|
|
239
241
|
- lib/active_support/core_ext/array.rb
|
|
240
242
|
- lib/active_support/core_ext/array/access.rb
|
|
@@ -327,8 +329,8 @@ files:
|
|
|
327
329
|
- lib/active_support/core_ext/range.rb
|
|
328
330
|
- lib/active_support/core_ext/range/compare_range.rb
|
|
329
331
|
- lib/active_support/core_ext/range/conversions.rb
|
|
330
|
-
- lib/active_support/core_ext/range/each.rb
|
|
331
332
|
- lib/active_support/core_ext/range/overlap.rb
|
|
333
|
+
- lib/active_support/core_ext/range/sole.rb
|
|
332
334
|
- lib/active_support/core_ext/regexp.rb
|
|
333
335
|
- lib/active_support/core_ext/securerandom.rb
|
|
334
336
|
- lib/active_support/core_ext/string.rb
|
|
@@ -376,11 +378,14 @@ files:
|
|
|
376
378
|
- lib/active_support/duration.rb
|
|
377
379
|
- lib/active_support/duration/iso8601_parser.rb
|
|
378
380
|
- lib/active_support/duration/iso8601_serializer.rb
|
|
381
|
+
- lib/active_support/editor.rb
|
|
379
382
|
- lib/active_support/encrypted_configuration.rb
|
|
380
383
|
- lib/active_support/encrypted_file.rb
|
|
381
384
|
- lib/active_support/environment_inquirer.rb
|
|
382
385
|
- lib/active_support/error_reporter.rb
|
|
383
386
|
- lib/active_support/error_reporter/test_helper.rb
|
|
387
|
+
- lib/active_support/event_reporter.rb
|
|
388
|
+
- lib/active_support/event_reporter/test_helper.rb
|
|
384
389
|
- lib/active_support/evented_file_update_checker.rb
|
|
385
390
|
- lib/active_support/execution_context.rb
|
|
386
391
|
- lib/active_support/execution_context/test_helper.rb
|
|
@@ -454,6 +459,7 @@ files:
|
|
|
454
459
|
- lib/active_support/secure_compare_rotator.rb
|
|
455
460
|
- lib/active_support/security_utils.rb
|
|
456
461
|
- lib/active_support/string_inquirer.rb
|
|
462
|
+
- lib/active_support/structured_event_subscriber.rb
|
|
457
463
|
- lib/active_support/subscriber.rb
|
|
458
464
|
- lib/active_support/syntax_error_proxy.rb
|
|
459
465
|
- lib/active_support/tagged_logging.rb
|
|
@@ -465,9 +471,11 @@ files:
|
|
|
465
471
|
- lib/active_support/testing/declarative.rb
|
|
466
472
|
- lib/active_support/testing/deprecation.rb
|
|
467
473
|
- lib/active_support/testing/error_reporter_assertions.rb
|
|
474
|
+
- lib/active_support/testing/event_reporter_assertions.rb
|
|
468
475
|
- lib/active_support/testing/file_fixtures.rb
|
|
469
476
|
- lib/active_support/testing/isolation.rb
|
|
470
477
|
- lib/active_support/testing/method_call_assertions.rb
|
|
478
|
+
- lib/active_support/testing/notification_assertions.rb
|
|
471
479
|
- lib/active_support/testing/parallelization.rb
|
|
472
480
|
- lib/active_support/testing/parallelization/server.rb
|
|
473
481
|
- lib/active_support/testing/parallelization/worker.rb
|
|
@@ -493,10 +501,10 @@ licenses:
|
|
|
493
501
|
- MIT
|
|
494
502
|
metadata:
|
|
495
503
|
bug_tracker_uri: https://github.com/rails/rails/issues
|
|
496
|
-
changelog_uri: https://github.com/rails/rails/blob/v8.0
|
|
497
|
-
documentation_uri: https://api.rubyonrails.org/v8.0
|
|
504
|
+
changelog_uri: https://github.com/rails/rails/blob/v8.1.0/activesupport/CHANGELOG.md
|
|
505
|
+
documentation_uri: https://api.rubyonrails.org/v8.1.0/
|
|
498
506
|
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
|
499
|
-
source_code_uri: https://github.com/rails/rails/tree/v8.0
|
|
507
|
+
source_code_uri: https://github.com/rails/rails/tree/v8.1.0/activesupport
|
|
500
508
|
rubygems_mfa_required: 'true'
|
|
501
509
|
rdoc_options:
|
|
502
510
|
- "--encoding"
|
|
@@ -514,7 +522,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
514
522
|
- !ruby/object:Gem::Version
|
|
515
523
|
version: '0'
|
|
516
524
|
requirements: []
|
|
517
|
-
rubygems_version: 3.6.
|
|
525
|
+
rubygems_version: 3.6.9
|
|
518
526
|
specification_version: 4
|
|
519
527
|
summary: A toolkit of support libraries and Ruby core extensions extracted from the
|
|
520
528
|
Rails framework.
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "active_support/time_with_zone"
|
|
4
|
-
|
|
5
|
-
module ActiveSupport
|
|
6
|
-
module EachTimeWithZone # :nodoc:
|
|
7
|
-
def each(&block)
|
|
8
|
-
ensure_iteration_allowed
|
|
9
|
-
super
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def step(n = 1, &block)
|
|
13
|
-
ensure_iteration_allowed
|
|
14
|
-
super
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
private
|
|
18
|
-
def ensure_iteration_allowed
|
|
19
|
-
raise TypeError, "can't iterate from #{first.class}" if first.is_a?(TimeWithZone)
|
|
20
|
-
end
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
Range.prepend(ActiveSupport::EachTimeWithZone)
|