puppetlabs_spec_helper 0.7.0 → 0.8.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
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
2014-07-29 - Release 0.8.0
|
2
|
+
Summary:
|
3
|
+
This release uses the new puppet-syntax gem to perform manifest validation
|
4
|
+
better than before! Shiny.
|
5
|
+
|
6
|
+
Features:
|
7
|
+
- Use puppet-syntax gem for manifest validation rake task
|
8
|
+
|
9
|
+
Bugfixes:
|
10
|
+
- Fix compatibility with rspec 3
|
11
|
+
|
1
12
|
2014-07-17 - Release 0.7.0
|
2
13
|
Summary:
|
3
14
|
This feature release adds the ability to test structured facts, manifest
|
@@ -1,13 +1,18 @@
|
|
1
1
|
require 'stringio'
|
2
|
+
require 'rspec/expectations'
|
2
3
|
|
3
4
|
########################################################################
|
4
5
|
# Backward compatibility for Jenkins outdated environment.
|
5
6
|
module RSpec
|
6
7
|
module Matchers
|
7
8
|
module BlockAliases
|
8
|
-
|
9
|
-
|
10
|
-
|
9
|
+
if method_defined? :should
|
10
|
+
alias_method :to, :should unless method_defined? :to
|
11
|
+
end
|
12
|
+
if method_defined? :should_not
|
13
|
+
alias_method :to_not, :should_not unless method_defined? :to_not
|
14
|
+
alias_method :not_to, :should_not unless method_defined? :not_to
|
15
|
+
end
|
11
16
|
end
|
12
17
|
end
|
13
18
|
end
|
@@ -200,31 +200,18 @@ task :lint do
|
|
200
200
|
PuppetLint.configuration.ignore_paths << "spec/fixtures/**/*.pp"
|
201
201
|
end
|
202
202
|
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
203
|
+
require 'puppet-syntax/tasks/puppet-syntax'
|
204
|
+
PuppetSyntax.exclude_paths ||= []
|
205
|
+
PuppetSyntax.exclude_paths << "spec/fixtures/**/*.pp"
|
206
|
+
PuppetSyntax.future_parser = true if ENV['FUTURE_PARSER'] == 'yes'
|
207
207
|
|
208
|
-
|
209
|
-
matched_files = FileList['**/*.pp'].exclude 'spec/fixtures/**/*.pp'
|
210
|
-
|
211
|
-
matched_files.to_a.each do |puppet_file|
|
212
|
-
parser.validate(puppet_file)
|
213
|
-
end
|
214
|
-
end
|
215
|
-
end
|
216
|
-
|
217
|
-
desc "Validate manifests, templates, and ruby files in lib."
|
208
|
+
desc "Check syntax of Ruby files and call :syntax"
|
218
209
|
task :validate do
|
219
|
-
Dir['manifests/**/*.pp'].each do |manifest|
|
220
|
-
sh "puppet parser validate --noop #{manifest}"
|
221
|
-
end
|
222
210
|
Dir['lib/**/*.rb'].each do |lib_file|
|
223
211
|
sh "ruby -c #{lib_file}"
|
224
212
|
end
|
225
|
-
|
226
|
-
|
227
|
-
end
|
213
|
+
|
214
|
+
Rake::Task[:syntax].invoke
|
228
215
|
end
|
229
216
|
|
230
217
|
desc "Display the list of available rake tasks"
|
@@ -20,6 +20,7 @@ Gem::Specification.new do |s|
|
|
20
20
|
s.add_runtime_dependency 'rake'
|
21
21
|
s.add_runtime_dependency 'rspec-puppet'
|
22
22
|
s.add_runtime_dependency 'puppet-lint'
|
23
|
+
s.add_runtime_dependency 'puppet-syntax'
|
23
24
|
s.add_runtime_dependency 'rspec'
|
24
25
|
s.add_runtime_dependency 'mocha'
|
25
26
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppetlabs_spec_helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
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: 2014-07-
|
12
|
+
date: 2014-07-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -59,6 +59,22 @@ dependencies:
|
|
59
59
|
- - ! '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: puppet-syntax
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :runtime
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
62
78
|
- !ruby/object:Gem::Dependency
|
63
79
|
name: rspec
|
64
80
|
requirement: !ruby/object:Gem::Requirement
|