rspec-puppet 2.5.0 → 2.6.0
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.
- data/CHANGELOG.md +86 -0
- data/README.md +317 -34
- data/lib/rspec-puppet/adapters.rb +38 -30
- data/lib/rspec-puppet/coverage.rb +31 -6
- data/lib/rspec-puppet/example/function_example_group.rb +53 -8
- data/lib/rspec-puppet/example/type_alias_example_group.rb +14 -0
- data/lib/rspec-puppet/example.rb +16 -33
- data/lib/rspec-puppet/matchers/allow_value.rb +45 -0
- data/lib/rspec-puppet/matchers/compile.rb +7 -0
- data/lib/rspec-puppet/matchers/create_generic.rb +54 -13
- data/lib/rspec-puppet/matchers/parameter_matcher.rb +2 -2
- data/lib/rspec-puppet/matchers/run.rb +6 -1
- data/lib/rspec-puppet/matchers.rb +1 -0
- data/lib/rspec-puppet/monkey_patches.rb +162 -0
- data/lib/rspec-puppet/setup.rb +47 -26
- data/lib/rspec-puppet/spec_helper.rb +4 -3
- data/lib/rspec-puppet/support.rb +183 -34
- data/lib/rspec-puppet.rb +18 -0
- metadata +35 -28
- checksums.yaml +0 -7
data/lib/rspec-puppet/setup.rb
CHANGED
@@ -12,6 +12,14 @@ module RSpec::Puppet
|
|
12
12
|
return false
|
13
13
|
end
|
14
14
|
|
15
|
+
safe_setup_directories(module_name)
|
16
|
+
safe_touch(File.join('spec', 'fixtures', 'manifests', 'site.pp'))
|
17
|
+
|
18
|
+
safe_create_spec_helper
|
19
|
+
safe_create_rakefile
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.safe_setup_directories(module_name=nil, verbose=true)
|
15
23
|
if module_name.nil?
|
16
24
|
module_name = get_module_name
|
17
25
|
if module_name.nil?
|
@@ -22,28 +30,33 @@ module RSpec::Puppet
|
|
22
30
|
|
23
31
|
[
|
24
32
|
'spec',
|
25
|
-
'spec
|
26
|
-
'spec
|
27
|
-
'spec
|
28
|
-
'spec
|
29
|
-
'spec
|
30
|
-
'spec
|
31
|
-
'spec
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
33
|
+
File.join('spec', 'classes'),
|
34
|
+
File.join('spec', 'defines'),
|
35
|
+
File.join('spec', 'functions'),
|
36
|
+
File.join('spec', 'hosts'),
|
37
|
+
File.join('spec', 'fixtures'),
|
38
|
+
File.join('spec', 'fixtures', 'manifests'),
|
39
|
+
File.join('spec', 'fixtures', 'modules'),
|
40
|
+
].each { |dir| safe_mkdir(dir, verbose) }
|
41
|
+
|
42
|
+
target = File.join('spec', 'fixtures', 'modules', module_name)
|
43
|
+
safe_make_link('.', target, verbose)
|
44
|
+
end
|
45
|
+
|
46
|
+
def self.safe_teardown_links(module_name=nil)
|
47
|
+
if module_name.nil?
|
48
|
+
module_name = get_module_name
|
49
|
+
if module_name.nil?
|
50
|
+
$stderr.puts "Unable to determine module name. Aborting"
|
51
|
+
return false
|
40
52
|
end
|
41
53
|
end
|
42
54
|
|
43
|
-
|
44
|
-
|
55
|
+
target = File.join('spec', 'fixtures', 'modules', module_name)
|
56
|
+
if File.symlink?(target) && File.readlink(target) == File.expand_path('.')
|
57
|
+
File.unlink(target)
|
58
|
+
end
|
45
59
|
end
|
46
|
-
|
47
60
|
protected
|
48
61
|
def self.get_module_name
|
49
62
|
module_name = nil
|
@@ -78,14 +91,14 @@ module RSpec::Puppet
|
|
78
91
|
Dir["*"].entries.include? "manifests"
|
79
92
|
end
|
80
93
|
|
81
|
-
def self.safe_mkdir(dir)
|
94
|
+
def self.safe_mkdir(dir, verbose=true)
|
82
95
|
if File.exists? dir
|
83
96
|
unless File.directory? dir
|
84
97
|
$stderr.puts "!! #{dir} already exists and is not a directory"
|
85
98
|
end
|
86
99
|
else
|
87
100
|
FileUtils.mkdir dir
|
88
|
-
puts " + #{dir}/"
|
101
|
+
puts " + #{dir}/" if verbose
|
89
102
|
end
|
90
103
|
end
|
91
104
|
|
@@ -115,18 +128,26 @@ module RSpec::Puppet
|
|
115
128
|
end
|
116
129
|
|
117
130
|
def self.safe_create_spec_helper
|
118
|
-
content =
|
131
|
+
content = File.read(File.expand_path(File.join(__FILE__, '..', 'spec_helper.rb')))
|
119
132
|
safe_create_file('spec/spec_helper.rb', content)
|
120
133
|
end
|
121
134
|
|
122
|
-
def self.
|
123
|
-
if File.exists?
|
124
|
-
unless File.symlink? target
|
135
|
+
def self.safe_make_link(source, target, verbose=true)
|
136
|
+
if File.exists?(target)
|
137
|
+
unless File.symlink?(target) && File.readlink(target) == File.expand_path(source)
|
125
138
|
$stderr.puts "!! #{target} already exists and is not a symlink"
|
126
139
|
end
|
127
140
|
else
|
128
|
-
|
129
|
-
|
141
|
+
if Puppet::Util::Platform.windows?
|
142
|
+
output = `call mklink /J "#{target.gsub('/', '\\')}" "#{source}"`
|
143
|
+
unless $?.success?
|
144
|
+
puts output
|
145
|
+
abort
|
146
|
+
end
|
147
|
+
else
|
148
|
+
FileUtils.ln_s(File.expand_path(source), target)
|
149
|
+
end
|
150
|
+
puts " + #{target}" if verbose
|
130
151
|
end
|
131
152
|
end
|
132
153
|
|
@@ -1,9 +1,10 @@
|
|
1
1
|
require 'rspec-puppet'
|
2
2
|
|
3
|
-
fixture_path = File.
|
3
|
+
fixture_path = File.join(File.dirname(File.expand_path(__FILE__)), 'fixtures')
|
4
4
|
|
5
5
|
RSpec.configure do |c|
|
6
|
-
c.module_path
|
7
|
-
c.manifest_dir
|
6
|
+
c.module_path = File.join(fixture_path, 'modules')
|
7
|
+
c.manifest_dir = File.join(fixture_path, 'manifests')
|
8
|
+
c.manifest = File.join(fixture_path, 'manifests', 'site.pp')
|
8
9
|
c.environmentpath = File.join(Dir.pwd, 'spec')
|
9
10
|
end
|
data/lib/rspec-puppet/support.rb
CHANGED
@@ -15,22 +15,84 @@ module RSpec::Puppet
|
|
15
15
|
'rp_env'
|
16
16
|
end
|
17
17
|
|
18
|
-
def
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
18
|
+
def build_code(type, manifest_opts)
|
19
|
+
if Puppet.version.to_f >= 4.0 or Puppet[:parser] == 'future'
|
20
|
+
[site_pp_str, pre_cond, test_manifest(type, manifest_opts), post_cond].compact.join("\n")
|
21
|
+
else
|
22
|
+
[import_str, pre_cond, test_manifest(type, manifest_opts), post_cond].compact.join("\n")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def guess_type_from_path(path)
|
27
|
+
case path
|
28
|
+
when /spec\/defines/
|
29
|
+
:define
|
30
|
+
when /spec\/classes/
|
31
|
+
:class
|
32
|
+
when /spec\/functions/
|
33
|
+
:function
|
34
|
+
when /spec\/hosts/
|
35
|
+
:host
|
36
|
+
when /spec\/types/
|
37
|
+
:type
|
38
|
+
when /spec\/type_aliases/
|
39
|
+
:type_alias
|
40
|
+
when /spec\/provider/
|
41
|
+
:provider
|
42
|
+
when /spec\/applications/
|
43
|
+
:application
|
44
|
+
else
|
45
|
+
:unknown
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
def stub_file_consts(example)
|
50
|
+
if example.respond_to?(:metadata)
|
51
|
+
type = example.metadata[:type]
|
52
|
+
else
|
53
|
+
type = guess_type_from_path(example.example.metadata[:file_path])
|
54
|
+
end
|
55
|
+
|
56
|
+
munged_facts = facts_hash(nodename(type))
|
25
57
|
|
58
|
+
if munged_facts['operatingsystem'] && munged_facts['operatingsystem'].to_s.downcase == 'windows'
|
59
|
+
stub_const_wrapper('File::PATH_SEPARATOR', ';')
|
60
|
+
stub_const_wrapper('File::ALT_SEPARATOR', "\\")
|
61
|
+
stub_const_wrapper('Pathname::SEPARATOR_PAT', /[#{Regexp.quote(File::ALT_SEPARATOR)}#{Regexp.quote(File::SEPARATOR)}]/)
|
62
|
+
else
|
63
|
+
stub_const_wrapper('File::PATH_SEPARATOR', ':')
|
64
|
+
stub_const_wrapper('File::ALT_SEPARATOR', nil)
|
65
|
+
stub_const_wrapper('Pathname::SEPARATOR_PAT', /#{Regexp.quote(File::SEPARATOR)}/)
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
def stub_const_wrapper(const, value)
|
70
|
+
if defined?(RSpec::Core::MockingAdapters::RSpec) && RSpec.configuration.mock_framework == RSpec::Core::MockingAdapters::RSpec
|
71
|
+
stub_const(const, value)
|
72
|
+
else
|
73
|
+
klass_name, const_name = const.split('::', 2)
|
74
|
+
klass = Object.const_get(klass_name)
|
75
|
+
klass.send(:remove_const, const_name) if klass.const_defined?(const_name)
|
76
|
+
klass.const_set(const_name, value)
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
def load_catalogue(type, exported = false, manifest_opts = {})
|
81
|
+
with_vardir do
|
26
82
|
node_name = nodename(type)
|
27
83
|
|
28
84
|
hiera_config_value = self.respond_to?(:hiera_config) ? hiera_config : nil
|
85
|
+
hiera_data_value = self.respond_to?(:hiera_data) ? hiera_data : nil
|
29
86
|
|
30
|
-
catalogue = build_catalog(node_name, facts_hash(node_name),
|
87
|
+
catalogue = build_catalog(node_name, facts_hash(node_name), trusted_facts_hash(node_name), hiera_config_value,
|
88
|
+
build_code(type, manifest_opts), exported, node_params_hash, hiera_data_value)
|
31
89
|
|
32
|
-
test_module = class_name.split('::').first
|
33
|
-
|
90
|
+
test_module = type == :host ? nil : class_name.split('::').first
|
91
|
+
if type == :define
|
92
|
+
RSpec::Puppet::Coverage.add_filter(class_name, title)
|
93
|
+
else
|
94
|
+
RSpec::Puppet::Coverage.add_filter(type.to_s, class_name)
|
95
|
+
end
|
34
96
|
RSpec::Puppet::Coverage.add_from_catalog(catalogue, test_module)
|
35
97
|
|
36
98
|
catalogue
|
@@ -61,27 +123,41 @@ module RSpec::Puppet
|
|
61
123
|
import_str
|
62
124
|
end
|
63
125
|
|
64
|
-
def
|
126
|
+
def site_pp_str
|
127
|
+
site_pp_str = ''
|
128
|
+
filepath = adapter.manifest
|
129
|
+
|
130
|
+
if (!filepath.nil?) && File.file?(filepath)
|
131
|
+
site_pp_str = File.open(filepath).read
|
132
|
+
end
|
133
|
+
site_pp_str
|
134
|
+
end
|
135
|
+
|
136
|
+
def test_manifest(type, opts = {})
|
137
|
+
opts[:params] = params if self.respond_to?(:params)
|
138
|
+
|
65
139
|
if type == :class
|
66
|
-
if
|
140
|
+
if opts[:params].nil? || opts[:params] == {}
|
67
141
|
"include #{class_name}"
|
68
142
|
else
|
69
|
-
"class { '#{class_name}': #{param_str} }"
|
143
|
+
"class { '#{class_name}': #{param_str(opts[:params])} }"
|
70
144
|
end
|
71
145
|
elsif type == :application
|
72
|
-
if
|
73
|
-
"site { #{class_name} { '#{title}': #{param_str} } }"
|
146
|
+
if opts.has_key?(:params)
|
147
|
+
"site { #{class_name} { '#{title}': #{param_str(opts[:params])} } }"
|
74
148
|
else
|
75
|
-
raise
|
149
|
+
raise ArgumentError, "You need to provide params for an application"
|
76
150
|
end
|
77
151
|
elsif type == :define
|
78
|
-
if
|
79
|
-
"#{class_name} {
|
152
|
+
if opts.has_key?(:params)
|
153
|
+
"#{class_name} { #{title.inspect}: #{param_str(opts[:params])} }"
|
80
154
|
else
|
81
|
-
"#{class_name} {
|
155
|
+
"#{class_name} { #{title.inspect}: }"
|
82
156
|
end
|
83
157
|
elsif type == :host
|
84
158
|
nil
|
159
|
+
elsif type == :type_alias
|
160
|
+
"$test = #{str_from_value(opts[:test_value])}\nassert_type(#{self.class.top_level_description}, $test)"
|
85
161
|
end
|
86
162
|
end
|
87
163
|
|
@@ -110,28 +186,78 @@ module RSpec::Puppet
|
|
110
186
|
end
|
111
187
|
end
|
112
188
|
|
189
|
+
def post_cond
|
190
|
+
if self.respond_to?(:post_condition) && !post_condition.nil?
|
191
|
+
if post_condition.is_a? Array
|
192
|
+
post_condition.compact.join("\n")
|
193
|
+
else
|
194
|
+
post_condition
|
195
|
+
end
|
196
|
+
else
|
197
|
+
nil
|
198
|
+
end
|
199
|
+
end
|
200
|
+
|
113
201
|
def facts_hash(node)
|
114
|
-
|
202
|
+
base_facts = {
|
115
203
|
'clientversion' => Puppet::PUPPETVERSION,
|
116
204
|
'environment' => environment,
|
205
|
+
}
|
206
|
+
|
207
|
+
node_facts = {
|
117
208
|
'hostname' => node.split('.').first,
|
118
209
|
'fqdn' => node,
|
119
210
|
'domain' => node.split('.', 2).last,
|
120
|
-
'clientcert' => node
|
211
|
+
'clientcert' => node,
|
212
|
+
'networking' => {
|
213
|
+
'fqdn' => node,
|
214
|
+
'domain' => node.split('.', 2).last,
|
215
|
+
'hostname' => node.split('.').first
|
216
|
+
}
|
121
217
|
}
|
122
218
|
|
123
|
-
if RSpec.configuration.default_facts.any?
|
124
|
-
|
125
|
-
|
219
|
+
result_facts = if RSpec.configuration.default_facts.any?
|
220
|
+
munge_facts(RSpec.configuration.default_facts)
|
221
|
+
else
|
222
|
+
{}
|
223
|
+
end
|
224
|
+
|
225
|
+
result_facts.merge!(munge_facts(base_facts))
|
226
|
+
result_facts.merge!(munge_facts(facts)) if self.respond_to?(:facts)
|
227
|
+
result_facts.merge!(munge_facts(node_facts))
|
228
|
+
|
229
|
+
# Facter currently supports lower case facts. Bug FACT-777 has been submitted to support case sensitive
|
230
|
+
# facts.
|
231
|
+
downcase_facts = Hash[result_facts.map { |k, v| [k.downcase, v] }]
|
232
|
+
downcase_facts
|
233
|
+
end
|
126
234
|
|
127
|
-
|
128
|
-
|
235
|
+
def node_params_hash
|
236
|
+
params = RSpec.configuration.default_node_params
|
237
|
+
if respond_to?(:node_params)
|
238
|
+
params.merge(node_params)
|
239
|
+
else
|
240
|
+
params.dup
|
241
|
+
end
|
129
242
|
end
|
130
243
|
|
131
|
-
def param_str
|
244
|
+
def param_str(params)
|
132
245
|
param_str_from_hash(params)
|
133
246
|
end
|
134
247
|
|
248
|
+
def trusted_facts_hash(node_name)
|
249
|
+
return {} unless Puppet::Util::Package.versioncmp(Puppet.version, '4.3.0') >= 0
|
250
|
+
|
251
|
+
extensions = {}
|
252
|
+
|
253
|
+
if RSpec.configuration.default_trusted_facts.any?
|
254
|
+
extensions.merge!(RSpec.configuration.default_trusted_facts)
|
255
|
+
end
|
256
|
+
|
257
|
+
extensions.merge!(trusted_facts) if self.respond_to?(:trusted_facts)
|
258
|
+
extensions
|
259
|
+
end
|
260
|
+
|
135
261
|
def str_from_value(value)
|
136
262
|
case value
|
137
263
|
when Hash
|
@@ -139,8 +265,17 @@ module RSpec::Puppet
|
|
139
265
|
"#{str_from_value(k)} => #{str_from_value(v)}"
|
140
266
|
end.join(", ")
|
141
267
|
"{ #{kvs} }"
|
268
|
+
when Array
|
269
|
+
vals = value.map do |v|
|
270
|
+
str_from_value(v)
|
271
|
+
end.join(", ")
|
272
|
+
"[ #{vals} ]"
|
273
|
+
when :default
|
274
|
+
'default' # verbatim default keyword
|
142
275
|
when :undef
|
143
276
|
'undef' # verbatim undef keyword
|
277
|
+
when Symbol
|
278
|
+
str_from_value(value.to_s)
|
144
279
|
else
|
145
280
|
escape_special_chars(value.inspect)
|
146
281
|
end
|
@@ -159,7 +294,7 @@ module RSpec::Puppet
|
|
159
294
|
Puppet[:vardir] = vardir
|
160
295
|
|
161
296
|
# Enable app_management by default for Puppet versions that support it
|
162
|
-
if Puppet.version.
|
297
|
+
if Puppet::Util::Package.versioncmp(Puppet.version, '4.3.0') >= 0 && Puppet.version.to_i < 5
|
163
298
|
Puppet[:app_management] = true
|
164
299
|
end
|
165
300
|
|
@@ -177,11 +312,11 @@ module RSpec::Puppet
|
|
177
312
|
vardir = setup_puppet
|
178
313
|
return yield(vardir) if block_given?
|
179
314
|
ensure
|
180
|
-
FileUtils.rm_rf(vardir) if File.directory?(vardir)
|
315
|
+
FileUtils.rm_rf(vardir) if vardir && File.directory?(vardir)
|
181
316
|
end
|
182
317
|
end
|
183
318
|
|
184
|
-
def build_catalog_without_cache(nodename, facts_val, hiera_config_val, code, exported)
|
319
|
+
def build_catalog_without_cache(nodename, facts_val, trusted_facts_val, hiera_config_val, code, exported, node_params, *_)
|
185
320
|
|
186
321
|
# If we're going to rebuild the catalog, we should clear the cached instance
|
187
322
|
# of Hiera that Puppet is using. This opens the possibility of the catalog
|
@@ -197,13 +332,29 @@ module RSpec::Puppet
|
|
197
332
|
stub_facts! facts_val
|
198
333
|
|
199
334
|
node_facts = Puppet::Node::Facts.new(nodename, facts_val.dup)
|
335
|
+
node_params = facts_val.merge(node_params)
|
200
336
|
|
201
|
-
node_obj = Puppet::Node.new(nodename, { :parameters =>
|
337
|
+
node_obj = Puppet::Node.new(nodename, { :parameters => node_params, :facts => node_facts })
|
338
|
+
|
339
|
+
if Puppet::Util::Package.versioncmp(Puppet.version, '4.3.0') >= 0
|
340
|
+
Puppet.push_context(
|
341
|
+
{
|
342
|
+
:trusted_information => Puppet::Context::TrustedInformation.new('remote', nodename, trusted_facts_val)
|
343
|
+
},
|
344
|
+
"Context for spec trusted hash"
|
345
|
+
)
|
346
|
+
end
|
202
347
|
|
203
348
|
adapter.catalog(node_obj, exported)
|
204
349
|
end
|
205
350
|
|
206
351
|
def stub_facts!(facts)
|
352
|
+
if facts['operatingsystem'] && facts['operatingsystem'].to_s.downcase == 'windows'
|
353
|
+
Puppet::Util::Platform.pretend_to_be :windows
|
354
|
+
else
|
355
|
+
Puppet::Util::Platform.pretend_to_be :posix
|
356
|
+
end
|
357
|
+
Puppet.settings[:autosign] = false
|
207
358
|
facts.each { |k, v| Facter.add(k) { setcode { v } } }
|
208
359
|
end
|
209
360
|
|
@@ -213,11 +364,9 @@ module RSpec::Puppet
|
|
213
364
|
end
|
214
365
|
end
|
215
366
|
|
216
|
-
# Facter currently supports lower case facts. Bug FACT-777 has been submitted to support case sensitive
|
217
|
-
# facts.
|
218
367
|
def munge_facts(facts)
|
219
368
|
return facts.reduce({}) do | memo, (k, v)|
|
220
|
-
memo.tap { |m| m[k.to_s
|
369
|
+
memo.tap { |m| m[k.to_s] = munge_facts(v) }
|
221
370
|
end if facts.is_a? Hash
|
222
371
|
|
223
372
|
return facts.reduce([]) do |memo, v|
|
data/lib/rspec-puppet.rb
CHANGED
@@ -14,6 +14,12 @@ begin
|
|
14
14
|
rescue LoadError
|
15
15
|
end
|
16
16
|
|
17
|
+
RSpec.configure do |c|
|
18
|
+
c.add_setting :enable_pathname_stubbing, :default => false
|
19
|
+
end
|
20
|
+
|
21
|
+
require 'rspec-puppet/monkey_patches'
|
22
|
+
|
17
23
|
RSpec.configure do |c|
|
18
24
|
c.add_setting :environmentpath, :default => '/etc/puppetlabs/code/environments'
|
19
25
|
c.add_setting :module_path, :default => nil
|
@@ -23,6 +29,8 @@ RSpec.configure do |c|
|
|
23
29
|
c.add_setting :config, :default => nil
|
24
30
|
c.add_setting :confdir, :default => '/etc/puppet'
|
25
31
|
c.add_setting :default_facts, :default => {}
|
32
|
+
c.add_setting :default_node_params, :default => {}
|
33
|
+
c.add_setting :default_trusted_facts, :default => {}
|
26
34
|
c.add_setting :hiera_config, :default => '/dev/null'
|
27
35
|
c.add_setting :parser, :default => 'current'
|
28
36
|
c.add_setting :trusted_node_data, :default => false
|
@@ -31,6 +39,10 @@ RSpec.configure do |c|
|
|
31
39
|
c.add_setting :strict_variables, :default => false
|
32
40
|
c.add_setting :adapter
|
33
41
|
|
42
|
+
c.before(:all) do
|
43
|
+
RSpec::Puppet::Setup.safe_setup_directories(nil, false)
|
44
|
+
end
|
45
|
+
|
34
46
|
if defined?(Puppet::Test::TestHelper)
|
35
47
|
begin
|
36
48
|
Puppet::Test::TestHelper.initialize
|
@@ -55,6 +67,8 @@ RSpec.configure do |c|
|
|
55
67
|
c.before :each do
|
56
68
|
begin
|
57
69
|
Puppet::Test::TestHelper.before_each_test
|
70
|
+
rescue Puppet::Context::DuplicateRollbackMarkError
|
71
|
+
Puppet::Test::TestHelper.send(:initialize_settings_before_each)
|
58
72
|
rescue
|
59
73
|
end
|
60
74
|
end
|
@@ -74,4 +88,8 @@ RSpec.configure do |c|
|
|
74
88
|
c.adapter = adapter
|
75
89
|
end
|
76
90
|
end
|
91
|
+
|
92
|
+
c.before :each do |example|
|
93
|
+
stub_file_consts(example) if self.respond_to?(:stub_file_consts)
|
94
|
+
end
|
77
95
|
end
|
metadata
CHANGED
@@ -1,27 +1,30 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-puppet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.6.0
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Tim Sharpe
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date:
|
12
|
+
date: 2017-07-02 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: rspec
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
|
-
- -
|
19
|
+
- - ! '>='
|
18
20
|
- !ruby/object:Gem::Version
|
19
21
|
version: '0'
|
20
22
|
type: :runtime
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
23
26
|
requirements:
|
24
|
-
- -
|
27
|
+
- - ! '>='
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '0'
|
27
30
|
description: RSpec tests for your Puppet manifests
|
@@ -33,56 +36,60 @@ extra_rdoc_files: []
|
|
33
36
|
files:
|
34
37
|
- CHANGELOG.md
|
35
38
|
- README.md
|
36
|
-
- bin/rspec-puppet-init
|
37
39
|
- lib/rspec-puppet.rb
|
40
|
+
- lib/rspec-puppet/raw_string.rb
|
41
|
+
- lib/rspec-puppet/monkey_patches.rb
|
42
|
+
- lib/rspec-puppet/support.rb
|
43
|
+
- lib/rspec-puppet/matchers/run.rb
|
44
|
+
- lib/rspec-puppet/matchers/allow_value.rb
|
45
|
+
- lib/rspec-puppet/matchers/parameter_matcher.rb
|
46
|
+
- lib/rspec-puppet/matchers/count_generic.rb
|
47
|
+
- lib/rspec-puppet/matchers/create_generic.rb
|
48
|
+
- lib/rspec-puppet/matchers/dynamic_matchers.rb
|
49
|
+
- lib/rspec-puppet/matchers/include_class.rb
|
50
|
+
- lib/rspec-puppet/matchers/compile.rb
|
51
|
+
- lib/rspec-puppet/matchers/type_matchers.rb
|
52
|
+
- lib/rspec-puppet/spec_helper.rb
|
38
53
|
- lib/rspec-puppet/adapters.rb
|
39
54
|
- lib/rspec-puppet/cache.rb
|
55
|
+
- lib/rspec-puppet/setup.rb
|
40
56
|
- lib/rspec-puppet/coverage.rb
|
41
|
-
- lib/rspec-puppet/errors.rb
|
42
|
-
- lib/rspec-puppet/example.rb
|
43
|
-
- lib/rspec-puppet/example/application_example_group.rb
|
44
|
-
- lib/rspec-puppet/example/class_example_group.rb
|
45
|
-
- lib/rspec-puppet/example/define_example_group.rb
|
46
57
|
- lib/rspec-puppet/example/function_example_group.rb
|
58
|
+
- lib/rspec-puppet/example/type_alias_example_group.rb
|
59
|
+
- lib/rspec-puppet/example/type_example_group.rb
|
47
60
|
- lib/rspec-puppet/example/host_example_group.rb
|
48
61
|
- lib/rspec-puppet/example/provider_example_group.rb
|
49
|
-
- lib/rspec-puppet/example/
|
62
|
+
- lib/rspec-puppet/example/application_example_group.rb
|
63
|
+
- lib/rspec-puppet/example/define_example_group.rb
|
64
|
+
- lib/rspec-puppet/example/class_example_group.rb
|
65
|
+
- lib/rspec-puppet/example.rb
|
50
66
|
- lib/rspec-puppet/matchers.rb
|
51
|
-
- lib/rspec-puppet/matchers/compile.rb
|
52
|
-
- lib/rspec-puppet/matchers/count_generic.rb
|
53
|
-
- lib/rspec-puppet/matchers/create_generic.rb
|
54
|
-
- lib/rspec-puppet/matchers/dynamic_matchers.rb
|
55
|
-
- lib/rspec-puppet/matchers/include_class.rb
|
56
|
-
- lib/rspec-puppet/matchers/parameter_matcher.rb
|
57
|
-
- lib/rspec-puppet/matchers/run.rb
|
58
|
-
- lib/rspec-puppet/matchers/type_matchers.rb
|
59
67
|
- lib/rspec-puppet/rake_task.rb
|
60
|
-
- lib/rspec-puppet/
|
61
|
-
-
|
62
|
-
- lib/rspec-puppet/spec_helper.rb
|
63
|
-
- lib/rspec-puppet/support.rb
|
68
|
+
- lib/rspec-puppet/errors.rb
|
69
|
+
- bin/rspec-puppet-init
|
64
70
|
homepage: https://github.com/rodjek/rspec-puppet/
|
65
71
|
licenses:
|
66
72
|
- MIT
|
67
|
-
metadata: {}
|
68
73
|
post_install_message:
|
69
74
|
rdoc_options: []
|
70
75
|
require_paths:
|
71
76
|
- lib
|
72
77
|
required_ruby_version: !ruby/object:Gem::Requirement
|
78
|
+
none: false
|
73
79
|
requirements:
|
74
|
-
- -
|
80
|
+
- - ! '>='
|
75
81
|
- !ruby/object:Gem::Version
|
76
82
|
version: '0'
|
77
83
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
84
|
+
none: false
|
78
85
|
requirements:
|
79
|
-
- -
|
86
|
+
- - ! '>='
|
80
87
|
- !ruby/object:Gem::Version
|
81
88
|
version: '0'
|
82
89
|
requirements: []
|
83
90
|
rubyforge_project:
|
84
|
-
rubygems_version:
|
91
|
+
rubygems_version: 1.8.23.2
|
85
92
|
signing_key:
|
86
|
-
specification_version:
|
93
|
+
specification_version: 3
|
87
94
|
summary: RSpec tests for your Puppet manifests
|
88
95
|
test_files: []
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: 1a4f52ea0428c49bc328570e7a71776b75b800b2
|
4
|
-
data.tar.gz: 461fadebe1cd4756715a99d54fefdf51c020a17b
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: 8f79f8be40bf4e2c77e11ddf68130ea0fe97b8e629cf4768c2da1a15a096ed65fad3dff160208a36b9d221f652564956fc15113b56589562a8890c01a4678098
|
7
|
-
data.tar.gz: bc64b10392874054ebf8cfe7712abc25874bfa3d44ebd3c6dced81d3eae7c99b359754dd3d74481dfc1851264ce347f8f76990e0022f8e653b622a77ade449d5
|