chefspec 3.0.0 → 3.0.1
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 654732428da134b8c055847663deb22bad8e8102
|
4
|
+
data.tar.gz: 44db5468f942a6d6b88b6734c62d6862bfd55e4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
-
#
|
14
|
+
# the name of the cookbook
|
14
15
|
# @param [String] filename
|
15
|
-
#
|
16
|
+
# file to load as a LWRP
|
16
17
|
# @param [Chef::RunContext] run_context
|
17
|
-
#
|
18
|
+
# context of a Chef Run
|
18
19
|
#
|
19
20
|
# @return [Chef::Provider]
|
20
21
|
#
|
21
|
-
def build_from_file(
|
22
|
-
cookbook_name, filename
|
23
|
-
|
24
|
-
|
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}"
|
data/lib/chefspec/version.rb
CHANGED
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.
|
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-
|
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.
|
222
|
+
summary: chefspec-3.0.1
|
223
223
|
test_files: []
|
224
224
|
has_rdoc:
|