chefspec 2.0.0 → 2.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 +4 -4
- data/lib/chefspec/matchers/shared.rb +8 -5
- data/lib/chefspec/monkey_patches/hash.rb +1 -1
- data/lib/chefspec/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99f76ee3ebc113772db94655dd859bc9904b474d
|
4
|
+
data.tar.gz: ee588d2f65647778014e5b289e1fec6665a25e62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5803437489929a05a1f2432d6d93ae16beb5f06d9cf67756a41d1f3a84943b6baf25c308a2427044e923a450bd70820baa48ad69724674a1012bd84928ddbae
|
7
|
+
data.tar.gz: 04dba2a600d9a4f7c2299d2a54d57b34bb21ac9291e4dd5c920604495d1b06fe24b9b222ec3ee1b7a54aca9647bd75a6751beb3107de83df0d9f509b39131bc0
|
@@ -32,16 +32,19 @@ def define_resource_matchers(actions, resource_types, name_attribute)
|
|
32
32
|
accepted_types = [resource_type.to_s]
|
33
33
|
accepted_types += ['template', 'cookbook_file'] if action.to_s == 'create' and resource_type.to_s == 'file'
|
34
34
|
chef_run.resources.any? do |resource|
|
35
|
-
(accepted_types.include? resource_type(resource) and
|
36
|
-
|
37
|
-
|
35
|
+
if (accepted_types.include? resource_type(resource) and
|
36
|
+
name === resource.send(name_attribute) and
|
37
|
+
resource_actions(resource).include? action.to_s)
|
38
|
+
@resource_name = resource.send(name_attribute)
|
39
|
+
true
|
40
|
+
end
|
38
41
|
end
|
39
42
|
end
|
40
43
|
failure_message_for_should do |actual|
|
41
|
-
"No #{resource_type} resource
|
44
|
+
"No #{resource_type} resource matching name '#{name}' with action :#{action} found."
|
42
45
|
end
|
43
46
|
failure_message_for_should_not do |actual|
|
44
|
-
"Found #{resource_type} resource named '#{name}' with action :#{action} that should not exist."
|
47
|
+
"Found #{resource_type} resource named '#{@resource_name}' matching name: '#{name}' with action :#{action} that should not exist."
|
45
48
|
end
|
46
49
|
end
|
47
50
|
end
|
data/lib/chefspec/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chefspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Crump
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef
|
@@ -222,6 +222,6 @@ rubyforge_project:
|
|
222
222
|
rubygems_version: 2.0.3
|
223
223
|
signing_key:
|
224
224
|
specification_version: 4
|
225
|
-
summary: chefspec-2.0.
|
225
|
+
summary: chefspec-2.0.1
|
226
226
|
test_files: []
|
227
227
|
has_rdoc:
|