kybus-configs 0.2.1 → 0.2.2

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: bd5e2f8a7d94aa73df980540764bbc8df1c54fb0a4adc155fc3d472c273ea6ee
4
- data.tar.gz: 3c87e475a564a10695440728c847e427d529169f2aa1354a434c8e6b08ec782f
3
+ metadata.gz: 7b9b5688f4d67d48f5a0aeb1f63542cd2ef8252f45a567292fd434e9f3d9a30b
4
+ data.tar.gz: 0b8c62605481576ff8a608f70bf7230fbe579e6ca16c58d606436d79ed90cb62
5
5
  SHA512:
6
- metadata.gz: 84361cd3872c6b98fed524f37e26ecae2503c7d7b03364b38432463d0b34aba6682cd6c071a0dbfb590b8fef91ebf298dfaf7062531ed4516421d5c34ce39325
7
- data.tar.gz: 273e1ab69e585e16b0ac3e547814069ec0683f421ea031c0a5bf8a3677c36afa9331113345f3acffaa40a3d58ca429ee74f654a85a6222c6ef39409a8ecef198
6
+ metadata.gz: b6ed94fe64e7a44ca09f4a397b8c5fb68a8d35840ef17bd1606378d1e7c728b238f82cadc067b99bd25cfd72675d3ab0abf608cc7aa4ea51bce2b34c839e8d17
7
+ data.tar.gz: bccedc2e1f5e343f1dea1ca68dcdb38c6568dac9cd9841202767e503bf7b1445297f1f7b9a838609b15d16d681240255558759f53c604f6fae0c596504d04027
@@ -64,7 +64,7 @@ module Kybus
64
64
  # split_env_string('hello, world') => ['hello', 'world']
65
65
  # split_env_string('hello\, world') => 'hello, world'
66
66
  def split_env_string(string)
67
- # TODO: parse type of string
67
+ return string unless string.is_a?(String)
68
68
  strings = string.split(/(?<!\\),/)
69
69
  .map { |str| str.gsub('\,', ',') }
70
70
  .map { |str| parse_type(str) }
@@ -78,7 +78,12 @@ module Kybus
78
78
  when 'false'
79
79
  false
80
80
  else
81
- string
81
+ int = string.to_i
82
+ if int.to_s == string
83
+ int
84
+ else
85
+ string
86
+ end
82
87
  end
83
88
  end
84
89
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Kybus
4
4
  module Configuration
5
- VERSION = '0.2.1'
5
+ VERSION = '0.2.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kybus-configs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gilberto Vargas