activesupport 5.0.6 → 5.0.7
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 +19 -0
- data/lib/active_support/core_ext/date_time/compatibility.rb +1 -0
- data/lib/active_support/core_ext/hash/keys.rb +2 -2
- data/lib/active_support/core_ext/object/duplicable.rb +2 -2
- data/lib/active_support/dependencies.rb +1 -0
- data/lib/active_support/gem_version.rb +1 -1
- data/lib/active_support/values/time_zone.rb +5 -2
- metadata +11 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 555cb30548cb81a6f28294dc298d29dfeb316230
|
4
|
+
data.tar.gz: e52c8a64bf838a1ea578e5f1f3b5f5dd5447444d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2123ebddf000438a31977ee1bf1e8f6cd33011f61e5a15de3cd42ff55c427f21df28ccea18c9150b292bdd0eb53d45e1a6670abd677645a7c7c9bc9f1906e14b
|
7
|
+
data.tar.gz: c3a4345eabdb05dc35ec122a5c8dba2237931fca4a55bf15ee6b6af25d71b1206ba68084464a5a7a974c1060b6965b29e66540e4c21bb7064fae6e8e3ebef3b4
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,22 @@
|
|
1
|
+
## Rails 5.0.7 (March 29, 2018) ##
|
2
|
+
|
3
|
+
* Return all mappings for a timezone identifier in `country_zones`
|
4
|
+
|
5
|
+
Some timezones like `Europe/London` have multiple mappings in
|
6
|
+
`ActiveSupport::TimeZone::MAPPING` so return all of them instead
|
7
|
+
of the first one found by using `Hash#value`. e.g:
|
8
|
+
|
9
|
+
# Before
|
10
|
+
ActiveSupport::TimeZone.country_zones("GB") # => ["Edinburgh"]
|
11
|
+
|
12
|
+
# After
|
13
|
+
ActiveSupport::TimeZone.country_zones("GB") # => ["Edinburgh", "London"]
|
14
|
+
|
15
|
+
Fixes #31668.
|
16
|
+
|
17
|
+
*Andrew White*
|
18
|
+
|
19
|
+
|
1
20
|
## Rails 5.0.6 (September 07, 2017) ##
|
2
21
|
|
3
22
|
* No changes.
|
@@ -16,7 +16,7 @@ class Hash
|
|
16
16
|
result[yield(key)] = self[key]
|
17
17
|
end
|
18
18
|
result
|
19
|
-
end
|
19
|
+
end unless method_defined? :transform_keys
|
20
20
|
|
21
21
|
# Destructively converts all keys using the +block+ operations.
|
22
22
|
# Same as +transform_keys+ but modifies +self+.
|
@@ -26,7 +26,7 @@ class Hash
|
|
26
26
|
self[yield(key)] = delete(key)
|
27
27
|
end
|
28
28
|
self
|
29
|
-
end
|
29
|
+
end unless method_defined? :transform_keys!
|
30
30
|
|
31
31
|
# Returns a new hash with all keys converted to strings.
|
32
32
|
#
|
@@ -106,8 +106,8 @@ require 'bigdecimal'
|
|
106
106
|
class BigDecimal
|
107
107
|
# BigDecimals are duplicable:
|
108
108
|
#
|
109
|
-
#
|
110
|
-
#
|
109
|
+
# BigDecimal("1.2").duplicable? # => true
|
110
|
+
# BigDecimal("1.2").dup # => #<BigDecimal:...,'0.12E1',18(18)>
|
111
111
|
def duplicable?
|
112
112
|
true
|
113
113
|
end
|
@@ -258,11 +258,14 @@ module ActiveSupport
|
|
258
258
|
country = TZInfo::Country.get(code)
|
259
259
|
country.zone_identifiers.map do |tz_id|
|
260
260
|
if MAPPING.value?(tz_id)
|
261
|
-
|
261
|
+
MAPPING.inject([]) do |memo, (key, value)|
|
262
|
+
memo << self[key] if value == tz_id
|
263
|
+
memo
|
264
|
+
end
|
262
265
|
else
|
263
266
|
create(tz_id, nil, TZInfo::Timezone.new(tz_id))
|
264
267
|
end
|
265
|
-
end.sort!
|
268
|
+
end.flatten(1).sort!
|
266
269
|
end
|
267
270
|
|
268
271
|
def zones_map
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activesupport
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.7
|
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: 2018-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0.7'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '2'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '0.7'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '2'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: tzinfo
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -336,7 +342,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
336
342
|
version: '0'
|
337
343
|
requirements: []
|
338
344
|
rubyforge_project:
|
339
|
-
rubygems_version: 2.6.
|
345
|
+
rubygems_version: 2.6.14
|
340
346
|
signing_key:
|
341
347
|
specification_version: 4
|
342
348
|
summary: A toolkit of support libraries and Ruby core extensions extracted from the
|