chef-zero 0.9.7 → 0.9.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,13 +22,14 @@ module ChefZero
22
22
  desired_versions = {}
23
23
  run_list = JSON.parse(request.body, :create_additions => false)['run_list']
24
24
  run_list.each do |run_list_entry|
25
- if run_list_entry =~ /(.+)\@(.+)/
25
+ if run_list_entry =~ /(.+)(::.+)?\@(.+)/
26
26
  raise RestErrorResponse.new(412, "No such cookbook: #{$1}") if !cookbooks[$1]
27
27
  raise RestErrorResponse.new(412, "No such cookbook version for cookbook #{$1}: #{$2}") if !cookbooks[$1][$2]
28
- desired_versions[$1] = [ $2 ]
28
+ desired_versions[$1] = [ $3 ]
29
29
  else
30
- raise RestErrorResponse.new(412, "No such cookbook: #{run_list_entry}") if !cookbooks[run_list_entry]
31
- desired_versions[run_list_entry] = cookbooks[run_list_entry].keys
30
+ desired_cookbook = run_list_entry.split('::')[0]
31
+ raise RestErrorResponse.new(412, "No such cookbook: #{desired_cookbook}") if !cookbooks[desired_cookbook]
32
+ desired_versions[desired_cookbook] = cookbooks[desired_cookbook].keys
32
33
  end
33
34
  end
34
35
 
@@ -1,3 +1,3 @@
1
1
  module ChefZero
2
- VERSION = '0.9.7'
2
+ VERSION = '0.9.8'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-zero
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.7
4
+ version: 0.9.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-17 00:00:00.000000000 Z
12
+ date: 2013-04-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: chef