activesupport 5.1.5 → 5.1.6

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
- SHA256:
3
- metadata.gz: 507002331a3084bcfbe6c2fd556c759f14775f1637717ba3656d0384634dc3bf
4
- data.tar.gz: bb5fbb66f97a18997af88324bb0be03bf0c650945a1a22a8f62bb24a52b531c3
2
+ SHA1:
3
+ metadata.gz: a039a23c348eb28506bad4f20177e6b1123b89bc
4
+ data.tar.gz: 0dd0ac6055e00c242c21c9c610753f5e956abaf1
5
5
  SHA512:
6
- metadata.gz: 9a1cab2149db5503b266cedbe55649dcef2fc3726f13c8c9ae041ec118af32fcf8c7138bce56b87ac7b1231d203bba6d102c0d582e7a64ad85e835f04aea0049
7
- data.tar.gz: bb88e332a4b75841c1c219dc9eccbe4bc8d6f1774fbf85bd18923be22f37def79442dc9bb93055722c76dc30922d58a4aedee06129b3086cbbb1afdcedd659d9
6
+ metadata.gz: 63966509684724d2e46c715c4f0f355fcc0ae76b9bf11830264c7efad9879d7ec9ecf9561deb322c6d7debedc2951261d06f2e8b0b7ca3d8fdb71bf3304af2ff
7
+ data.tar.gz: 1111ad678df46ddecbf78d44364b729754d935666da134b69392efd679c3e0a3700c5a3ab2e0bb4874787fb57c39dae3fd284e043d5837e9ccba15b93848b901
@@ -1,3 +1,22 @@
1
+ ## Rails 5.1.6 (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.1.5 (February 14, 2018) ##
2
21
 
3
22
  * No changes.
@@ -383,6 +383,14 @@ module ActiveSupport
383
383
  @value.respond_to?(method, include_private)
384
384
  end
385
385
 
386
+ def init_with(coder) #:nodoc:
387
+ initialize(coder["value"], coder["parts"])
388
+ end
389
+
390
+ def encode_with(coder) #:nodoc:
391
+ coder.map = { "value" => @value, "parts" => @parts }
392
+ end
393
+
386
394
  # Build ISO 8601 Duration string for this duration.
387
395
  # The +precision+ parameter can be used to limit seconds' precision of duration.
388
396
  def iso8601(precision: nil)
@@ -7,7 +7,7 @@ module ActiveSupport
7
7
  module VERSION
8
8
  MAJOR = 5
9
9
  MINOR = 1
10
- TINY = 5
10
+ TINY = 6
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.1.5
4
+ version: 5.1.6
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: 2018-02-14 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
@@ -315,8 +321,8 @@ homepage: http://rubyonrails.org
315
321
  licenses:
316
322
  - MIT
317
323
  metadata:
318
- source_code_uri: https://github.com/rails/rails/tree/v5.1.5/activesupport
319
- changelog_uri: https://github.com/rails/rails/blob/v5.1.5/activesupport/CHANGELOG.md
324
+ source_code_uri: https://github.com/rails/rails/tree/v5.1.6/activesupport
325
+ changelog_uri: https://github.com/rails/rails/blob/v5.1.6/activesupport/CHANGELOG.md
320
326
  post_install_message:
321
327
  rdoc_options:
322
328
  - "--encoding"
@@ -335,7 +341,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
335
341
  version: '0'
336
342
  requirements: []
337
343
  rubyforge_project:
338
- rubygems_version: 2.7.3
344
+ rubygems_version: 2.6.14
339
345
  signing_key:
340
346
  specification_version: 4
341
347
  summary: A toolkit of support libraries and Ruby core extensions extracted from the