activesupport 5.2.4.6 → 5.2.6.2
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 +25 -0
- data/lib/active_support/cache/mem_cache_store.rb +1 -0
- data/lib/active_support/cache/redis_cache_store.rb +2 -2
- data/lib/active_support/duration.rb +12 -8
- data/lib/active_support/execution_wrapper.rb +16 -13
- data/lib/active_support/gem_version.rb +2 -2
- data/lib/active_support/reloader.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7064b7c29850882af63657ca21981ff9b328f05205035d5708003f7afe68d3cc
|
4
|
+
data.tar.gz: cd0c59a687910eb495507cdad5b6ee9b6a3742b75567bc07c44586ce523dfad0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad8749d13d3707110dff8cd9efed02b92199deb890f28c8c085b29dcb6e44b594096c2a48f60eb3496f9e8a1ceda24b5eb539f2d3c649d6871f5b1111cdc02ee
|
7
|
+
data.tar.gz: b1a7cc698f146647647e0c936eb523bff63c0c8283efbde4926e2aaceb811cb98d83d83fddb30727714956f5a4a2fcca4b6c0ce033485eaf6d17301c0f26c614
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,23 @@
|
|
1
|
+
## Rails 5.2.6.2 (February 11, 2022) ##
|
2
|
+
|
3
|
+
* Fix Reloader method signature to work with the new Executor signature
|
4
|
+
|
5
|
+
|
6
|
+
## Rails 5.2.6.1 (February 11, 2022) ##
|
7
|
+
|
8
|
+
* No changes.
|
9
|
+
|
10
|
+
|
11
|
+
## Rails 5.2.6 (May 05, 2021) ##
|
12
|
+
|
13
|
+
* No changes.
|
14
|
+
|
15
|
+
|
16
|
+
## Rails 5.2.5 (March 26, 2021) ##
|
17
|
+
|
18
|
+
* No changes.
|
19
|
+
|
20
|
+
|
1
21
|
## Rails 5.2.4.6 (May 05, 2021) ##
|
2
22
|
|
3
23
|
* No changes.
|
@@ -19,6 +39,11 @@
|
|
19
39
|
|
20
40
|
* [CVE-2020-8165] Avoid Marshal.load on raw cache value in MemCacheStore
|
21
41
|
|
42
|
+
## Rails 5.2.4.2 (March 19, 2020) ##
|
43
|
+
|
44
|
+
* No changes.
|
45
|
+
|
46
|
+
|
22
47
|
## Rails 5.2.4.1 (December 18, 2019) ##
|
23
48
|
|
24
49
|
* No changes.
|
@@ -320,7 +320,7 @@ module ActiveSupport
|
|
320
320
|
# Read an entry from the cache.
|
321
321
|
def read_entry(key, options = nil)
|
322
322
|
failsafe :read_entry do
|
323
|
-
raw = options
|
323
|
+
raw = options && options.fetch(:raw, false)
|
324
324
|
deserialize_entry(redis.with { |c| c.get(key) }, raw: raw)
|
325
325
|
end
|
326
326
|
end
|
@@ -336,7 +336,7 @@ module ActiveSupport
|
|
336
336
|
def read_multi_mget(*names)
|
337
337
|
options = names.extract_options!
|
338
338
|
options = merged_options(options)
|
339
|
-
raw = options
|
339
|
+
raw = options && options.fetch(:raw, false)
|
340
340
|
|
341
341
|
keys = names.map { |name| normalize_key(name, options) }
|
342
342
|
|
@@ -183,15 +183,15 @@ module ActiveSupport
|
|
183
183
|
#
|
184
184
|
def build(value)
|
185
185
|
parts = {}
|
186
|
-
remainder = value.
|
186
|
+
remainder = value.round(9)
|
187
187
|
|
188
188
|
PARTS.each do |part|
|
189
189
|
unless part == :seconds
|
190
190
|
part_in_seconds = PARTS_IN_SECONDS[part]
|
191
191
|
parts[part] = remainder.div(part_in_seconds)
|
192
|
-
remainder
|
192
|
+
remainder %= part_in_seconds
|
193
193
|
end
|
194
|
-
end
|
194
|
+
end unless value == 0
|
195
195
|
|
196
196
|
parts[:seconds] = remainder
|
197
197
|
|
@@ -210,7 +210,7 @@ module ActiveSupport
|
|
210
210
|
def initialize(value, parts) #:nodoc:
|
211
211
|
@value, @parts = value, parts.to_h
|
212
212
|
@parts.default = 0
|
213
|
-
@parts.reject! { |k, v| v.zero? }
|
213
|
+
@parts.reject! { |k, v| v.zero? } unless value == 0
|
214
214
|
end
|
215
215
|
|
216
216
|
def coerce(other) #:nodoc:
|
@@ -400,8 +400,14 @@ module ActiveSupport
|
|
400
400
|
private
|
401
401
|
|
402
402
|
def sum(sign, time = ::Time.current)
|
403
|
-
|
404
|
-
|
403
|
+
unless time.acts_like?(:time) || time.acts_like?(:date)
|
404
|
+
raise ::ArgumentError, "expected a time or date, got #{time.inspect}"
|
405
|
+
end
|
406
|
+
|
407
|
+
if parts.empty?
|
408
|
+
time.since(sign * value)
|
409
|
+
else
|
410
|
+
parts.inject(time) do |t, (type, number)|
|
405
411
|
if type == :seconds
|
406
412
|
t.since(sign * number)
|
407
413
|
elsif type == :minutes
|
@@ -411,8 +417,6 @@ module ActiveSupport
|
|
411
417
|
else
|
412
418
|
t.advance(type => sign * number)
|
413
419
|
end
|
414
|
-
else
|
415
|
-
raise ::ArgumentError, "expected a time or date, got #{time.inspect}"
|
416
420
|
end
|
417
421
|
end
|
418
422
|
end
|
@@ -62,18 +62,21 @@ module ActiveSupport
|
|
62
62
|
# after the work has been performed.
|
63
63
|
#
|
64
64
|
# Where possible, prefer +wrap+.
|
65
|
-
def self.run!
|
66
|
-
if
|
67
|
-
|
65
|
+
def self.run!(reset: false)
|
66
|
+
if reset
|
67
|
+
lost_instance = active.delete(Thread.current)
|
68
|
+
lost_instance&.complete!
|
68
69
|
else
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
70
|
+
return Null if active?
|
71
|
+
end
|
72
|
+
|
73
|
+
new.tap do |instance|
|
74
|
+
success = nil
|
75
|
+
begin
|
76
|
+
instance.run!
|
77
|
+
success = true
|
78
|
+
ensure
|
79
|
+
instance.complete! unless success
|
77
80
|
end
|
78
81
|
end
|
79
82
|
end
|
@@ -102,11 +105,11 @@ module ActiveSupport
|
|
102
105
|
self.active = Concurrent::Hash.new
|
103
106
|
|
104
107
|
def self.active? # :nodoc:
|
105
|
-
@active
|
108
|
+
@active.key?(Thread.current)
|
106
109
|
end
|
107
110
|
|
108
111
|
def run! # :nodoc:
|
109
|
-
self.class.active[Thread.current] =
|
112
|
+
self.class.active[Thread.current] = self
|
110
113
|
run_callbacks(:run)
|
111
114
|
end
|
112
115
|
|
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: 5.2.
|
4
|
+
version: 5.2.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|
@@ -333,8 +333,8 @@ homepage: http://rubyonrails.org
|
|
333
333
|
licenses:
|
334
334
|
- MIT
|
335
335
|
metadata:
|
336
|
-
source_code_uri: https://github.com/rails/rails/tree/v5.2.
|
337
|
-
changelog_uri: https://github.com/rails/rails/blob/v5.2.
|
336
|
+
source_code_uri: https://github.com/rails/rails/tree/v5.2.6.2/activesupport
|
337
|
+
changelog_uri: https://github.com/rails/rails/blob/v5.2.6.2/activesupport/CHANGELOG.md
|
338
338
|
post_install_message:
|
339
339
|
rdoc_options:
|
340
340
|
- "--encoding"
|
@@ -352,7 +352,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
352
352
|
- !ruby/object:Gem::Version
|
353
353
|
version: '0'
|
354
354
|
requirements: []
|
355
|
-
rubygems_version: 3.1.
|
355
|
+
rubygems_version: 3.1.6
|
356
356
|
signing_key:
|
357
357
|
specification_version: 4
|
358
358
|
summary: A toolkit of support libraries and Ruby core extensions extracted from the
|