kafo_module_lint 1.0.2 → 1.0.3

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
  SHA1:
3
- metadata.gz: 3e95e511f9b75a6c8e88f407a5ae3dc6f34bc49c
4
- data.tar.gz: 5674891c5698c9be89b5f392bf64d1f67a7f4ed4
3
+ metadata.gz: 9c285125a038cce483729df9188bd172b5726ac9
4
+ data.tar.gz: 420ccb4ce680e879cbd35f691c9843dc0ac58ea5
5
5
  SHA512:
6
- metadata.gz: b91ec3fe9bb3d4fd39271d96c9f628e47ef4ef3d5a61c2b6611fa3085407d3c67c0653c4446a119fe45dc1a9f21740b28346d54f9758f2bc59324a1fada4a14b
7
- data.tar.gz: 66b0f4838a7b9c2d66477767ebb45fc2ddba43d8b01a7a52c1df5b5ad59a3711b0a6f68f74b2c5886865918d4a427f7854e9a89ff2d4bf6a0ce37c4ede1d6b1f
6
+ metadata.gz: f616f78859543f3dcde4221c112bb00a6bc0aababf77f4b1e624b0f8f3974653f3f5c48b8dc88e23f8dbce97c16ae547415028cbbf3cb487166a1ff9ac7c0348
7
+ data.tar.gz: 4b9327b1a5a3324163c92506fcde9807bfeda0b0c610c6c8414dde401bb8a177b7af861d866ba55d4bff947a02773d111a98042b838c0f64d82d06193938ce9d
@@ -43,7 +43,7 @@ module KafoModuleLint
43
43
  begin
44
44
  Kafo::DataType.new_from_string(type)
45
45
  true
46
- rescue Kafo::ConfigurationException => e
46
+ rescue Kafo::ConfigurationException, ArgumentError => e
47
47
  errors << "#{path} parameter #{param}: #{e.message}"
48
48
  false
49
49
  end
@@ -1,3 +1,3 @@
1
1
  module KafoModuleLint
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
@@ -46,5 +46,12 @@ module KafoModuleLint
46
46
  specify { linter.errors.must_equal [] }
47
47
  specify { proc { linter.puts_errors }.must_output nil }
48
48
  end
49
+
50
+ describe "with wrong argument count" do
51
+ let(:manifest) { ManifestFactory.build({'a' => 'String', 'b' => 'Undef["foo"]'}) }
52
+ let(:error) { /#{Regexp.escape(manifest_file)} parameter b: wrong number of arguments \(.*1.*0.*\)/ }
53
+ specify { linter.pass?.must_equal false }
54
+ specify { linter.errors.first.must_match error }
55
+ end
49
56
  end
50
57
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kafo_module_lint
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominic Cleal
@@ -153,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
153
153
  version: '0'
154
154
  requirements: []
155
155
  rubyforge_project:
156
- rubygems_version: 2.6.8
156
+ rubygems_version: 2.2.2
157
157
  signing_key:
158
158
  specification_version: 4
159
159
  summary: Validate Puppet modules are correctly documented for Kafo