ant-configs 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ant/configs/utils.rb +14 -1
- data/lib/ant/configs/version.rb +1 -1
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0041ebb43f92af8fdfae681608dc6e8205037da5503a4b58158ba71cdb4e4e4e
|
4
|
+
data.tar.gz: fd585cfa10228c613fa5144be97cbcba221ae32eab797098c500a341f5234adb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4b5e828d8ef96fd358ab265a163919edc69809f5b3700cc29b67924b083f4fbda99454d1a7b09a6b6590ab36412cb15a410f15206501b64f6b059109524cb4e
|
7
|
+
data.tar.gz: 561cb869b616a399ad7d797a4cc38fe833eab96ce18eed01f561704086428fac39b230ca71a11fdc50122ce67253e6bd95ca4a02ed2fd8bdbc61bb5e3498a8c3
|
data/lib/ant/configs/utils.rb
CHANGED
@@ -65,10 +65,23 @@ module Ant
|
|
65
65
|
# split_env_string('hello\, world') => 'hello, world'
|
66
66
|
def split_env_string(string)
|
67
67
|
# TODO: parse type of string
|
68
|
-
strings = string.split(/(?<!\\),/)
|
68
|
+
strings = string.split(/(?<!\\),/)
|
69
|
+
.map { |str| str.gsub('\,', ',') }
|
70
|
+
.map { |str| parse_type(str) }
|
69
71
|
strings.size == 1 ? strings.first : strings
|
70
72
|
end
|
71
73
|
|
74
|
+
def parse_type(string)
|
75
|
+
case string.downcase
|
76
|
+
when 'true'
|
77
|
+
true
|
78
|
+
when 'false'
|
79
|
+
false
|
80
|
+
else
|
81
|
+
string
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
72
85
|
def symbolize(hash)
|
73
86
|
hash.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
74
87
|
end
|
data/lib/ant/configs/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ant-configs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gilberto Vargas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ant-core
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0.1'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: ant-logger
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.2'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0.2'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: minitest
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -183,7 +197,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
183
197
|
- !ruby/object:Gem::Version
|
184
198
|
version: '0'
|
185
199
|
requirements: []
|
186
|
-
rubygems_version: 3.0.
|
200
|
+
rubygems_version: 3.0.1
|
187
201
|
signing_key:
|
188
202
|
specification_version: 4
|
189
203
|
summary: Config Manager for Ant framework
|