judges 0.0.21 → 0.0.22
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/bin/judges +3 -1
- data/features/cli.feature +2 -2
- data/judges.gemspec +1 -1
- data/lib/judges/commands/update.rb +8 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c7b4a80762cb37240925afe0778c87a829f891a4e5a3a3fb7f22ccc3802c1a3a
|
4
|
+
data.tar.gz: 914e85bda9dea1030a06fde8a635d1452ae73c0d3e736e8ef04164cd692df378
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2fb32730607a2b122391447f7bd371f9b1d318d4c6be50ae1bf2d3bcd46c80561ac1ebe792824909cfa8f7fbd4edda17404e41b2510b9ab25c750fcb34f836ef
|
7
|
+
data.tar.gz: 6f6fa5d67867c3f0abb8b54e65d59aedbfa607abde5ca1336505001d35c916c8a928a4228393c2d5d22e2a341ed09afb2c199057389a966ce1f07326b7444e13
|
data/bin/judges
CHANGED
@@ -29,7 +29,7 @@ require 'factbase'
|
|
29
29
|
Encoding.default_external = Encoding::UTF_8
|
30
30
|
Encoding.default_internal = Encoding::UTF_8
|
31
31
|
|
32
|
-
ver = '0.0.
|
32
|
+
ver = '0.0.22'
|
33
33
|
|
34
34
|
include GLI::App
|
35
35
|
|
@@ -60,6 +60,8 @@ command :update do |c|
|
|
60
60
|
c.flag([:o, :option], multiple: true, arg_name: '<key=value>')
|
61
61
|
c.desc 'Maximum number of update cycles to run'
|
62
62
|
c.flag([:'max-cycles'], default_value: 8, type: Integer)
|
63
|
+
c.desc 'Stay quiet even if some judges fail'
|
64
|
+
c.switch([:q, :quiet], default_value: false)
|
63
65
|
c.action do |global, options, args|
|
64
66
|
require_relative '../lib/judges/commands/update'
|
65
67
|
Judges::Update.new(loog).run(options, args)
|
data/features/cli.feature
CHANGED
@@ -17,10 +17,10 @@ Feature: Simple Run
|
|
17
17
|
n = $fb.insert
|
18
18
|
n.kind = 'yes!'
|
19
19
|
"""
|
20
|
-
Then I run bin/judges with "--verbose update -o foo=1 -o bar=2 --max-cycles 3 . simple.fb"
|
20
|
+
Then I run bin/judges with "--verbose update --quiet -o foo=1 -o bar=2 --max-cycles 3 . simple.fb"
|
21
21
|
Then Stdout contains "foo → "
|
22
22
|
Then Stdout contains "bar → "
|
23
|
-
Then Stdout contains "1
|
23
|
+
Then Stdout contains "1 judge(s) processed"
|
24
24
|
Then Stdout contains "Update finished in 3 cycles"
|
25
25
|
And Exit code is zero
|
26
26
|
|
data/judges.gemspec
CHANGED
@@ -26,7 +26,7 @@ Gem::Specification.new do |s|
|
|
26
26
|
s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
|
27
27
|
s.required_ruby_version = '>=3.2'
|
28
28
|
s.name = 'judges'
|
29
|
-
s.version = '0.0.
|
29
|
+
s.version = '0.0.22'
|
30
30
|
s.license = 'MIT'
|
31
31
|
s.summary = 'Command-Line Tool for a Factbase'
|
32
32
|
s.description = '
|
@@ -67,7 +67,7 @@ class Judges::Update
|
|
67
67
|
errors = []
|
68
68
|
diff = 0
|
69
69
|
done = packs.each_with_index do |p, i|
|
70
|
-
@loog.info("
|
70
|
+
@loog.info("👉 Running #{p.name} (##{i}) at #{p.dir.to_rel}...")
|
71
71
|
before = fb.size
|
72
72
|
begin
|
73
73
|
p.run(fb, options)
|
@@ -76,11 +76,15 @@ class Judges::Update
|
|
76
76
|
errors << p.script
|
77
77
|
end
|
78
78
|
after = fb.size
|
79
|
-
@loog.info("Pack #{p.dir.to_rel} added #{after - before} facts") if after > before
|
79
|
+
@loog.info("👍 Pack #{p.dir.to_rel} added #{after - before} facts") if after > before
|
80
80
|
diff += after - before
|
81
81
|
end
|
82
|
-
|
83
|
-
|
82
|
+
if errors.empty?
|
83
|
+
@loog.info("👍 #{done} judge(s) processed")
|
84
|
+
else
|
85
|
+
@loog.info("❌ #{done} judge(s) processed with #{errors.size} errors")
|
86
|
+
raise "Failed to update correctly (#{errors.size} errors)" unless opts['quiet']
|
87
|
+
end
|
84
88
|
impex.export(fb)
|
85
89
|
diff
|
86
90
|
end
|