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 +4 -4
- data/lib/checky/validators/all.rb +1 -1
- data/lib/checky/validators/binary.rb +3 -7
- data/lib/checky/validators/verbose.rb +2 -2
- data/lib/checky/validators/version.rb +2 -6
- data/lib/checky/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5c7632f5e923a3db7eeca0cde073ec14a11037d9
|
|
4
|
+
data.tar.gz: 121f40694b9a98c7633e94b8d98adff71d450427
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
16
|
-
"Checking for #{
|
|
11
|
+
def message
|
|
12
|
+
"Checking for #{storage.binary}"
|
|
17
13
|
end
|
|
18
14
|
end
|
|
19
15
|
end
|
|
@@ -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
|
|
23
|
-
"Checking #{
|
|
18
|
+
def message
|
|
19
|
+
"Checking #{storage.binary} version against #{storage.version}"
|
|
24
20
|
end
|
|
25
21
|
|
|
26
22
|
module_function :version_string
|
data/lib/checky/version.rb
CHANGED
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.
|
|
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
|
+
date: 2016-10-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Dependencies checker for CLI tools
|
|
14
14
|
email:
|