king_konf 0.3.5 → 0.3.6

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: b3d936f5ed4d7ea538a1b3096c1c40d276d6492df3e210dcbaa4604d3ea16faf
4
- data.tar.gz: ad5c395f1de89c1370aeddfa9e0b8c45e79495ced6a2fd1eee9867cf4866adc1
3
+ metadata.gz: 6321bc1dbb64b0256b68251f524a71bc93b3837e15950c51f8d1820b52ccd7b4
4
+ data.tar.gz: 426d17dc7be5cc6b68376fe572e0c34b95074c3c303bbd463a42b7ac13201402
5
5
  SHA512:
6
- metadata.gz: f54a5f8c8e7e859c04f2207e8e4a392e24664bcf6f6e666c7984c9321affb157d5cd4780c72880dbea2ac5125a2861145919e84f554f69611bfe8e702bf701f9
7
- data.tar.gz: 48aa61e977bfbb4bfeed008542cb2f27ef217c5dfba2d5b52218acb0fbc1762f8c186bed089a2aeaa65f1bab531e5328036f1e6c3ec2c00b7e6ac8c25ca5eec1
6
+ metadata.gz: 5ee51b8c5fc4eefc2c33b6ced5a3a00ae627cbf206d1631c28188f0fc4032cd70a6d7475729ef0d2f6446c1fbf00e6b7875e652654086f2b37d8b7c08bebbb58
7
+ data.tar.gz: 4c3f255add7dd11e2ab00c8705bfa4d4271ba9ba4f2d1758cb34dc532b9a7f66ea2a11f1cc00737b7a722b08491d170a78d39bb07914374024ca38e1fb76b498
@@ -15,7 +15,7 @@ module KingKonf
15
15
 
16
16
  def cast(value)
17
17
  case @type
18
- when :float then value.to_f
18
+ when :float then value.is_a?(String) || value.is_a?(Integer) ? value.to_f : value
19
19
  when :duration then value.is_a?(String) ? Decoder.duration(value) : value
20
20
  when :symbol then value.is_a?(String) ? value.to_sym : value
21
21
  else value
@@ -1,3 +1,3 @@
1
1
  module KingKonf
2
- VERSION = "0.3.5"
2
+ VERSION = "0.3.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: king_konf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Schierbeck
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-25 00:00:00.000000000 Z
11
+ date: 2018-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler