kafo_module_lint 1.1.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0188465509ff0025de5407c0e18e42676b87fe0349a5a268c8041bdb350b3e7a'
4
- data.tar.gz: 7b06d848df509ad149a9706c3c9cd9c6ef09cc838ce8c5b4b93bdca75cae511a
3
+ metadata.gz: 5e9303574a6565439ad613c83c22e8b4c5bbef9980940e8171fe15c617d3b174
4
+ data.tar.gz: 6294796f898c2a08c0978c358c4505b23073187fa3b02ccc4be2ed7651158ba5
5
5
  SHA512:
6
- metadata.gz: 90490bab5c721b32ecb227bb1db64e3ef01171a7fb11e543b807fae824ebba96294a105d7f065946868f1d0510cc4510d78c94a8bc0c0d8ab978fe0388fe21de
7
- data.tar.gz: 17ad9aab198ad2cd1ac33b44e88f24a230a748547e41800029d983a3e2367f8191efdc340a1998504f2666fd83eaca35a8a8f105745e8815c5833fddbc0f14c3
6
+ metadata.gz: 8be0b609e458f1321153920433c71039019cb10b45102bae9e7fb28a788e20d34c237d84affd2ebc960c767feaaa7a69aac00aa0790dc2e9fa579da958ebf733
7
+ data.tar.gz: d67116a6449e853caa48b48ed51de96b8a542a9dc026797a066cbc00f157bf829a2d53b3237560e6a96e4ce7c6d7ebdb6ec73c8aeb9868af594efc8ed88fd555
@@ -0,0 +1,35 @@
1
+ ---
2
+ name: CI
3
+
4
+ on:
5
+ pull_request:
6
+ push:
7
+ branch: master
8
+
9
+ concurrency:
10
+ group: ${{ github.ref_name }}
11
+ cancel-in-progress: true
12
+
13
+ jobs:
14
+ unit:
15
+ runs-on: ubuntu-latest
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ include:
20
+ - ruby: '2.7'
21
+ puppet: 7
22
+ - ruby: '3.2'
23
+ puppet: 8
24
+ env:
25
+ PUPPET_GEM_VERSION: "~> ${{ matrix.puppet }}.0"
26
+ name: "Ruby ${{ matrix.ruby }} with Puppet ${{ matrix.puppet }}"
27
+ steps:
28
+ - uses: actions/checkout@v4
29
+ - name: Setup ruby
30
+ uses: ruby/setup-ruby@v1
31
+ with:
32
+ ruby-version: ${{ matrix.ruby }}
33
+ bundler-cache: true
34
+ - name: Run tests
35
+ run: bundle exec rake test
data/Gemfile CHANGED
@@ -2,6 +2,4 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
- puppet_version = ENV['PUPPET_VERSION']
6
- puppet_spec = puppet_version ? "~> #{puppet_version}" : '< 7.0.0'
7
- gem 'puppet', puppet_spec
5
+ gem 'puppet', ENV.fetch('PUPPET_GEM_VERSION', '< 9')
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
8
8
  spec.email = ["dominic@cleal.org", "ewoud+rubygems@kohlvanwijngaarden.nl"]
9
9
  spec.summary = %q{Validate Puppet modules are correctly documented for Kafo}
10
10
  spec.description = %q{Validates Puppet modules and manifests to ensure parameters are all correctly documented for use with the Kafo gem}
11
- spec.homepage = "https://github.com/ekohl/kafo_module_lint"
11
+ spec.homepage = "https://github.com/theforeman/kafo_module_lint"
12
12
  spec.license = "GPLv3+"
13
13
 
14
14
  spec.files = `git ls-files`.split($/)
@@ -16,11 +16,11 @@ Gem::Specification.new do |spec|
16
16
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
17
17
  spec.require_paths = ["lib"]
18
18
 
19
- spec.add_development_dependency "bundler", "~> 1.5"
19
+ spec.add_development_dependency "bundler", ">= 1.5"
20
20
  spec.add_development_dependency "rake"
21
21
  spec.add_development_dependency "minitest", "~> 5.0"
22
22
 
23
- spec.add_dependency 'kafo', '>= 1.0.4', '< 3'
23
+ spec.add_dependency 'kafo', '>= 1.0.4', '< 7'
24
24
  spec.add_dependency 'kafo_parsers'
25
- spec.add_dependency 'puppet-strings', '>= 0.99', '< 3'
25
+ spec.add_dependency 'puppet-strings', '>= 0.99', '< 5'
26
26
  end
@@ -11,7 +11,7 @@ module KafoModuleLint
11
11
  end
12
12
 
13
13
  def pass?
14
- skip? || errors.empty?
14
+ errors.empty?
15
15
  end
16
16
 
17
17
  def errors
@@ -19,7 +19,7 @@ module KafoModuleLint
19
19
  errors = []
20
20
  parsed[:types].each do |param,type|
21
21
  check_param(param, type, errors)
22
- end unless skip?
22
+ end
23
23
  errors
24
24
  end
25
25
  end
@@ -48,10 +48,5 @@ module KafoModuleLint
48
48
  false
