chefspec 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -34,8 +34,12 @@ module ChefSpec
34
34
  # @option options [String] :ohai_data_path Path of a json file that will be passed to fauxhai as :path option
35
35
  # @yield [node] Configuration block for Chef::Node
36
36
  def initialize(options={})
37
+ # Because we evaluate the "caller" in this method, we need to call
38
+ # it first so that the path is correctly calculated.
39
+ @default_cookbook_path = default_cookbook_path
40
+
37
41
  defaults = {
38
- :cookbook_path => default_cookbook_path,
42
+ :cookbook_path => cookbook_paths,
39
43
  :log_level => :warn,
40
44
  :dry_run => false,
41
45
  :step_into => [],
@@ -114,7 +118,7 @@ module ChefSpec
114
118
  Chef::Config[:cache_type] = "Memory"
115
119
  Chef::Config[:cache_options] = { :path => File.join(File.expand_path('~'), '.chef', 'checksums') }
116
120
  Chef::Cookbook::FileVendor.on_create { |manifest| Chef::Cookbook::FileSystemFileVendor.new(manifest) }
117
- Chef::Config[:cookbook_path] = cookbook_paths
121
+ Chef::Config[:cookbook_path] = Array(@options[:cookbook_path])
118
122
  Chef::Config[:client_key] = nil
119
123
 
120
124
  # it should be saved to an instance variable to prevent automatic
@@ -247,7 +251,7 @@ module ChefSpec
247
251
  test_path = File.expand_path(File.join('test', 'cookbooks'))
248
252
  spec_path = File.expand_path(File.join('spec', 'cookbooks'))
249
253
 
250
- Array(@options[:cookbook_path]).
254
+ Array(@default_cookbook_path).
251
255
  push(vendor_path).
252
256
  push(test_path).
253
257
  push(spec_path).
@@ -1,4 +1,4 @@
1
1
  module ChefSpec
2
2
  # The gem version
3
- VERSION = '1.3.0'
3
+ VERSION = '1.3.1'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chefspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
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-06-06 00:00:00.000000000 Z
12
+ date: 2013-06-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: chef
@@ -201,31 +201,31 @@ extra_rdoc_files: []
201
201
  files:
202
202
  - lib/chef/formatters/chefspec.rb
203
203
  - lib/chef/knife/cookbook_create_specs.rb
204
- - lib/chefspec.rb
205
204
  - lib/chefspec/chef_runner.rb
206
205
  - lib/chefspec/helpers/describe.rb
207
- - lib/chefspec/minitest.rb
208
- - lib/chefspec/monkey_patches/lwrp_base.rb
209
- - lib/chefspec/monkey_patches/hash.rb
210
- - lib/chefspec/monkey_patches/conditional.rb
211
- - lib/chefspec/monkey_patches/provider.rb
212
- - lib/chefspec/version.rb
213
- - lib/chefspec/matchers/file_content.rb
214
- - lib/chefspec/matchers/ruby_block.rb
215
- - lib/chefspec/matchers/execute.rb
216
206
  - lib/chefspec/matchers/cron.rb
217
- - lib/chefspec/matchers/link.rb
218
- - lib/chefspec/matchers/user.rb
219
207
  - lib/chefspec/matchers/env.rb
220
- - lib/chefspec/matchers/script.rb
221
- - lib/chefspec/matchers/package.rb
208
+ - lib/chefspec/matchers/execute.rb
222
209
  - lib/chefspec/matchers/file.rb
210
+ - lib/chefspec/matchers/file_content.rb
211
+ - lib/chefspec/matchers/group.rb
223
212
  - lib/chefspec/matchers/include_recipe.rb
213
+ - lib/chefspec/matchers/link.rb
224
214
  - lib/chefspec/matchers/log.rb
215
+ - lib/chefspec/matchers/notifications.rb
216
+ - lib/chefspec/matchers/package.rb
217
+ - lib/chefspec/matchers/ruby_block.rb
218
+ - lib/chefspec/matchers/script.rb
225
219
  - lib/chefspec/matchers/service.rb
226
220
  - lib/chefspec/matchers/shared.rb
227
- - lib/chefspec/matchers/group.rb
228
- - lib/chefspec/matchers/notifications.rb
221
+ - lib/chefspec/matchers/user.rb
222
+ - lib/chefspec/minitest.rb
223
+ - lib/chefspec/monkey_patches/conditional.rb
224
+ - lib/chefspec/monkey_patches/hash.rb
225
+ - lib/chefspec/monkey_patches/lwrp_base.rb
226
+ - lib/chefspec/monkey_patches/provider.rb
227
+ - lib/chefspec/version.rb
228
+ - lib/chefspec.rb
229
229
  homepage: http://acrmp.github.com/chefspec
230
230
  licenses:
231
231
  - MIT
@@ -241,7 +241,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
241
241
  version: '0'
242
242
  segments:
243
243
  - 0
244
- hash: 768299270690559200
244
+ hash: 1265930440020953415
245
245
  required_rubygems_version: !ruby/object:Gem::Requirement
246
246
  none: false
247
247
  requirements:
@@ -250,12 +250,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
250
250
  version: '0'
251
251
  segments:
252
252
  - 0
253
- hash: 768299270690559200
253
+ hash: 1265930440020953415
254
254
  requirements: []
255
255
  rubyforge_project:
256
- rubygems_version: 1.8.25
256
+ rubygems_version: 1.8.23
257
257
  signing_key:
258
258
  specification_version: 3
259
- summary: chefspec-1.3.0
259
+ summary: chefspec-1.3.1
260
260
  test_files: []
261
261
  has_rdoc: