cloud-maker 0.8.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/cloud_maker/config.rb +9 -3
  2. metadata +2 -2
@@ -386,15 +386,21 @@ module CloudMaker
386
386
  # Returns a string that can be executed to globally set the environment variable.
387
387
  def set_environment_variable_cmd(key, value)
388
388
  if (value.kind_of?(Hash))
389
- value.keys.map { |hash_key|
390
- set_environment_variable_cmd("#{key}_#{hash_key}", value[hash_key])
391
- }.join(';')
389
+ strings = []
390
+ value.keys.each { |hash_key|
391
+ strings.push(set_environment_variable_cmd("#{key}_#{hash_key}", value[hash_key]))
392
+ }
393
+ strings.push(set_environment_variable_cmd("#{key}_length", value.keys.join(' ')))
394
+ strings.push(set_environment_variable_cmd("#{key}_json", value.to_json))
395
+ strings.join(';')
396
+
392
397
  elsif (value.kind_of?(Array))
393
398
  strings = []
394
399
  value.each_with_index { |arr_val, i|
395
400
  strings.push(set_environment_variable_cmd("#{key}_#{i}", arr_val))
396
401
  }
397
402
  strings.push(set_environment_variable_cmd("#{key}_length", value.length))
403
+ strings.push(set_environment_variable_cmd("#{key}_json", value.to_json))
398
404
  strings.join(';')
399
405
  else
400
406
  underscored_key = key.to_s.gsub(/[^a-zA-Z0-9_]/, '_')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloud-maker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-10-08 00:00:00.000000000 Z
13
+ date: 2012-10-09 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: colorize