cog-rb 0.3.5 → 0.3.6

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
  SHA1:
3
- metadata.gz: 7ecf2692d6236c91b5f90a0e4acae34191e67959
4
- data.tar.gz: 4c36954c1a905479360952f03a8ec1490ab74b15
3
+ metadata.gz: 99eebd0a9a9389c507e570a3f8b4e0cd33a3b017
4
+ data.tar.gz: 2bfe8c5dae65be4a0d45545d14944ed6a591c4cd
5
5
  SHA512:
6
- metadata.gz: 887b6031722158ba5742b05a2b159509eaa03284f8eeaff83fc3fd167c3f161da7652fb9014b2efd357b1fc8c66ff7da3829c4a052e4d71c6f455aa8b91917af
7
- data.tar.gz: a5ddfadd53303282b851ef21dad519c7d8d57d593d3406df107a20683a92bd78029987f3d70431275f036e1a6a34dfdaef1b27cda718cdce206b9d07333b8f62
6
+ metadata.gz: 4c073f839b14cfdba265089d1d523f13c70c087c91f8f1356d8557e4ba3386e67941ce5a0cb72b07749a4d8bdd4f5513656c2b589a15c1c1be3fa1ae896a094c
7
+ data.tar.gz: 34e7aa0dca4ebb64610ecc6ae687636eb486eb22260784826e0edb49e632a403511a9bf66d96377b281f50b66b5a8d697a6b1524e58c857ecc1aa0282474dcb5
data/lib/cog/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Cog
2
- VERSION = "0.3.5"
2
+ VERSION = "0.3.6"
3
3
  end
@@ -62,7 +62,20 @@ class Cog
62
62
  # populate_options
63
63
  if !options.keys.empty?
64
64
  ENV["COG_OPTS"] = options.keys.join(",")
65
- options.each{|k,v| ENV["COG_OPT_#{k.upcase}"] = v.to_s}
65
+
66
+ options.each do |key, value|
67
+ name = key.upcase
68
+
69
+ if value.is_a?(Enumerable)
70
+ ENV["COG_OPT_#{name}_COUNT"] = value.count.to_s
71
+
72
+ value.each_with_index do |v, i|
73
+ ENV["COG_OPT_#{name}_#{i}"] = v
74
+ end
75
+ else
76
+ ENV["COG_OPT_#{name}"] = value.to_s
77
+ end
78
+ end
66
79
  end
67
80
 
68
81
  # TODO: receive a single input on request(:input) and
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.3.5
4
+ version: 0.3.6
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-03 00:00:00.000000000 Z
11
+ date: 2016-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake