virtus-multiparams 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 59ccd7bef3cc6d7f9dc7e3c57d7af3af395362d6
4
- data.tar.gz: 1f21e2590fb2aba9695218a8055bdb2c1268222f
3
+ metadata.gz: 00551b5359c3d4a0ffd285d50758da58476c4527
4
+ data.tar.gz: c146761e18ecfb670297dae3763f3458fce14c1d
5
5
  SHA512:
6
- metadata.gz: 434abaab14dd3315fc7c43ecb9fa0286b3f1eb7f0b01a4537ab3df5a2e59b8edf0c6d1675f27c0b9ac583f817d8f7530e31cf9b484e9ff354486a80bfa74bbdd
7
- data.tar.gz: a25e99d943f32830656eaff3ff084344f23aadb39094abfad703ac7992342c08988f785130f9f8560fb946233e0bfc3cef8ab76e18db791fae5c4fdf92dca6ec
6
+ metadata.gz: fa099f0c28b7a2e8d91e22917c624f7d0e792bc3a7a16f17f8aa78744a4b09412d3ed9c9cd036515916bd7128dd868ce47de876c40de566e8ea05781aa86dde5
7
+ data.tar.gz: b4de790ca5437672edd03b9ffcf36aa7a4f41d9c883adc2667a90d90a7ca94b14ca79053c2f26bb806b6a387d2ae77cf863f94e523b13e15fa9346f05adbe9ed
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -38,7 +38,9 @@ module Virtus
38
38
  if attribute.primitive <= Date || attribute.primitive <= Time
39
39
  # Basic convesion is enough, Virtus invokes `to_date[time]`
40
40
  # Also, lololol timezones
41
- Time.new(*array[0...6]) unless array[0...3].any? { |param| param.nil? || param == 0 }
41
+ if array.length >= 3 && array[0...3].none?(&:nil?) && array[0...3].none?(&:zero?)
42
+ Time.new(*array[0...6])
43
+ end
42
44
  else
43
45
  array
44
46
  end
@@ -1,5 +1,5 @@
1
1
  module Virtus
2
2
  module Multiparams
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: virtus-multiparams
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Cochran
metadata.gz.sig CHANGED
Binary file