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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 18d857d95cea47564db5287dff6b3ff70e7925b8
4
- data.tar.gz: f7e1ac9e28e6a68743fafaa91609ee77af304198
3
+ metadata.gz: 555cb30548cb81a6f28294dc298d29dfeb316230
4
+ data.tar.gz: e52c8a64bf838a1ea578e5f1f3b5f5dd5447444d
5
5
  SHA512:
6
- metadata.gz: 8f50b39de99e5fe203beef0bf8b97496502e5c4e0b950af676d1dc54799343f5b72481fc220bc7914769caf963838d5cd74fcf523edabdcd2c985684dda18b72
7
- data.tar.gz: e6df5565bb4450633907a49d8f67b4d67928311113d98066d1d9e0142fa0c427b62fde5db228884ac0a56cac194dd28dbecb37eedeb258d6728fdfdf9312d124
6
+ metadata.gz: 2123ebddf000438a31977ee1bf1e8f6cd33011f61e5a15de3cd42ff55c427f21df28ccea18c9150b292bdd0eb53d45e1a6670abd677645a7c7c9bc9f1906e14b
7
+ data.tar.gz: c3a4345eabdb05dc35ec122a5c8dba2237931fca4a55bf15ee6b6af25d71b1206ba68084464a5a7a974c1060b6965b29e66540e4c21bb7064fae6e8e3ebef3b4
@@ -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.
@@ -1,4 +1,5 @@
1
1
  require 'active_support/core_ext/date_and_time/compatibility'
2
+ require 'active_support/core_ext/module/remove_method'
2
3
 
3
4
  class DateTime
4
5
  include DateAndTime::Compatibility
@@ -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
- # BigDecimal.new("1.2").duplicable? # => true
110
- # BigDecimal.new("1.2").dup # => #<BigDecimal:...,'0.12E1',18(18)>
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
@@ -457,6 +457,7 @@ module ActiveSupport #:nodoc:
457
457
  mod = Module.new
458
458
  into.const_set const_name, mod
459
459
  autoloaded_constants << qualified_name unless autoload_once_paths.include?(base_path)
460
+ autoloaded_constants.uniq!
460
461
  mod
461
462
  end
462
463
 
@@ -7,7 +7,7 @@ module ActiveSupport
7
7
  module VERSION
8
8
  MAJOR = 5
9
9
  MINOR = 0
10
- TINY = 6
10
+ TINY = 7
11
11
  PRE = nil
12
12
 
13
13
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
@@ -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
- self[MAPPING.key(tz_id)]
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.6
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: 2017-09-08 00:00:00.000000000 Z
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.13
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