onceover-codequality 0.4.1 → 0.4.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 63a38c5d3ba138cf100238853ffe501c54e2bdc87d7afc7efd9cc4a1e1544125
4
- data.tar.gz: 321dfa4029fec08ea836298d2f98b1a6e109f6e2c4ae54846bbec34af2ec7c52
3
+ metadata.gz: 2d002a389642fbd94ce6014ecff04a722df6fc11b839f1b89da4af142a45939b
4
+ data.tar.gz: 85a5ed0c78832166281dad179ce1dcec6ee635f6a34738444273e3da263c7fba
5
5
  SHA512:
6
- metadata.gz: 81094f3e5df3d0c0ec09ead29b3670ed6384113a6ac1b5f58f25ab3b5d8b490b7c8abd3943cd21802902d81a45a5142882fbb550d1ffcd3ed6510f7ee3761e14
7
- data.tar.gz: 6e5c93e4b1481866812933bbf0e05267257e416c470502386341208f851d7a6f3503acc38c739e5a7262c38430978e92b51d5626eeeab9d17a7ea35e1abc877e
6
+ metadata.gz: 63a2b200eec20907c736b91a5bb853f362c5de63ae8b49f4bbef02f26ba06f1a71c3e362f1cb4d6901578a3948da3474c979863a4798d9876f2a4de410e2e06e
7
+ data.tar.gz: 8ad26cf6dbc73ab8915719af1fe1a421faf348dd1dadf995d9915602763608132a57b0b6e7e7c5555125f88296ee606fb8261a1f1544002c58d1a1d8fd90ab60
@@ -2,7 +2,7 @@ class Onceover
2
2
  module CodeQuality
3
3
  module Lint
4
4
 
5
- # Apply linting to the manifests directory and each module under `site`
5
+ # Apply linting to the manifests directory and each module under `site`
6
6
  LINT_PATHS = [
7
7
  "manifests",
8
8
  ].concat(Dir.glob('site/*').select {|f| File.directory? f})
@@ -25,11 +25,9 @@ class Onceover
25
25
  status = true
26
26
  LINT_PATHS.each { |p|
27
27
  if Dir.exists?(p)
28
- Dir.chdir(p) do
29
- logger.info("checking #{p}")
30
- if ! system("puppet-lint #{LINT_OPTIONS.join ' '} . ")
31
- status = false
32
- end
28
+ logger.info("checking #{p}")
29
+ if ! system("puppet-lint #{LINT_OPTIONS.join ' '} #{p}")
30
+ status = false
33
31
  end
34
32
  end
35
33
  }
@@ -11,13 +11,13 @@ class Onceover
11
11
  logger.warn("No Puppetfile found... continuing")
12
12
  end
13
13
 
14
- # rake task contains an exit statement so run it in a subshell to
15
- # capture and continue
16
- status &= system(
17
- "ruby << EOD
18
- require 'puppet-syntax/tasks/puppet-syntax'
19
- Rake::Task['syntax'].invoke
20
- EOD")
14
+ require 'puppet-syntax/tasks/puppet-syntax'
15
+ begin
16
+ Rake::Task['syntax'].invoke
17
+ rescue SystemExit => e
18
+ logger.error("Invalid syntax")
19
+ status &= e.status
20
+ end
21
21
  status
22
22
  end
23
23
  end
@@ -1,5 +1,5 @@
1
1
  class Onceover
2
2
  module CodeQuality
3
- VERSION = "0.4.1"
3
+ VERSION = "0.4.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onceover-codequality
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Declarative Systems
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-11-12 00:00:00.000000000 Z
11
+ date: 2018-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler