chef-zero 1.1.3 → 1.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -139,7 +139,7 @@ Usage: chef-zero [ARGS]
139
139
  -H, --host HOST Host to bind to (default: 127.0.0.1)
140
140
  -p, --port PORT Port to listen on
141
141
  --[no-]generate-keys Whether to generate actual keys or fake it (faster). Default: false.
142
- -d, --debug Show requests and debugging output
142
+ -l, --log-level LEVEL Set the output log level
143
143
  -h, --help Show this message
144
144
  --version Show version
145
145
  ```
@@ -4,6 +4,13 @@ require 'hashie/mash'
4
4
  module ChefZero
5
5
  module CookbookData
6
6
  def self.to_hash(cookbook, name, version=nil)
7
+ frozen = false
8
+ if cookbook.has_key?(:frozen)
9
+ frozen = cookbook[:frozen]
10
+ cookbook = cookbook.dup
11
+ cookbook.delete(:frozen)
12
+ end
13
+
7
14
  result = files_from(cookbook)
8
15
  recipe_names = result[:recipes].map do |recipe|
9
16
  recipe_name = recipe[:name][0..-2]
@@ -15,6 +22,7 @@ module ChefZero
15
22
  result[:cookbook_name] = name
16
23
  result[:version] = result[:metadata][:version]
17
24
  result[:chef_type] = 'cookbook_version'
25
+ result[:frozen?] = true if frozen
18
26
  result
19
27
  end
20
28
 
@@ -65,8 +65,8 @@ module ChefZero
65
65
  before(:each) { ChefZero::RSpec.server.load_data({ 'clients' => { name => client }}) }
66
66
  end
67
67
 
68
- def self.cookbook(name, version, cookbook)
69
- before(:each) { ChefZero::RSpec.server.load_data({ 'cookbooks' => { "#{name}-#{version}" => cookbook }}) }
68
+ def self.cookbook(name, version, cookbook, options = {})
69
+ before(:each) { ChefZero::RSpec.server.load_data({ 'cookbooks' => { "#{name}-#{version}" => cookbook.merge(options) }}) }
70
70
  end
71
71
 
72
72
  def self.data_bag(name, data_bag)
@@ -1,3 +1,3 @@
1
1
  module ChefZero
2
- VERSION = '1.1.3'
2
+ VERSION = '1.2'
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: 1.1.3
4
+ version: '1.2'
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-05-30 00:00:00.000000000 Z
12
+ date: 2013-06-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: puma