puppet-syntax 2.1.1 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +4 -0
- data/lib/puppet-syntax/manifests.rb +10 -5
- data/lib/puppet-syntax/version.rb +1 -1
- metadata +4 -4
data/CHANGELOG
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
2016-12-02 Release 2.2.0
|
2
|
+
- Replace Puppet.initialize_settings with Puppet::Test::TestHelper. Thanks @domcleal #60
|
3
|
+
This clears out caches on every test so increases runtime.
|
4
|
+
|
1
5
|
2016-10-21 Release 2.1.1
|
2
6
|
- Use `$stderr.puts` rather than `warn` and `info` (thanks @mmckinst)
|
3
7
|
- Allow latest 3.x to validate EPP files (thanks @DavidS)
|
@@ -4,27 +4,30 @@ module PuppetSyntax
|
|
4
4
|
raise "Expected an array of files" unless filelist.is_a?(Array)
|
5
5
|
require 'puppet'
|
6
6
|
require 'puppet/face'
|
7
|
+
require 'puppet/test/test_helper'
|
7
8
|
|
8
9
|
output = []
|
9
10
|
|
10
|
-
|
11
|
-
|
12
|
-
# - https://groups.google.com/forum/#!topic/puppet-dev/Yk0WC1JZCg8/discussion
|
13
|
-
if (Puppet::PUPPETVERSION.to_i >= 3 && !Puppet.settings.app_defaults_initialized?)
|
14
|
-
Puppet.initialize_settings
|
11
|
+
if Puppet::Test::TestHelper.respond_to?(:initialize) # 3.1+
|
12
|
+
Puppet::Test::TestHelper.initialize
|
15
13
|
end
|
14
|
+
Puppet::Test::TestHelper.before_all_tests
|
15
|
+
called_before_all_tests = true
|
16
16
|
|
17
17
|
# Catch syntax warnings.
|
18
18
|
Puppet::Util::Log.newdestination(Puppet::Test::LogCollector.new(output))
|
19
19
|
Puppet::Util::Log.level = :warning
|
20
20
|
|
21
21
|
filelist.each do |puppet_file|
|
22
|
+
Puppet::Test::TestHelper.before_each_test
|
22
23
|
begin
|
23
24
|
validate_manifest(puppet_file)
|
24
25
|
rescue SystemExit
|
25
26
|
# Disregard exit(1) from face.
|
26
27
|
rescue => error
|
27
28
|
output << error
|
29
|
+
ensure
|
30
|
+
Puppet::Test::TestHelper.after_each_test
|
28
31
|
end
|
29
32
|
end
|
30
33
|
|
@@ -49,6 +52,8 @@ module PuppetSyntax
|
|
49
52
|
has_errors = (output != deprecations)
|
50
53
|
|
51
54
|
return output, has_errors
|
55
|
+
ensure
|
56
|
+
Puppet::Test::TestHelper.after_all_tests if called_before_all_tests
|
52
57
|
end
|
53
58
|
|
54
59
|
private
|
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.
|
4
|
+
version: 2.2.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: 2016-
|
12
|
+
date: 2016-12-02 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: 1305733798338570755
|
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: 1305733798338570755
|
134
134
|
requirements: []
|
135
135
|
rubyforge_project:
|
136
136
|
rubygems_version: 1.8.23.2
|