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.
@@ -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(-s --puppet-lint no-hard_tabs-check,no-140chars-check --rubocop Metrics/LineLength,Style/Encoding .)) }
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(-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 .)) }
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(good.example.com)
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.0
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-05-04 00:00:00.000000000 Z
11
+ date: 2017-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: puppet