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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3751bc63b15af75e17648d9ed4443be2d6545cad6beb0da3e58d8513d5e4e6d1
4
- data.tar.gz: e2e94fdf9d552a555440ab484c9b7123735f4c09eb89e8902bcced7718875935
3
+ metadata.gz: 0041ebb43f92af8fdfae681608dc6e8205037da5503a4b58158ba71cdb4e4e4e
4
+ data.tar.gz: fd585cfa10228c613fa5144be97cbcba221ae32eab797098c500a341f5234adb
5
5
  SHA512:
6
- metadata.gz: 2a235e95bd96bd4c4de75a36920ed7e7d087528723935a7b9644fbe687df554443fded7db5782936e53bba87cfc811db18386e94c5060d6c852a81c7724bbf07
7
- data.tar.gz: 586fe8e2c4441b9d112830b5ea922c7c7e66c0dda5eb752b0cf1697c97279ca50c429ed9116355820aba953a00f4aa63ce71063ea9b6135e44a37dbc355d181f
6
+ metadata.gz: c4b5e828d8ef96fd358ab265a163919edc69809f5b3700cc29b67924b083f4fbda99454d1a7b09a6b6590ab36412cb15a410f15206501b64f6b059109524cb4e
7
+ data.tar.gz: 561cb869b616a399ad7d797a4cc38fe833eab96ce18eed01f561704086428fac39b230ca71a11fdc50122ce67253e6bd95ca4a02ed2fd8bdbc61bb5e3498a8c3
@@ -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(/(?<!\\),/).map { |str| str.gsub('\,', ',') }
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ant
4
4
  module Configuration
5
- VERSION = '0.1.0'
5
+ VERSION = '0.2.0'
6
6
  end
7
7
  end
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.1.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-10-07 00:00:00.000000000 Z
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.3
200
+ rubygems_version: 3.0.1
187
201
  signing_key:
188
202
  specification_version: 4
189
203
  summary: Config Manager for Ant framework