puppet-check 1.4.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -11
- data/README.md +38 -26
- data/lib/puppet-check.rb +53 -39
- data/lib/puppet-check/cli.rb +12 -11
- data/lib/puppet-check/data_parser.rb +10 -10
- data/lib/puppet-check/output_results.rb +15 -15
- data/lib/puppet-check/puppet_parser.rb +6 -6
- data/lib/puppet-check/regression_check.rb +2 -2
- data/lib/puppet-check/rspec_puppet_support.rb +15 -7
- data/lib/puppet-check/ruby_parser.rb +9 -9
- data/lib/puppet-check/tasks.rb +27 -18
- data/spec/fixtures/metadata.json +5 -0
- data/spec/octocatalog-diff/hiera.yaml +1 -2
- data/spec/octocatalog-diff/octocatalog-diff.cfg.rb +5 -1
- data/spec/puppet-check/cli_spec.rb +40 -38
- data/spec/puppet-check/data_parser_spec.rb +30 -30
- data/spec/puppet-check/output_results_spec.rb +29 -29
- data/spec/puppet-check/puppet_parser_spec.rb +25 -25
- data/spec/puppet-check/regression_check_spec.rb +9 -6
- data/spec/puppet-check/rspec_puppet_support_spec.rb +2 -2
- data/spec/puppet-check/ruby_parser_spec.rb +39 -39
- data/spec/puppet-check/tasks_spec.rb +2 -2
- data/spec/puppet-check_spec.rb +33 -21
- data/spec/system/system_spec.rb +20 -20
- metadata +2 -2
data/spec/system/system_spec.rb
CHANGED
@@ -7,9 +7,9 @@ describe PuppetCheck do
|
|
7
7
|
context 'executed as a system from the CLI with arguments and various files to be processed' do
|
8
8
|
# see regression_check_spec
|
9
9
|
if File.directory?('/home/travis')
|
10
|
-
let(:cli) { PuppetCheck::CLI.run(%w
|
10
|
+
let(:cli) { PuppetCheck::CLI.run(%w[-s --puppet-lint no-hard_tabs-check,no-140chars-check --rubocop Metrics/LineLength,Style/Encoding .]) }
|
11
11
|
else
|
12
|
-
let(:cli) { PuppetCheck::CLI.run(%w
|
12
|
+
let(:cli) { PuppetCheck::CLI.run(%w[-s --puppet-lint no-hard_tabs-check,no-140chars-check --rubocop Metrics/LineLength,Style/Encoding --smoke -n good.example.com --octoconfig spec/octocatalog-diff/octocatalog-diff.cfg.rb .]) }
|
13
13
|
end
|
14
14
|
|
15
15
|
it 'outputs diagnostic results correctly after processing all of the files' do
|
@@ -17,16 +17,16 @@ describe PuppetCheck do
|
|
17
17
|
|
18
18
|
expect { cli }.not_to raise_exception
|
19
19
|
|
20
|
-
expect(PuppetCheck.error_files.length).to eql(8)
|
20
|
+
expect(PuppetCheck.settings[:error_files].length).to eql(8)
|
21
21
|
# stupid Puppet deprecation warning
|
22
22
|
if RUBY_VERSION.to_f < 2.1
|
23
|
-
expect(PuppetCheck.warning_files.length).to eql(10)
|
24
|
-
expect(PuppetCheck.clean_files.length).to eql(10)
|
23
|
+
expect(PuppetCheck.settings[:warning_files].length).to eql(10)
|
24
|
+
expect(PuppetCheck.settings[:clean_files].length).to eql(10)
|
25
25
|
else
|
26
|
-
expect(PuppetCheck.warning_files.length).to eql(9)
|
27
|
-
expect(PuppetCheck.clean_files.length).to eql(11)
|
26
|
+
expect(PuppetCheck.settings[:warning_files].length).to eql(9)
|
27
|
+
expect(PuppetCheck.settings[:clean_files].length).to eql(11)
|
28
28
|
end
|
29
|
-
expect(PuppetCheck.ignored_files.length).to eql(1)
|
29
|
+
expect(PuppetCheck.settings[:ignored_files].length).to eql(1)
|
30
30
|
|
31
31
|
expect(cli).to eql(2)
|
32
32
|
end
|
@@ -40,24 +40,24 @@ describe PuppetCheck do
|
|
40
40
|
Dir.chdir(fixtures_dir)
|
41
41
|
|
42
42
|
# clear out arrays from previous system test
|
43
|
-
PuppetCheck.error_files = []
|
44
|
-
PuppetCheck.warning_files = []
|
45
|
-
PuppetCheck.clean_files = []
|
46
|
-
PuppetCheck.ignored_files = []
|
47
|
-
PuppetCheck.style_check = true
|
43
|
+
PuppetCheck.settings[:error_files] = []
|
44
|
+
PuppetCheck.settings[:warning_files] = []
|
45
|
+
PuppetCheck.settings[:clean_files] = []
|
46
|
+
PuppetCheck.settings[:ignored_files] = []
|
47
|
+
PuppetCheck.settings[:style_check] = true
|
48
48
|
# see regression_check_spec
|
49
49
|
unless File.directory?('/home/travis')
|
50
|
-
PuppetCheck.smoke_check = true
|
51
|
-
PuppetCheck.octonodes = %w
|
52
|
-
PuppetCheck.octoconfig = 'spec/octocatalog-diff/octocatalog-diff.cfg.rb'
|
50
|
+
PuppetCheck.settings[:smoke_check] = true
|
51
|
+
PuppetCheck.settings[:octonodes] = %w[good.example.com]
|
52
|
+
PuppetCheck.settings[:octoconfig] = 'spec/octocatalog-diff/octocatalog-diff.cfg.rb'
|
53
53
|
end
|
54
54
|
|
55
55
|
expect { tasks }.not_to raise_exception
|
56
56
|
|
57
|
-
expect(PuppetCheck.error_files.length).to eql(8)
|
58
|
-
expect(PuppetCheck.warning_files.length).to eql(9)
|
59
|
-
expect(PuppetCheck.clean_files.length).to eql(11)
|
60
|
-
expect(PuppetCheck.ignored_files.length).to eql(1)
|
57
|
+
expect(PuppetCheck.settings[:error_files].length).to eql(8)
|
58
|
+
expect(PuppetCheck.settings[:warning_files].length).to eql(9)
|
59
|
+
expect(PuppetCheck.settings[:clean_files].length).to eql(11)
|
60
|
+
expect(PuppetCheck.settings[:ignored_files].length).to eql(1)
|
61
61
|
end
|
62
62
|
end
|
63
63
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppet-check
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Schuchard
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: puppet
|