checky 0.1.1 → 0.1.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
  SHA1:
3
- metadata.gz: 80c1f66eba4f7e739c54c85b9a67b5d52275aecb
4
- data.tar.gz: abf43bf453c897d66fc9e85c8ce5c16134250f49
3
+ metadata.gz: 5c7632f5e923a3db7eeca0cde073ec14a11037d9
4
+ data.tar.gz: 121f40694b9a98c7633e94b8d98adff71d450427
5
5
  SHA512:
6
- metadata.gz: e011acd58dce4473b0ffd2c88826fdae2c5009c4e6f8fb3c788bdbe0f804c53a1d725a6addceb56ecce7e7f32eb142afbf5145aab2c0b8cadff2ffa5d029d0d6
7
- data.tar.gz: 0adfbc6bfb41059d2b2f75026a408193ef8e36313d0909ba40cd608b77f1291a2d01b9398dfc0cc4004e1c671489497824c8d18b0405c2380c3723f516d1f341
6
+ metadata.gz: 3fdfade0a5872da467a1fefb90a902945e6cd97a499f82f8e33a917b867d16486f4fa8f3784398260e36bcff83ea8f715b4b4981034d7ecd21adaf3b1031950e
7
+ data.tar.gz: a87e717b2606e601c6df8f0ca81be0d2af53ead1b441c5b53bc514f9ff06d368653aa3e697816e561f46d378bc12dbf13602b409710b36d74e41e404d62dfc14
@@ -21,7 +21,7 @@ Checky::Validators.constants.each do |child|
21
21
 
22
22
  Checky::Validators::All.send(:define_method, "populate_#{child.to_s.underscore}") do |*args, &block|
23
23
  validator = Object.const_get("Checky::Validators::#{child}")
24
- data = validator.respond_to?(:populate) ? validator.populate(*args, &block) : true
24
+ data = validator.respond_to?(:populate) ? validator.populate(*args, &block) : (args.first || true)
25
25
  @storage.send("#{child.to_s.underscore}=", data)
26
26
  end
27
27
 
@@ -3,17 +3,13 @@ module Checky
3
3
  module Validators
4
4
  module Binary
5
5
  # :reek:UtilityFunction
6
- def populate(command)
7
- command.which.to_s
8
- end
9
-
10
6
  def check
11
- !storage.binary.empty?
7
+ !storage.binary.which.to_s.empty?
12
8
  end
13
9
 
14
10
  # :reek:UtilityFunction
15
- def message(value)
16
- "Checking for #{File.basename(value)}"
11
+ def message
12
+ "Checking for #{storage.binary}"
17
13
  end
18
14
  end
19
15
  end
@@ -26,8 +26,8 @@ module Checky
26
26
 
27
27
  # :nocov:
28
28
  message = begin
29
- mod.message(value)
30
- rescue
29
+ mod.message
30
+ rescue NoMethodError
31
31
  "Checking #{key} (#{value})"
32
32
  end
33
33
  # :nocov:
@@ -2,10 +2,6 @@
2
2
  module Checky
3
3
  module Validators
4
4
  module Version
5
- def populate(requirement_string)
6
- requirement_string
7
- end
8
-
9
5
  def check
10
6
  version = Gem::Version.new(version_string)
11
7
  requirement = Gem::Requirement.new(storage.version)
@@ -19,8 +15,8 @@ module Checky
19
15
  command_output[/[0-9]+(?:\.[0-9]+)+/]
20
16
  end
21
17
 
22
- def message(value)
23
- "Checking #{File.basename(storage.binary)} version against #{value}"
18
+ def message
19
+ "Checking #{storage.binary} version against #{storage.version}"
24
20
  end
25
21
 
26
22
  module_function :version_string
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Checky
3
- VERSION = '0.1.1'
3
+ VERSION = '0.1.2'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: checky
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Rzegocki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-11 00:00:00.000000000 Z
11
+ date: 2016-10-19 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Dependencies checker for CLI tools
14
14
  email: