activesupport 6.1.3.1 → 7.0.0.alpha1
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 +151 -485
- data/MIT-LICENSE +1 -1
- data/lib/active_support/actionable_error.rb +1 -1
- data/lib/active_support/array_inquirer.rb +0 -2
- data/lib/active_support/benchmarkable.rb +2 -2
- data/lib/active_support/cache/file_store.rb +16 -10
- data/lib/active_support/cache/mem_cache_store.rb +119 -28
- data/lib/active_support/cache/memory_store.rb +21 -13
- data/lib/active_support/cache/null_store.rb +10 -2
- data/lib/active_support/cache/redis_cache_store.rb +39 -59
- data/lib/active_support/cache/strategy/local_cache.rb +29 -49
- data/lib/active_support/cache.rb +196 -46
- data/lib/active_support/callbacks.rb +35 -31
- data/lib/active_support/concern.rb +5 -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 +6 -3
- data/lib/active_support/configuration_file.rb +7 -2
- data/lib/active_support/core_ext/array/access.rb +1 -5
- data/lib/active_support/core_ext/array/conversions.rb +6 -6
- data/lib/active_support/core_ext/array/grouping.rb +6 -6
- data/lib/active_support/core_ext/big_decimal/conversions.rb +1 -1
- data/lib/active_support/core_ext/date/blank.rb +1 -1
- data/lib/active_support/core_ext/date/calculations.rb +2 -2
- data/lib/active_support/core_ext/date_time/blank.rb +1 -1
- data/lib/active_support/core_ext/digest/uuid.rb +13 -12
- data/lib/active_support/core_ext/enumerable.rb +64 -12
- data/lib/active_support/core_ext/file/atomic.rb +1 -1
- data/lib/active_support/core_ext/hash/keys.rb +1 -1
- data/lib/active_support/core_ext/kernel/reporting.rb +4 -4
- data/lib/active_support/core_ext/module/delegation.rb +2 -8
- data/lib/active_support/core_ext/name_error.rb +2 -8
- data/lib/active_support/core_ext/numeric/conversions.rb +2 -2
- 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 +29 -24
- 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/range/compare_range.rb +0 -25
- data/lib/active_support/core_ext/range/each.rb +1 -1
- data/lib/active_support/core_ext/range/include_time_with_zone.rb +1 -1
- data/lib/active_support/core_ext/string/filters.rb +1 -1
- data/lib/active_support/core_ext/string/inflections.rb +1 -1
- data/lib/active_support/core_ext/string/output_safety.rb +60 -36
- data/lib/active_support/core_ext/symbol/starts_ends_with.rb +0 -8
- data/lib/active_support/core_ext/time/calculations.rb +5 -9
- data/lib/active_support/core_ext/time/zones.rb +2 -17
- data/lib/active_support/core_ext/uri.rb +1 -15
- data/lib/active_support/current_attributes.rb +18 -1
- 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 -788
- data/lib/active_support/deprecation/behaviors.rb +4 -1
- data/lib/active_support/deprecation/method_wrappers.rb +3 -3
- data/lib/active_support/deprecation/proxy_wrappers.rb +1 -1
- data/lib/active_support/deprecation.rb +1 -1
- data/lib/active_support/descendants_tracker.rb +12 -9
- 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 +9 -1
- data/lib/active_support/duration.rb +77 -48
- data/lib/active_support/encrypted_configuration.rb +11 -1
- data/lib/active_support/encrypted_file.rb +1 -1
- data/lib/active_support/environment_inquirer.rb +1 -1
- data/lib/active_support/evented_file_update_checker.rb +1 -1
- data/lib/active_support/fork_tracker.rb +2 -2
- data/lib/active_support/gem_version.rb +4 -4
- data/lib/active_support/hash_with_indifferent_access.rb +8 -1
- data/lib/active_support/i18n.rb +1 -0
- data/lib/active_support/inflector/inflections.rb +11 -4
- data/lib/active_support/inflector/methods.rb +23 -47
- data/lib/active_support/json/encoding.rb +3 -3
- data/lib/active_support/key_generator.rb +18 -1
- data/lib/active_support/locale/en.yml +2 -2
- data/lib/active_support/log_subscriber.rb +13 -3
- data/lib/active_support/logger_thread_safe_level.rb +5 -13
- data/lib/active_support/message_encryptor.rb +3 -3
- data/lib/active_support/message_verifier.rb +4 -4
- data/lib/active_support/messages/metadata.rb +2 -2
- data/lib/active_support/multibyte/chars.rb +10 -11
- data/lib/active_support/multibyte/unicode.rb +2 -2
- data/lib/active_support/multibyte.rb +1 -1
- data/lib/active_support/notifications/fanout.rb +31 -11
- data/lib/active_support/notifications/instrumenter.rb +17 -0
- data/lib/active_support/notifications.rb +10 -0
- data/lib/active_support/number_helper/number_converter.rb +1 -3
- 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_size_converter.rb +1 -1
- data/lib/active_support/number_helper/number_to_phone_converter.rb +1 -1
- data/lib/active_support/number_helper/number_to_rounded_converter.rb +10 -6
- data/lib/active_support/number_helper/rounding_helper.rb +2 -6
- data/lib/active_support/number_helper.rb +0 -2
- data/lib/active_support/option_merger.rb +4 -16
- data/lib/active_support/ordered_hash.rb +1 -1
- data/lib/active_support/parameter_filter.rb +5 -0
- data/lib/active_support/per_thread_registry.rb +1 -0
- data/lib/active_support/railtie.rb +34 -11
- data/lib/active_support/rescuable.rb +2 -2
- data/lib/active_support/secure_compare_rotator.rb +1 -1
- data/lib/active_support/security_utils.rb +1 -1
- data/lib/active_support/string_inquirer.rb +0 -2
- data/lib/active_support/subscriber.rb +5 -0
- data/lib/active_support/tagged_logging.rb +1 -1
- data/lib/active_support/test_case.rb +9 -21
- data/lib/active_support/testing/assertions.rb +35 -5
- data/lib/active_support/testing/deprecation.rb +1 -1
- data/lib/active_support/testing/isolation.rb +1 -1
- data/lib/active_support/testing/method_call_assertions.rb +5 -5
- data/lib/active_support/testing/parallelization/server.rb +4 -0
- data/lib/active_support/testing/parallelization/worker.rb +3 -0
- data/lib/active_support/testing/parallelization.rb +4 -0
- 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 +13 -2
- data/lib/active_support/time_with_zone.rb +19 -6
- data/lib/active_support/values/time_zone.rb +25 -9
- 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 +1 -1
- data/lib/active_support/xml_mini.rb +2 -1
- data/lib/active_support.rb +14 -1
- metadata +11 -25
- data/lib/active_support/core_ext/marshal.rb +0 -26
- data/lib/active_support/dependencies/zeitwerk_integration.rb +0 -117
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
module ActiveSupport
|
4
4
|
module Testing
|
5
|
-
module Stream
|
5
|
+
module Stream # :nodoc:
|
6
6
|
private
|
7
7
|
def silence_stream(stream)
|
8
8
|
old_stream = stream.dup
|
@@ -14,11 +14,9 @@ module ActiveSupport
|
|
14
14
|
old_stream.close
|
15
15
|
end
|
16
16
|
|
17
|
-
def quietly
|
17
|
+
def quietly(&block)
|
18
18
|
silence_stream(STDOUT) do
|
19
|
-
silence_stream(STDERR)
|
20
|
-
yield
|
21
|
-
end
|
19
|
+
silence_stream(STDERR, &block)
|
22
20
|
end
|
23
21
|
end
|
24
22
|
|
@@ -4,7 +4,7 @@ module ActiveSupport
|
|
4
4
|
module Testing
|
5
5
|
# Logs a "PostsControllerTest: test name" heading before each test to
|
6
6
|
# make test.log easier to search and follow along with.
|
7
|
-
module TaggedLogging
|
7
|
+
module TaggedLogging # :nodoc:
|
8
8
|
attr_writer :tagged_logger
|
9
9
|
|
10
10
|
def before_setup
|
@@ -126,7 +126,7 @@ module ActiveSupport
|
|
126
126
|
# end
|
127
127
|
# Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00
|
128
128
|
def travel_to(date_or_time)
|
129
|
-
if block_given? &&
|
129
|
+
if block_given? && in_block
|
130
130
|
travel_to_nested_block_call = <<~MSG
|
131
131
|
|
132
132
|
Calling `travel_to` with a block, when we have previously already made a call to `travel_to`, can lead to confusing time stubbing.
|
@@ -156,19 +156,28 @@ module ActiveSupport
|
|
156
156
|
|
157
157
|
if date_or_time.is_a?(Date) && !date_or_time.is_a?(DateTime)
|
158
158
|
now = date_or_time.midnight.to_time
|
159
|
+
elsif date_or_time.is_a?(String)
|
160
|
+
now = Time.zone.parse(date_or_time)
|
159
161
|
else
|
160
162
|
now = date_or_time.to_time.change(usec: 0)
|
161
163
|
end
|
162
164
|
|
165
|
+
stubbed_time = Time.now if simple_stubs.stubbing(Time, :now)
|
163
166
|
simple_stubs.stub_object(Time, :now) { at(now.to_i) }
|
164
167
|
simple_stubs.stub_object(Date, :today) { jd(now.to_date.jd) }
|
165
168
|
simple_stubs.stub_object(DateTime, :now) { jd(now.to_date.jd, now.hour, now.min, now.sec, Rational(now.utc_offset, 86400)) }
|
166
169
|
|
167
170
|
if block_given?
|
168
171
|
begin
|
172
|
+
self.in_block = true
|
169
173
|
yield
|
170
174
|
ensure
|
171
|
-
|
175
|
+
if stubbed_time
|
176
|
+
travel_to stubbed_time
|
177
|
+
else
|
178
|
+
travel_back
|
179
|
+
end
|
180
|
+
self.in_block = false
|
172
181
|
end
|
173
182
|
end
|
174
183
|
end
|
@@ -230,6 +239,8 @@ module ActiveSupport
|
|
230
239
|
def simple_stubs
|
231
240
|
@simple_stubs ||= SimpleStubs.new
|
232
241
|
end
|
242
|
+
|
243
|
+
attr_accessor :in_block
|
233
244
|
end
|
234
245
|
end
|
235
246
|
end
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "yaml"
|
4
|
+
|
3
5
|
require "active_support/duration"
|
4
6
|
require "active_support/values/time_zone"
|
5
7
|
require "active_support/core_ext/object/acts_like"
|
@@ -40,6 +42,13 @@ module ActiveSupport
|
|
40
42
|
class TimeWithZone
|
41
43
|
# Report class name as 'Time' to thwart type checking.
|
42
44
|
def self.name
|
45
|
+
ActiveSupport::Deprecation.warn(<<~EOM)
|
46
|
+
ActiveSupport::TimeWithZone.name has been deprecated and
|
47
|
+
from Rails 7.1 will use the default Ruby implementation.
|
48
|
+
You can set `config.active_support.remove_deprecated_time_with_zone_name = true`
|
49
|
+
to enable the new behavior now.
|
50
|
+
EOM
|
51
|
+
|
43
52
|
"Time"
|
44
53
|
end
|
45
54
|
|
@@ -172,12 +181,11 @@ module ActiveSupport
|
|
172
181
|
end
|
173
182
|
end
|
174
183
|
|
175
|
-
def init_with(coder)
|
184
|
+
def init_with(coder) # :nodoc:
|
176
185
|
initialize(coder["utc"], coder["zone"], coder["time"])
|
177
186
|
end
|
178
187
|
|
179
|
-
def encode_with(coder)
|
180
|
-
coder.tag = "!ruby/object:ActiveSupport::TimeWithZone"
|
188
|
+
def encode_with(coder) # :nodoc:
|
181
189
|
coder.map = { "utc" => utc, "zone" => time_zone, "time" => time }
|
182
190
|
end
|
183
191
|
|
@@ -440,7 +448,7 @@ module ActiveSupport
|
|
440
448
|
[time.sec, time.min, time.hour, time.day, time.mon, time.year, time.wday, time.yday, dst?, zone]
|
441
449
|
end
|
442
450
|
|
443
|
-
# Returns the object's date and time as a floating
|
451
|
+
# Returns the object's date and time as a floating-point number of seconds
|
444
452
|
# since the Epoch (January 1, 1970 00:00 UTC).
|
445
453
|
#
|
446
454
|
# Time.zone.now.to_f # => 1417709320.285418
|
@@ -534,7 +542,7 @@ module ActiveSupport
|
|
534
542
|
def method_missing(sym, *args, &block)
|
535
543
|
wrap_with_time_zone time.__send__(sym, *args, &block)
|
536
544
|
rescue NoMethodError => e
|
537
|
-
raise e, e.message.sub(time.inspect, inspect), e.backtrace
|
545
|
+
raise e, e.message.sub(time.inspect, inspect).sub("Time", "ActiveSupport::TimeWithZone"), e.backtrace
|
538
546
|
end
|
539
547
|
|
540
548
|
private
|
@@ -568,7 +576,7 @@ module ActiveSupport
|
|
568
576
|
end
|
569
577
|
|
570
578
|
def duration_of_variable_length?(obj)
|
571
|
-
ActiveSupport::Duration === obj && obj.
|
579
|
+
ActiveSupport::Duration === obj && obj.variable?
|
572
580
|
end
|
573
581
|
|
574
582
|
def wrap_with_time_zone(time)
|
@@ -583,3 +591,8 @@ module ActiveSupport
|
|
583
591
|
end
|
584
592
|
end
|
585
593
|
end
|
594
|
+
|
595
|
+
# These prevent Psych from calling `ActiveSupport::TimeWithZone.name`
|
596
|
+
# and triggering the deprecation warning about the change in Rails 7.1.
|
597
|
+
YAML.load_tags["!ruby/object:ActiveSupport::TimeWithZone"] = "ActiveSupport::TimeWithZone"
|
598
|
+
YAML.dump_tags[ActiveSupport::TimeWithZone] = "!ruby/object:ActiveSupport::TimeWithZone"
|
@@ -229,12 +229,16 @@ module ActiveSupport
|
|
229
229
|
# Returns +nil+ if no such time zone is known to the system.
|
230
230
|
def [](arg)
|
231
231
|
case arg
|
232
|
+
when self
|
233
|
+
arg
|
232
234
|
when String
|
233
235
|
begin
|
234
236
|
@lazy_zones_map[arg] ||= create(arg)
|
235
237
|
rescue TZInfo::InvalidTimezoneIdentifier
|
236
238
|
nil
|
237
239
|
end
|
240
|
+
when TZInfo::Timezone
|
241
|
+
@lazy_zones_map[arg.name] ||= create(arg.name, nil, arg)
|
238
242
|
when Numeric, ActiveSupport::Duration
|
239
243
|
arg *= 3600 if arg.abs <= 13
|
240
244
|
all.find { |z| z.utc_offset == arg.to_i }
|
@@ -256,7 +260,7 @@ module ActiveSupport
|
|
256
260
|
@country_zones[code] ||= load_country_zones(code)
|
257
261
|
end
|
258
262
|
|
259
|
-
def clear
|
263
|
+
def clear # :nodoc:
|
260
264
|
@lazy_zones_map = Concurrent::Map.new
|
261
265
|
@country_zones = Concurrent::Map.new
|
262
266
|
@zones = nil
|
@@ -383,12 +387,21 @@ module ActiveSupport
|
|
383
387
|
def iso8601(str)
|
384
388
|
parts = Date._iso8601(str)
|
385
389
|
|
386
|
-
|
390
|
+
year = parts.fetch(:year)
|
391
|
+
|
392
|
+
if parts.key?(:yday)
|
393
|
+
ordinal_date = Date.ordinal(year, parts.fetch(:yday))
|
394
|
+
month = ordinal_date.month
|
395
|
+
day = ordinal_date.day
|
396
|
+
else
|
397
|
+
month = parts.fetch(:mon)
|
398
|
+
day = parts.fetch(:mday)
|
399
|
+
end
|
387
400
|
|
388
401
|
time = Time.new(
|
389
|
-
|
390
|
-
|
391
|
-
|
402
|
+
year,
|
403
|
+
month,
|
404
|
+
day,
|
392
405
|
parts.fetch(:hour, 0),
|
393
406
|
parts.fetch(:min, 0),
|
394
407
|
parts.fetch(:sec, 0) + parts.fetch(:sec_fraction, 0),
|
@@ -400,6 +413,9 @@ module ActiveSupport
|
|
400
413
|
else
|
401
414
|
TimeWithZone.new(nil, self, time)
|
402
415
|
end
|
416
|
+
|
417
|
+
rescue Date::Error, KeyError
|
418
|
+
raise ArgumentError, "invalid date"
|
403
419
|
end
|
404
420
|
|
405
421
|
# Method for creating new ActiveSupport::TimeWithZone instance in time zone
|
@@ -512,7 +528,7 @@ module ActiveSupport
|
|
512
528
|
def utc_to_local(time)
|
513
529
|
tzinfo.utc_to_local(time).yield_self do |t|
|
514
530
|
ActiveSupport.utc_to_local_returns_utc_offset_times ?
|
515
|
-
t : Time.utc(t.year, t.month, t.day, t.hour, t.min, t.sec, t.sec_fraction)
|
531
|
+
t : Time.utc(t.year, t.month, t.day, t.hour, t.min, t.sec, t.sec_fraction * 1_000_000)
|
516
532
|
end
|
517
533
|
end
|
518
534
|
|
@@ -534,15 +550,15 @@ module ActiveSupport
|
|
534
550
|
tzinfo.period_for_local(time, dst) { |periods| periods.last }
|
535
551
|
end
|
536
552
|
|
537
|
-
def periods_for_local(time)
|
553
|
+
def periods_for_local(time) # :nodoc:
|
538
554
|
tzinfo.periods_for_local(time)
|
539
555
|
end
|
540
556
|
|
541
|
-
def init_with(coder)
|
557
|
+
def init_with(coder) # :nodoc:
|
542
558
|
initialize(coder["name"])
|
543
559
|
end
|
544
560
|
|
545
|
-
def encode_with(coder)
|
561
|
+
def encode_with(coder) # :nodoc:
|
546
562
|
coder.tag = "!ruby/object:#{self.class}"
|
547
563
|
coder.map = { "name" => tzinfo.name }
|
548
564
|
end
|
@@ -5,7 +5,7 @@ require "active_support/core_ext/object/blank"
|
|
5
5
|
require "stringio"
|
6
6
|
|
7
7
|
module ActiveSupport
|
8
|
-
module XmlMini_LibXML
|
8
|
+
module XmlMini_LibXML # :nodoc:
|
9
9
|
extend self
|
10
10
|
|
11
11
|
# Parse an XML Document string or IO into a simple hash using libxml.
|
@@ -25,15 +25,15 @@ module ActiveSupport
|
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
|
-
module LibXML
|
29
|
-
module Conversions
|
30
|
-
module Document
|
28
|
+
module LibXML # :nodoc:
|
29
|
+
module Conversions # :nodoc:
|
30
|
+
module Document # :nodoc:
|
31
31
|
def to_hash
|
32
32
|
root.to_hash
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
36
|
-
module Node
|
36
|
+
module Node # :nodoc:
|
37
37
|
CONTENT_ROOT = "__content__"
|
38
38
|
|
39
39
|
# Convert XML document to hash.
|
@@ -10,7 +10,7 @@ require "active_support/core_ext/object/blank"
|
|
10
10
|
require "stringio"
|
11
11
|
|
12
12
|
module ActiveSupport
|
13
|
-
module XmlMini_Nokogiri
|
13
|
+
module XmlMini_Nokogiri # :nodoc:
|
14
14
|
extend self
|
15
15
|
|
16
16
|
# Parse an XML Document string or IO into a simple hash using libxml / nokogiri.
|
@@ -30,14 +30,14 @@ module ActiveSupport
|
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
|
-
module Conversions
|
34
|
-
module Document
|
33
|
+
module Conversions # :nodoc:
|
34
|
+
module Document # :nodoc:
|
35
35
|
def to_hash
|
36
36
|
root.to_hash
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
|
-
module Node
|
40
|
+
module Node # :nodoc:
|
41
41
|
CONTENT_ROOT = "__content__"
|
42
42
|
|
43
43
|
# Convert XML document to 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,6 +50,7 @@ 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 },
|
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-2021 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
|
@@ -87,6 +87,15 @@ module ActiveSupport
|
|
87
87
|
end
|
88
88
|
|
89
89
|
cattr_accessor :test_order # :nodoc:
|
90
|
+
cattr_accessor :test_parallelization_threshold, default: 50 # :nodoc:
|
91
|
+
|
92
|
+
def self.cache_format_version
|
93
|
+
Cache.format_version
|
94
|
+
end
|
95
|
+
|
96
|
+
def self.cache_format_version=(value)
|
97
|
+
Cache.format_version = value
|
98
|
+
end
|
90
99
|
|
91
100
|
def self.to_time_preserves_timezone
|
92
101
|
DateAndTime::Compatibility.preserve_timezone
|
@@ -103,6 +112,10 @@ module ActiveSupport
|
|
103
112
|
def self.utc_to_local_returns_utc_offset_times=(value)
|
104
113
|
DateAndTime::Compatibility.utc_to_local_returns_utc_offset_times = value
|
105
114
|
end
|
115
|
+
|
116
|
+
def self.current_attributes_use_thread_variables=(value)
|
117
|
+
CurrentAttributes._use_thread_variables = value
|
118
|
+
end
|
106
119
|
end
|
107
120
|
|
108
121
|
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.0.alpha1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|
@@ -64,20 +64,6 @@ dependencies:
|
|
64
64
|
- - ">="
|
65
65
|
- !ruby/object:Gem::Version
|
66
66
|
version: 1.0.2
|
67
|
-
- !ruby/object:Gem::Dependency
|
68
|
-
name: zeitwerk
|
69
|
-
requirement: !ruby/object:Gem::Requirement
|
70
|
-
requirements:
|
71
|
-
- - "~>"
|
72
|
-
- !ruby/object:Gem::Version
|
73
|
-
version: '2.3'
|
74
|
-
type: :runtime
|
75
|
-
prerelease: false
|
76
|
-
version_requirements: !ruby/object:Gem::Requirement
|
77
|
-
requirements:
|
78
|
-
- - "~>"
|
79
|
-
- !ruby/object:Gem::Version
|
80
|
-
version: '2.3'
|
81
67
|
- !ruby/object:Gem::Dependency
|
82
68
|
name: minitest
|
83
69
|
requirement: !ruby/object:Gem::Requirement
|
@@ -178,7 +164,6 @@ files:
|
|
178
164
|
- lib/active_support/core_ext/kernel/reporting.rb
|
179
165
|
- lib/active_support/core_ext/kernel/singleton_class.rb
|
180
166
|
- lib/active_support/core_ext/load_error.rb
|
181
|
-
- lib/active_support/core_ext/marshal.rb
|
182
167
|
- lib/active_support/core_ext/module.rb
|
183
168
|
- lib/active_support/core_ext/module/aliasing.rb
|
184
169
|
- lib/active_support/core_ext/module/anonymous.rb
|
@@ -245,7 +230,7 @@ files:
|
|
245
230
|
- lib/active_support/dependencies.rb
|
246
231
|
- lib/active_support/dependencies/autoload.rb
|
247
232
|
- lib/active_support/dependencies/interlock.rb
|
248
|
-
- lib/active_support/dependencies/
|
233
|
+
- lib/active_support/dependencies/require_dependency.rb
|
249
234
|
- lib/active_support/deprecation.rb
|
250
235
|
- lib/active_support/deprecation/behaviors.rb
|
251
236
|
- lib/active_support/deprecation/constant_accessor.rb
|
@@ -337,6 +322,7 @@ files:
|
|
337
322
|
- lib/active_support/testing/parallelization.rb
|
338
323
|
- lib/active_support/testing/parallelization/server.rb
|
339
324
|
- lib/active_support/testing/parallelization/worker.rb
|
325
|
+
- lib/active_support/testing/parallelize_executor.rb
|
340
326
|
- lib/active_support/testing/setup_and_teardown.rb
|
341
327
|
- lib/active_support/testing/stream.rb
|
342
328
|
- lib/active_support/testing/tagged_logging.rb
|
@@ -357,10 +343,10 @@ licenses:
|
|
357
343
|
- MIT
|
358
344
|
metadata:
|
359
345
|
bug_tracker_uri: https://github.com/rails/rails/issues
|
360
|
-
changelog_uri: https://github.com/rails/rails/blob/
|
361
|
-
documentation_uri: https://api.rubyonrails.org/
|
346
|
+
changelog_uri: https://github.com/rails/rails/blob/v7.0.0.alpha1/activesupport/CHANGELOG.md
|
347
|
+
documentation_uri: https://api.rubyonrails.org/v7.0.0.alpha1/
|
362
348
|
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
363
|
-
source_code_uri: https://github.com/rails/rails/tree/
|
349
|
+
source_code_uri: https://github.com/rails/rails/tree/v7.0.0.alpha1/activesupport
|
364
350
|
post_install_message:
|
365
351
|
rdoc_options:
|
366
352
|
- "--encoding"
|
@@ -371,14 +357,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
371
357
|
requirements:
|
372
358
|
- - ">="
|
373
359
|
- !ruby/object:Gem::Version
|
374
|
-
version: 2.
|
360
|
+
version: 2.7.0
|
375
361
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
376
362
|
requirements:
|
377
|
-
- - "
|
363
|
+
- - ">"
|
378
364
|
- !ruby/object:Gem::Version
|
379
|
-
version:
|
365
|
+
version: 1.3.1
|
380
366
|
requirements: []
|
381
|
-
rubygems_version: 3.1.
|
367
|
+
rubygems_version: 3.1.6
|
382
368
|
signing_key:
|
383
369
|
specification_version: 4
|
384
370
|
summary: A toolkit of support libraries and Ruby core extensions extracted from the
|