Skip to content
This repository has been archived by the owner on Apr 4, 2018. It is now read-only.

Commit

Permalink
Merge pull request #14 from nosborn/multi_json
Browse files Browse the repository at this point in the history
Use mutli_json gem instead of json.

Merged after discussion with @danielabel
  • Loading branch information
philandstuff committed Sep 12, 2013
2 parents 90cf13a + 85e5c39 commit 692b208
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/provisioner/cli.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'json'
require 'multi_json'
require 'optparse'
require 'provisioner/errors'
require 'highline/import'
Expand Down Expand Up @@ -91,14 +91,14 @@ def execute

options[:org_config] = {}
o.on("-o", "--org-config", "=ORG-CONFIG-JSON",
"The organisation configuration json file path") do |v|
options[:org_config] = JSON.parse(File.read(v), :symbolize_names => true)
"The organisation configuration JSON file path") do |v|
options[:org_config] = MultiJson.load(File.read(v), :symbolize_names => true)
end

options[:machine_metadata] = {}
o.on("-m", "--machine-config", "=METADATA",
"The machine configuration json file path") do |v|
options[:machine_metadata] = JSON.parse(File.read(v), :symbolize_names => true)
"The machine configuration JSON file path") do |v|
options[:machine_metadata] = MultiJson.load(File.read(v), :symbolize_names => true)
end

o.on('-s', '--setup-script', "=SETUP-SCRIPT", "path to setup script that should run after machine is brought up") do |v|
Expand Down
1 change: 1 addition & 0 deletions vcloud-box-spinner.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ which enables you to be able to configure VMs with static IPs}
s.add_runtime_dependency "parallel"
s.add_runtime_dependency "highline"
s.add_runtime_dependency "nokogiri", "~> 1.5.0"
s.add_runtime_dependency "multi_json"
end

0 comments on commit 692b208

Please sign in to comment.