smart_params 2.0.0 → 2.0.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
  SHA256:
3
- metadata.gz: 74d26599001993daf7057d745a6685663aa5c0db71f82433281f6330407a335a
4
- data.tar.gz: b4fa42b15413f3819ea57faa386b1b18e208248aaa8edfad3571ccf4fee7aa3f
3
+ metadata.gz: 1458539488f74741cfe2d72128e13d5d1d69a2319de21d78418bd93b271207f9
4
+ data.tar.gz: d19c9e978bb33e4810e29f53da29e8e191d0d0e5fd61cc5f7254b199b1091d8b
5
5
  SHA512:
6
- metadata.gz: d57ddf5cad13bf409b67e677b7170a6410311b65563f2ed36c6e0c75c59bb245ea50872351b2adbd1f1bc6b4922b20c29fec245eb4fa4ef651f6b08ab409ed88
7
- data.tar.gz: f14d97d11d7e45feba523c3804fa9a5f8754fb5de03286c6314be229de6f410cb04226fdb8c810e7313acf914d29172f8ca42818e464ef907e74cab8f7e30654
6
+ metadata.gz: d29f490037927c01a4d7b07a6897487b4db8f6899b4ede1ae51bf0616224abb846579458f8f0bba699ce5bb2615ee9e4b00b933fd861f7d04a066d212e681c88
7
+ data.tar.gz: 86f18060913fac28db9b127bbc8904eeead3170cd17551cb854148b6ca87ee49786b6a3bc14c881334764d776901791519afc27944d77e0ed89179c3a63fc3de
@@ -32,7 +32,7 @@ module SmartParams
32
32
  @value = type[raw.dig(*keychain)]
33
33
  end
34
34
  rescue Dry::Types::ConstraintError => bad_type_exception
35
- raise SmartParams::Error::InvalidPropertyType, keychain: keychain, wanted: type, raw: raw.dig(*keychain)
35
+ raise SmartParams::Error::InvalidPropertyType, keychain: keychain, wanted: type, raw: if keychain.empty? then raw else raw.dig(*keychain) end
36
36
  end
37
37
 
38
38
  def to_hash
@@ -1,3 +1,3 @@
1
1
  module SmartParams
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smart_params
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kurtis Rainbolt-Greene