knife-spork 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/knife-spork.gemspec +1 -1
- data/lib/chef/knife/spork-promote.rb +9 -2
- data/lib/knife-spork.rb +1 -1
- metadata +2 -2
data/knife-spork.gemspec
CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
|
|
13
13
|
## If your rubyforge_project name is different, then edit it and comment out
|
14
14
|
## the sub! line in the Rakefile
|
15
15
|
s.name = 'knife-spork'
|
16
|
-
s.version = '0.1.
|
16
|
+
s.version = '0.1.7'
|
17
17
|
s.date = '2012-02-21'
|
18
18
|
s.rubyforge_project = 'knife-spork'
|
19
19
|
|
@@ -146,7 +146,7 @@ module KnifeSpork
|
|
146
146
|
|
147
147
|
if config[:remote]
|
148
148
|
ui.msg "Uploading #{e} to server"
|
149
|
-
save_environment_changes_remote("#{e}
|
149
|
+
save_environment_changes_remote("#{e}")
|
150
150
|
ui.info "\nPromotion complete, and environment uploaded."
|
151
151
|
else
|
152
152
|
ui.info "\nPromotion complete! Please remember to upload your changed #{e}.json to the Chef Server."
|
@@ -198,7 +198,14 @@ module KnifeSpork
|
|
198
198
|
|
199
199
|
def save_environment_changes_remote(environment)
|
200
200
|
@loader ||= Knife::Core::ObjectLoader.new(Chef::Environment, ui)
|
201
|
-
|
201
|
+
|
202
|
+
cookbook_path = config[:cookbook_path]
|
203
|
+
if cookbook_path.size > 1
|
204
|
+
updated = loader.load_from("environments", "#{environment}.json")
|
205
|
+
else
|
206
|
+
path = cookbook_path[0].gsub("cookbooks","environments") + "/#{environment}.json"
|
207
|
+
updated = loader.object_from_file("#{path}")
|
208
|
+
end
|
202
209
|
|
203
210
|
env_server = Chef::Environment.load(environment.gsub(".json","")).to_hash["cookbook_versions"]
|
204
211
|
env_local = updated.to_hash["cookbook_versions"]
|
data/lib/knife-spork.rb
CHANGED