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 +4 -4
- data/lib/kybus/configs/utils.rb +7 -2
- data/lib/kybus/configs/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7b9b5688f4d67d48f5a0aeb1f63542cd2ef8252f45a567292fd434e9f3d9a30b
|
4
|
+
data.tar.gz: 0b8c62605481576ff8a608f70bf7230fbe579e6ca16c58d606436d79ed90cb62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6ed94fe64e7a44ca09f4a397b8c5fb68a8d35840ef17bd1606378d1e7c728b238f82cadc067b99bd25cfd72675d3ab0abf608cc7aa4ea51bce2b34c839e8d17
|
7
|
+
data.tar.gz: bccedc2e1f5e343f1dea1ca68dcdb38c6568dac9cd9841202767e503bf7b1445297f1f7b9a838609b15d16d681240255558759f53c604f6fae0c596504d04027
|
data/lib/kybus/configs/utils.rb
CHANGED
@@ -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
|
-
|
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
|
|