chefspec 3.0.0 → 3.0.1

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
  SHA1:
3
- metadata.gz: 5868a82ecd4f7dd2ae15c73f08bdd3f407873b33
4
- data.tar.gz: 442370c544b95393e0e615a991417a4e1ecc253d
3
+ metadata.gz: 654732428da134b8c055847663deb22bad8e8102
4
+ data.tar.gz: 44db5468f942a6d6b88b6734c62d6862bfd55e4d
5
5
  SHA512:
6
- metadata.gz: 64e63ea25673e6c2634069474f565b15db07e6d03cf05494e312ff61a426b35854d7842e3d8264c492a598309e967b799537c4b117889dfeacc89ab2bbfb3885
7
- data.tar.gz: de9ba082834b7e5ad26ae9e5bf7f2ae91af39dafb6cfb4d6109112dcb1e52e22d0179492098e0cf8b307c78cf2ae1ddac90301a11d06b88c633cdd8a7545c18b
6
+ metadata.gz: 7500f6cfa7ebc3e2e817cbeb4437a99ce93a20358b202d05d43c4cf16195ffd4928f01cba962d81b07feb60a317879c8fe6def6dd97b0b547ab440376f7b9f91
7
+ data.tar.gz: df9c2a7b44bf179c9f95a21871f2dcfa60a1b5ca117283e5b0ee59114e9eec294a67f75114e923580aaec89c24e9db3c71eb0de235b8864e99e1e22b606a594f
@@ -7,21 +7,24 @@ class Chef
7
7
  alias_method :old_build_from_file, :build_from_file
8
8
 
9
9
  #
10
- # Override Opscode provider to remove any existing LWRP
10
+ # Override Opscode provider to remove any existing LWRPs to suppress
11
+ # constant re-definition warnings.
11
12
  #
12
13
  # @param [String] cookbook_name
13
- # The name of the cookbook
14
+ # the name of the cookbook
14
15
  # @param [String] filename
15
- # File to load as a LWRP
16
+ # file to load as a LWRP
16
17
  # @param [Chef::RunContext] run_context
17
- # Context of a Chef Run
18
+ # context of a Chef Run
18
19
  #
19
20
  # @return [Chef::Provider]
20
21
  #
21
- def build_from_file(*args)
22
- cookbook_name, filename = args[0,2]
23
- remove_existing_lwrp(convert_to_class_name(filename_to_qualified_string(cookbook_name, filename)))
24
- old_build_from_file(*args)
22
+ def build_from_file(cookbook_name, filename, run_context)
23
+ provider_name = filename_to_qualified_string(cookbook_name, filename)
24
+ class_name = convert_to_class_name(provider_name)
25
+
26
+ remove_existing_lwrp(class_name)
27
+ old_build_from_file(cookbook_name, filename, run_context)
25
28
  end
26
29
 
27
30
  #
@@ -37,7 +40,23 @@ class Chef
37
40
  end
38
41
  end
39
42
  end
43
+ end
40
44
 
45
+ module InlineResources
46
+ module ClassMethods
47
+ #
48
+ # For LWRPs that call +use_inline_resources+, do not create another
49
+ # +resource_collection+ so that everything is added to the parent
50
+ # +resource_collection+.
51
+ #
52
+ # @param [String] name
53
+ #
54
+ # @override Chef::Provider::LWRPBase::InlineResources::ClassMethods#action
55
+ #
56
+ def action(name, &block)
57
+ define_method("action_#{name}", &block)
58
+ end
59
+ end
41
60
  end
42
61
  end
43
62
  end
@@ -17,7 +17,7 @@ module ChefSpec::Matchers
17
17
  def description
18
18
  message = %Q{render file "#{@path}"}
19
19
  if @expected_content
20
- if @expected_content.include?("\n")
20
+ if @expected_content.to_s.include?("\n")
21
21
  message << " with content <suppressed>"
22
22
  else
23
23
  message << " with content #{@expected_content.inspect}"
@@ -1,3 +1,3 @@
1
1
  module ChefSpec
2
- VERSION = '3.0.0'
2
+ VERSION = '3.0.1'
3
3
  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: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Crump
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-10-20 00:00:00.000000000 Z
12
+ date: 2013-10-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: chef
@@ -219,6 +219,6 @@ rubyforge_project:
219
219
  rubygems_version: 2.0.3
220
220
  signing_key:
221
221
  specification_version: 4
222
- summary: chefspec-3.0.0
222
+ summary: chefspec-3.0.1
223
223
  test_files: []
224
224
  has_rdoc: