cog-rb 0.1.12 → 0.1.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/cog/request.rb +12 -1
- data/lib/cog/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca8b0c6b200dcc1d7b66fc6c2875aa1b0fe03607
|
4
|
+
data.tar.gz: 517c213a36ce698ca96a8774900829e5583ea191
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ae3e232b57055dbb78ef51527ec6b791d448cc0be77e77ef32c138e8dfdd57c78e81aa05edabc40e0fb1664f0825db95dfac993e683175b03906e004bf0e6ae
|
7
|
+
data.tar.gz: 4c79b451f4090c9c44279178c1c5192e06469e56a7ef51ec071e484c50d5f09169270d47c121d84cd3bf5fb2b1769593772974784285ba912b92a4a0f16fc5a2
|
data/CHANGELOG.md
CHANGED
data/lib/cog/request.rb
CHANGED
@@ -21,7 +21,18 @@ class Cog
|
|
21
21
|
return {} if ENV['COG_OPTS'].nil?
|
22
22
|
|
23
23
|
options = ENV["COG_OPTS"].split(",")
|
24
|
-
Hash[options.map { |opt| [ opt,
|
24
|
+
Hash[options.map { |opt| [ opt, opt_val(opt) ] }]
|
25
|
+
end
|
26
|
+
|
27
|
+
# Returns the value of option env var specified by 'opt'. If option is
|
28
|
+
# a list it will include a count. In that case we return an array of values.
|
29
|
+
def opt_val(opt)
|
30
|
+
count = ENV["COG_OPT_#{opt.upcase}_COUNT"]
|
31
|
+
if count
|
32
|
+
count.to_i.times.map { |i| ENV["COG_OPT_#{opt.upcase}_#{i}"] }
|
33
|
+
else
|
34
|
+
ENV["COG_OPT_#{opt.upcase}"]
|
35
|
+
end
|
25
36
|
end
|
26
37
|
end
|
27
38
|
end
|
data/lib/cog/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cog-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Imbriaco
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -92,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
92
92
|
version: '0'
|
93
93
|
requirements: []
|
94
94
|
rubyforge_project:
|
95
|
-
rubygems_version: 2.4.5
|
95
|
+
rubygems_version: 2.4.5
|
96
96
|
signing_key:
|
97
97
|
specification_version: 4
|
98
98
|
summary: Cog command helper library
|