kafo_module_lint 1.0.3 → 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
- SHA1:
3
- metadata.gz: 9c285125a038cce483729df9188bd172b5726ac9
4
- data.tar.gz: 420ccb4ce680e879cbd35f691c9843dc0ac58ea5
2
+ SHA256:
3
+ metadata.gz: 5e9303574a6565439ad613c83c22e8b4c5bbef9980940e8171fe15c617d3b174
4
+ data.tar.gz: 6294796f898c2a08c0978c358c4505b23073187fa3b02ccc4be2ed7651158ba5
5
5
  SHA512:
6
- metadata.gz: f616f78859543f3dcde4221c112bb00a6bc0aababf77f4b1e624b0f8f3974653f3f5c48b8dc88e23f8dbce97c16ae547415028cbbf3cb487166a1ff9ac7c0348
7
- data.tar.gz: 4b9327b1a5a3324163c92506fcde9807bfeda0b0c610c6c8414dde401bb8a177b7af861d866ba55d4bff947a02773d111a98042b838c0f64d82d06193938ce9d
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}" : '< 5.0.0'
7
- gem 'puppet', puppet_spec
5
+ gem 'puppet', ENV.fetch('PUPPET_GEM_VERSION', '< 9')
data/README.md CHANGED
@@ -10,7 +10,7 @@ Add this line to your module's Gemfile:
10
10
 
11
11
  gem 'kafo_module_lint', '~> 1.0'
12
12
 
13
- It's highly recommended to also include the [puppet-lint-param-docs](https://github.com/domcleal/puppet-lint-param-docs)
13
+ It's highly recommended to also include the [puppet-lint-param-docs](https://github.com/voxpupuli/puppet-lint-param-docs)
14
14
  lint plugin to ensure _all_ parameters are documented:
15
15
 
16
16
  gem 'puppet-lint-param-docs'
@@ -4,11 +4,11 @@ require File.join(File.expand_path(File.dirname(__FILE__)), 'lib', 'kafo_module_
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = "kafo_module_lint"
6
6
  spec.version = KafoModuleLint::VERSION
7
- spec.authors = ["Dominic Cleal"]
8
- spec.email = ["dominic@cleal.org"]
7
+ spec.authors = ["Dominic Cleal", "Ewoud Kohl van Wijngaarden"]
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/domcleal/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', '< 2'
23
+ spec.add_dependency 'kafo', '>= 1.0.4', '< 7'
24
24
  spec.add_dependency 'kafo_parsers'
25
- spec.add_dependency 'puppet-strings', '>= 0.99', '< 2'
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.0.3"
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,27 +1,28 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kafo_module_lint
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominic Cleal
8
- autorequire:
8
+ - Ewoud Kohl van Wijngaarden
9
+ autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2016-11-24 00:00:00.000000000 Z
12
+ date: 2023-09-28 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: bundler
15
16
  requirement: !ruby/object:Gem::Requirement
16
17
  requirements:
17
- - - "~>"
18
+ - - ">="
18
19
  - !ruby/object:Gem::Version
19
20
  version: '1.5'
20
21
  type: :development
21
22
  prerelease: false
22
23
  version_requirements: !ruby/object:Gem::Requirement
23
24
  requirements:
24
- - - "~>"
25
+ - - ">="
25
26
  - !ruby/object:Gem::Version
26
27
  version: '1.5'
27
28
  - !ruby/object:Gem::Dependency
@@ -61,7 +62,7 @@ dependencies:
61
62
  version: 1.0.4
62
63
  - - "<"
63
64
  - !ruby/object:Gem::Version
64
- version: '2'
65
+ version: '7'
65
66
  type: :runtime
66
67
  prerelease: false
67
68
  version_requirements: !ruby/object:Gem::Requirement
@@ -71,7 +72,7 @@ dependencies:
71
72
  version: 1.0.4
72
73
  - - "<"
73
74
  - !ruby/object:Gem::Version
74
- version: '2'
75
+ version: '7'
75
76
  - !ruby/object:Gem::Dependency
76
77
  name: kafo_parsers
77
78
  requirement: !ruby/object:Gem::Requirement
@@ -95,7 +96,7 @@ dependencies:
95
96
  version: '0.99'
96
97
  - - "<"
97
98
  - !ruby/object:Gem::Version
98
- version: '2'
99
+ version: '5'
99
100
  type: :runtime
100
101
  prerelease: false
101
102
  version_requirements: !ruby/object:Gem::Requirement
@@ -105,18 +106,19 @@ dependencies:
105
106
  version: '0.99'
106
107
  - - "<"
107
108
  - !ruby/object:Gem::Version
108
- version: '2'
109
+ version: '5'
109
110
  description: Validates Puppet modules and manifests to ensure parameters are all correctly
110
111
  documented for use with the Kafo gem
111
112
  email:
112
113
  - dominic@cleal.org
114
+ - ewoud+rubygems@kohlvanwijngaarden.nl
113
115
  executables:
114
116
  - kafo-module-lint
115
117
  extensions: []
116
118
  extra_rdoc_files: []
117
119
  files:
120
+ - ".github/workflows/ci.yml"
118
121
  - ".gitignore"
119
- - ".travis.yml"
120
122
  - Gemfile
121
123
  - LICENSE.txt
122
124
  - README.md
@@ -133,11 +135,11 @@ files:
133
135
  - test/manifest_factory.rb
134
136
  - test/manifest_file_factory.rb
135
137
  - test/test_helper.rb
136
- homepage: https://github.com/domcleal/kafo_module_lint
138
+ homepage: https://github.com/theforeman/kafo_module_lint
137
139
  licenses:
138
140
  - GPLv3+
139
141
  metadata: {}
140
- post_install_message:
142
+ post_install_message:
141
143
  rdoc_options: []
142
144
  require_paths:
143
145
  - lib
@@ -152,9 +154,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
152
154
  - !ruby/object:Gem::Version
153
155
  version: '0'
154
156
  requirements: []
155
- rubyforge_project:
156
- rubygems_version: 2.2.2
157
- signing_key:
157
+ rubygems_version: 3.4.10
158
+ signing_key:
158
159
  specification_version: 4
159
160
  summary: Validate Puppet modules are correctly documented for Kafo
160
161
  test_files:
data/.travis.yml DELETED
@@ -1,13 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.1.5
5
- - 2.3.1
6
- env:
7
- - PUPPET_VERSION=3.8
8
- - PUPPET_VERSION=4.0
9
- matrix:
10
- exclude:
11
- - rvm: 2.3.1
12
- env: PUPPET_VERSION=3.8
13
- script: rake test