49
49
  end
50
50
  end
51
-
52
- def skip?
53
- # kafo_parsers doesn't support 3.x future parser
54
- ENV['FUTURE_PARSER'] == 'yes'
55
- end
56
51
  end
57
52
  end
@@ -1,3 +1,3 @@
1
1
  module KafoModuleLint
2
- VERSION = "1.1.0"
2
+ VERSION = "1.3.0"
3
3
  end
@@ -37,16 +37,6 @@ module KafoModuleLint
37
37
  specify { linter.pass?.must_equal true }
38
38
  end
39
39
 
40
- describe "with future parser" do
41
- let(:manifest) { ManifestFactory.build({'a' => 'String', 'b' => 'Unknown[String]'}) }
42
- before { ENV['FUTURE_PARSER'] = 'yes' }
43
- after { ENV.delete('FUTURE_PARSER') }
44
-
45
- specify { linter.pass?.must_equal true }
46
- specify { linter.errors.must_equal [] }
47
- specify { proc { linter.puts_errors }.must_output nil }
48
- end
49
-
50
40
  describe "with wrong argument count" do
51
41
  let(:manifest) { ManifestFactory.build({'a' => 'String', 'b' => 'Undef["foo"]'}) }
52
42
  let(:error) { /#{Regexp.escape(manifest_file)} parameter b: wrong number of arguments \(.*1.*0.*\)/ }
metadata CHANGED
@@ -1,28 +1,28 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kafo_module_lint
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominic Cleal
8
8
  - Ewoud Kohl van Wijngaarden
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-02-14 00:00:00.000000000 Z
12
+ date: 2023-09-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - "~>"
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: '1.5'
21
21
  type: :development
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - "~>"
25
+ - - ">="
26
26
  - !ruby/object:Gem::Version
27
27
  version: '1.5'
28
28
  - !ruby/object:Gem::Dependency
@@ -62,7 +62,7 @@ dependencies:
62
62
  version: 1.0.4
63
63
  - - "<"
64
64
  - !ruby/object:Gem::Version
65
- version: '3'
65
+ version: '7'
66
66
  type: :runtime
67
67
  prerelease: false
68
68
  version_requirements: !ruby/object:Gem::Requirement
@@ -72,7 +72,7 @@ dependencies:
72
72
  version: 1.0.4
73
73
  - - "<"
74
74
  - !ruby/object:Gem::Version
75
- version: '3'
75
+ version: '7'
76
76
  - !ruby/object:Gem::Dependency
77
77
  name: kafo_parsers
78
78
  requirement: !ruby/object:Gem::Requirement
@@ -96,7 +96,7 @@ dependencies:
96
96
  version: '0.99'
97
97
  - - "<"
98
98
  - !ruby/object:Gem::Version
99
- version: '3'
99
+ version: '5'
100
100
  type: :runtime
101
101
  prerelease: false
102
102
  version_requirements: !ruby/object:Gem::Requirement
@@ -106,7 +106,7 @@ dependencies:
106
106
  version: '0.99'
107
107
  - - "<"
108
108
  - !ruby/object:Gem::Version
109
- version: '3'
109
+ version: '5'
110
110
  description: Validates Puppet modules and manifests to ensure parameters are all correctly
111
111
  documented for use with the Kafo gem
112
112
  email:
@@ -117,8 +117,8 @@ executables:
117
117
  extensions: []
118
118
  extra_rdoc_files: []
119
119
  files:
120
+ - ".github/workflows/ci.yml"
120
121
  - ".gitignore"
121
- - ".travis.yml"
122
122
  - Gemfile
123
123
  - LICENSE.txt
124
124
  - README.md
@@ -135,11 +135,11 @@ files:
135
135
  - test/manifest_factory.rb
136
136
  - test/manifest_file_factory.rb
137
137
  - test/test_helper.rb
138
- homepage: https://github.com/ekohl/kafo_module_lint
138
+ homepage: https://github.com/theforeman/kafo_module_lint
139
139
  licenses:
140
140
  - GPLv3+
141
141
  metadata: {}
142
- post_install_message:
142
+ post_install_message:
143
143
  rdoc_options: []
144
144
  require_paths:
145
145
  - lib
@@ -154,9 +154,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
154
154
  - !ruby/object:Gem::Version
155
155
  version: '0'
156
156
  requirements: []
157
- rubyforge_project:
158
- rubygems_version: 2.7.6
159
- signing_key:
157
+ rubygems_version: 3.4.10
158
+ signing_key:
160
159
  specification_version: 4
161
160
  summary: Validate Puppet modules are correctly documented for Kafo
162
161
  test_files:
data/.travis.yml DELETED
@@ -1,10 +0,0 @@
1
- language: ruby
2
- matrix:
3
- include:
4
- - rvm: 2.1.9
5
- env: PUPPET_VERSION=4.0
6
- - rvm: 2.4.1
7
- env: PUPPET_VERSION=5.0
8
- - rvm: 2.5.1
9
- env: PUPPET_VERSION=6.0
10
- script: rake test