knife-pinnings 1.4.7 → 1.4.8

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
  SHA256:
3
- metadata.gz: 3ad64b484bbe7620e835a84ffc03af5f7104ba60fd622245e8498752221ba758
4
- data.tar.gz: 2d274e292d546a38376619d8990e79b6007d9f54f647f64668bba2a6bee7bf03
3
+ metadata.gz: 1a55a70ff01995fddd5aa797bbfad84595d4a873bdf4c729c786b84a8c420b60
4
+ data.tar.gz: 26847f094f983deff538eaa156462ed306fea86ef473d221ca380136397547e9
5
5
  SHA512:
6
- metadata.gz: d45c0c78051022234f8319813fa9fb703f2b074fc57a92e46e5bb4bb21a0999d80501160adc65072b8d56eca7bd1a0d3cebc17ea8b5317ac47c03475facf0816
7
- data.tar.gz: 2e45dab67c3eaa3572da34f9ac9e6ec6bda84b1ef8068781002999d4fb14167fb4aee26208cf24f05a4bec9786f1f9276ff225fbed38452ddcc03dd905b35624
6
+ metadata.gz: 74982f797d704af8ce30cb8116d0b63deb300af00f994187c0be41c83c7c198e2b7976cb93095e0419f34def7d60769ec65f658d055ff2038b81e63aebe39cf9
7
+ data.tar.gz: 8144cd876ea2de490d68a70295f0f8741d65043f52cc785dea77b6c7486025807efe528983940c48b93f75e223b547519fab58ce9b640e937d01e200b66a8b75
@@ -175,7 +175,18 @@ end
175
175
  def solve_recipes(rest, environment, cookbooks_with_contraints)
176
176
  run_list = Hash.new
177
177
  run_list["run_list"] = cookbooks_with_contraints
178
- response = rest.post_rest("/environments/#{environment}/cookbook_versions",{:run_list => cookbooks_with_contraints})
178
+ begin
179
+ response = rest.post_rest("/environments/#{environment}/cookbook_versions",{:run_list => cookbooks_with_contraints})
180
+ rescue Net::HTTPClientException => e
181
+ puts "REST API Error #{e.response.code}"
182
+ case e.response.code
183
+ when "412"
184
+ puts "A set of cookbooks and/or cookbook versions could not be found that met all of the requirements of the list. A cookbook in the list may not exist. A dependency may be present for a cookbook that does not exist. A constraint on a cookbook made by a run-list, environment, or cookbook version, may not match an available cookbook version."
185
+ else
186
+ raise
187
+ end
188
+ exit 255
189
+ end
179
190
  solution = Hash.new
180
191
  response.sort.each do |name, cb|
181
192
  solution[name]=cb['version']
@@ -15,7 +15,7 @@
15
15
  # rubocop:disable Style/Documentation
16
16
  module Knife
17
17
  module Pinnings
18
- VERSION = '1.4.7'
18
+ VERSION = '1.4.8'
19
19
  MAJOR, MINOR, TINY = VERSION.split('.')
20
20
  end
21
21
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-pinnings
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.7
4
+ version: 1.4.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Nixon