puppet-syntax 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +4 -0
- data/Gemfile +3 -0
- data/lib/puppet-syntax/tasks/puppet-syntax.rb +2 -2
- data/lib/puppet-syntax/templates.rb +2 -2
- data/lib/puppet-syntax/version.rb +1 -1
- data/spec/puppet-syntax/templates_spec.rb +4 -4
- metadata +4 -4
data/CHANGELOG
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
2016-10-21 Release 2.1.1
|
2
|
+
- Use `$stderr.puts` rather than `warn` and `info` (thanks @mmckinst)
|
3
|
+
- Allow latest 3.x to validate EPP files (thanks @DavidS)
|
4
|
+
|
1
5
|
2016-01-18 Release 2.1.0
|
2
6
|
- Support Puppet 4. Many thanks to @DavidS
|
3
7
|
- Support validation of EPP templates. Thanks to @trlinkin
|
data/Gemfile
CHANGED
@@ -6,3 +6,6 @@ gemspec
|
|
6
6
|
# Override gemspec for CI matrix builds.
|
7
7
|
puppet_version = ENV['PUPPET_VERSION'] || '>2.7.0'
|
8
8
|
gem 'puppet', puppet_version
|
9
|
+
|
10
|
+
# older version required for ruby 1.9 compat, as it is pulled in as dependency of puppet, this has to be carried by the module
|
11
|
+
gem 'json_pure', '<= 2.0.1'
|
@@ -20,7 +20,7 @@ module PuppetSyntax
|
|
20
20
|
}
|
21
21
|
|
22
22
|
if psh_present
|
23
|
-
|
23
|
+
$stderr.puts <<-EOS
|
24
24
|
[WARNING] A conflicting :syntax rake task has been defined by
|
25
25
|
puppetlabs_spec_helper/rake_tasks. You should either disable this or upgrade
|
26
26
|
to puppetlabs_spec_helper >= 0.8.0 which now uses puppet-syntax.
|
@@ -31,7 +31,7 @@ to puppetlabs_spec_helper >= 0.8.0 which now uses puppet-syntax.
|
|
31
31
|
desc 'Syntax check Puppet manifests'
|
32
32
|
task :manifests do |t|
|
33
33
|
if Puppet::PUPPETVERSION.to_i >= 4 and PuppetSyntax.future_parser
|
34
|
-
|
34
|
+
$stderr.puts <<-EOS
|
35
35
|
[INFO] Puppet 4 has been detected and `future_parser` has been set to
|
36
36
|
'true'. The `future_parser setting will be ignored.
|
37
37
|
EOS
|
@@ -27,8 +27,8 @@ module PuppetSyntax
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def validate_epp(filename)
|
30
|
-
if Puppet::PUPPETVERSION.
|
31
|
-
raise "Cannot validate EPP without Puppet 4"
|
30
|
+
if Puppet::PUPPETVERSION.to_f < 3.7
|
31
|
+
raise "Cannot validate EPP without Puppet 4 or future parser (3.7+)"
|
32
32
|
end
|
33
33
|
|
34
34
|
require 'puppet/pops'
|
@@ -60,8 +60,8 @@ describe PuppetSyntax::Templates do
|
|
60
60
|
expect(res).to match([])
|
61
61
|
end
|
62
62
|
|
63
|
-
if Puppet::PUPPETVERSION.
|
64
|
-
context 'on Puppet <
|
63
|
+
if Puppet::PUPPETVERSION.to_f < 3.7
|
64
|
+
context 'on Puppet < 3.7' do
|
65
65
|
it 'should throw an exception when parsing EPP files' do
|
66
66
|
file = fixture_templates('pass.epp')
|
67
67
|
expect{ subject.check(file) }.to raise_error(/Cannot validate EPP without Puppet 4/)
|
@@ -80,8 +80,8 @@ describe PuppetSyntax::Templates do
|
|
80
80
|
end
|
81
81
|
end
|
82
82
|
|
83
|
-
if Puppet::PUPPETVERSION.
|
84
|
-
context 'on Puppet >=
|
83
|
+
if Puppet::PUPPETVERSION.to_f >= 3.7
|
84
|
+
context 'on Puppet >= 3.7' do
|
85
85
|
it 'should return nothing from a valid file' do
|
86
86
|
files = fixture_templates('pass.epp')
|
87
87
|
res = subject.check(files)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppet-syntax
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
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: 2016-
|
12
|
+
date: 2016-10-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -121,7 +121,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
121
121
|
version: '0'
|
122
122
|
segments:
|
123
123
|
- 0
|
124
|
-
hash:
|
124
|
+
hash: 1450618455891726817
|
125
125
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
126
126
|
none: false
|
127
127
|
requirements:
|
@@ -130,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
130
130
|
version: '0'
|
131
131
|
segments:
|
132
132
|
- 0
|
133
|
-
hash:
|
133
|
+
hash: 1450618455891726817
|
134
134
|
requirements: []
|
135
135
|
rubyforge_project:
|
136
136
|
rubygems_version: 1.8.23.2
|