kafo_module_lint 1.0.0 → 1.0.1

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
  SHA1:
3
- metadata.gz: 1283e02c02e308d1681e4972d88e845a78e09273
4
- data.tar.gz: e77484bd6e602117552f193aec6b3e38dc317bdf
3
+ metadata.gz: 752b9e1a6d3cd3ef1e00ceba3b59a434fd3f934f
4
+ data.tar.gz: 8d2572d6b70764a308ce9661221b4b715a0263df
5
5
  SHA512:
6
- metadata.gz: 5efe99733dcf8cecf8c1cb624b66bd201f0bfbeb212110fbaae478ce8c117ba3476c7eadfe79e0719852eeb3508e55746f47a02f30cb8e2996687d17c45e522d
7
- data.tar.gz: 2a59d7b1894885776d13dfec9be65e1d533129a6b2951e8e42a0d5e20f55c38310d366a0c955f26bcadce63a99eb536ede01a7f32d52a48559bdf016466910e1
6
+ metadata.gz: 9bbe2cb56ca7ed23a6d1d5b5bbf8aedb500d8809d4e0389fed4f6d8ae5fab6e179ed7cef7143130b8cea2e7af8584a53dd6422745f5d7f537ff1f1e839424f2a
7
+ data.tar.gz: 1e4621a943b6abe4aebeffb52add2ed07b29ec112f35f108c8cd3a671b47472965483d14ac65bfbc06f8982091e9d5e7e3c4a77d9aba88b2524ad7575e218bfa
@@ -44,7 +44,7 @@ module KafoModuleLint
44
44
  Kafo::DataType.new_from_string(type)
45
45
  true
46
46
  rescue Kafo::ConfigurationException => e
47
- errors << "#{path}: parameter #{param} has an invalid type #{type}: #{e.message}"
47
+ errors << "#{path} parameter #{param}: #{e.message}"
48
48
  false
49
49
  end
50
50
  end
@@ -23,7 +23,9 @@ module KafoModuleLint
23
23
  task_block.call(*[self, args].slice(0, task_block.arity)) if task_block
24
24
 
25
25
  Rake::Task[name].clear if Rake::Task.task_defined?(name)
26
- task name do
26
+
27
+ definition = Rake::Task.task_defined?('spec_prep') ? {name => [:'spec_prep']} : name
28
+ task definition do
27
29
  RakeFileUtils.send(:verbose, true) do
28
30
  result = true
29
31
  TypeLoader.new(modulepath).with_types do
@@ -1,3 +1,3 @@
1
1
  module KafoModuleLint
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
@@ -28,7 +28,7 @@ module KafoModuleLint
28
28
 
29
29
  describe "manifest with unknown param" do
30
30
  let(:manifest) { ManifestFactory.build({'a' => 'String', 'b' => 'Unknown[String]'}) }
31
- let(:error) { "#{manifest_file}: parameter b has an invalid type Unknown[String]: unknown data type Unknown" }
31
+ let(:error) { "#{manifest_file} parameter b: unknown data type Unknown" }
32
32
  specify { exit_code.success?.must_equal false }
33
33
  specify { stdout.must_equal (error + $/) }
34
34
  specify { stderr.must_equal '' }
@@ -22,7 +22,7 @@ module KafoModuleLint
22
22
 
23
23
  describe "with unknown param" do
24
24
  let(:manifest) { ManifestFactory.build({'a' => 'String', 'b' => 'Unknown[String]'}) }
25
- let(:error) { "#{manifest_file}: parameter b has an invalid type Unknown[String]: unknown data type Unknown" }
25
+ let(:error) { "#{manifest_file} parameter b: unknown data type Unknown" }
26
26
  specify { linter.pass?.must_equal false }
27
27
  specify { linter.errors.must_equal [error] }
28
28
  specify { proc { linter.puts_errors }.must_output (error + $/) }
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.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominic Cleal