judges 0.57.2 → 0.57.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 +4 -4
- data/Gemfile.lock +6 -6
- data/features/test.feature +2 -2
- data/judges.gemspec +1 -1
- data/lib/judges/commands/update.rb +2 -4
- data/lib/judges/commands/upload.rb +6 -1
- data/lib/judges.rb +1 -1
- 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: b995a5bc4afe05488b0261012335596fdeb046103bc626466fe094a75aaefe0d
|
|
4
|
+
data.tar.gz: 76bfaa700b489cf33e0830791bb1293d1418b0c3c373d30669d41f88f5f15691
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6aba33eabad340cb860a8fabc49e8707fe2bb700b626585e27bde8c1927da3031b5c04fb6ec97eb5aaa1af43fccc81759e0dc38291b3a58a142ca631cf970ecc
|
|
7
|
+
data.tar.gz: e9e395a105fe5b7794be9c1533279bd18b53c42807dd85f2e39bbe14064ada5f80fb78040ea750fa0939c12d29d1f825934063b6fc345bccfac7be66fa7c27d2
|
data/Gemfile.lock
CHANGED
|
@@ -22,13 +22,13 @@ PATH
|
|
|
22
22
|
GEM
|
|
23
23
|
remote: https://rubygems.org/
|
|
24
24
|
specs:
|
|
25
|
-
addressable (2.8.
|
|
26
|
-
public_suffix (>= 2.0.2, <
|
|
25
|
+
addressable (2.8.8)
|
|
26
|
+
public_suffix (>= 2.0.2, < 8.0)
|
|
27
27
|
ansi (1.5.0)
|
|
28
28
|
ast (2.4.3)
|
|
29
29
|
backtrace (0.4.1)
|
|
30
30
|
base64 (0.3.0)
|
|
31
|
-
baza.rb (0.11.
|
|
31
|
+
baza.rb (0.11.1)
|
|
32
32
|
backtrace (~> 0.4)
|
|
33
33
|
elapsed (~> 0.2)
|
|
34
34
|
faraday (~> 2.13)
|
|
@@ -70,7 +70,7 @@ GEM
|
|
|
70
70
|
cucumber-html-formatter (21.15.1)
|
|
71
71
|
cucumber-messages (> 19, < 28)
|
|
72
72
|
cucumber-messages (27.2.0)
|
|
73
|
-
cucumber-tag-expressions (8.
|
|
73
|
+
cucumber-tag-expressions (8.1.0)
|
|
74
74
|
decoor (0.1.0)
|
|
75
75
|
diff-lcs (1.6.2)
|
|
76
76
|
docile (1.4.1)
|
|
@@ -81,7 +81,7 @@ GEM
|
|
|
81
81
|
ethon (0.18.0)
|
|
82
82
|
ffi (>= 1.15.0)
|
|
83
83
|
logger
|
|
84
|
-
factbase (0.
|
|
84
|
+
factbase (0.17.0)
|
|
85
85
|
backtrace (~> 0.4)
|
|
86
86
|
decoor (~> 0.1)
|
|
87
87
|
ellipsized (~> 0.3)
|
|
@@ -166,7 +166,7 @@ GEM
|
|
|
166
166
|
ast (~> 2.4.1)
|
|
167
167
|
racc
|
|
168
168
|
prism (1.6.0)
|
|
169
|
-
public_suffix (
|
|
169
|
+
public_suffix (7.0.0)
|
|
170
170
|
qbash (0.4.8)
|
|
171
171
|
backtrace (> 0)
|
|
172
172
|
elapsed (> 0)
|
data/features/test.feature
CHANGED
|
@@ -16,9 +16,9 @@ Feature: Test
|
|
|
16
16
|
And Exit code is zero
|
|
17
17
|
|
|
18
18
|
Scenario: Factbase version can be set
|
|
19
|
-
When I run bin/judges with "--factbase 0.
|
|
19
|
+
When I run bin/judges with "--factbase 0.17.0 --verbose test --judge guess ./fixtures"
|
|
20
20
|
Then Exit code is zero
|
|
21
|
-
And Stdout contains "Factbase version to be used: '0.
|
|
21
|
+
And Stdout contains "Factbase version to be used: '0.17.0'"
|
|
22
22
|
|
|
23
23
|
Scenario: Simple test of no judges
|
|
24
24
|
Given I run bin/judges with "test --judge absent_for_sure ./fixtures"
|
data/judges.gemspec
CHANGED
|
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
|
|
|
9
9
|
s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
|
|
10
10
|
s.required_ruby_version = '>=3.2'
|
|
11
11
|
s.name = 'judges'
|
|
12
|
-
s.version = '0.57.
|
|
12
|
+
s.version = '0.57.3'
|
|
13
13
|
s.license = 'MIT'
|
|
14
14
|
s.summary = 'Command-Line Tool for a Factbase'
|
|
15
15
|
s.description =
|
|
@@ -72,7 +72,7 @@ class Judges::Update
|
|
|
72
72
|
)
|
|
73
73
|
begin
|
|
74
74
|
Timeout.timeout(opts['lifetime']) do
|
|
75
|
-
loop_them(
|
|
75
|
+
loop_them(judges, fb, opts, options)
|
|
76
76
|
end
|
|
77
77
|
rescue Timeout::Error, Timeout::ExitException => e
|
|
78
78
|
@loog.error("Terminated due to --lifetime=#{opts['lifetime']}")
|
|
@@ -85,7 +85,7 @@ class Judges::Update
|
|
|
85
85
|
|
|
86
86
|
private
|
|
87
87
|
|
|
88
|
-
def loop_them(
|
|
88
|
+
def loop_them(judges, fb, opts, options)
|
|
89
89
|
c = 0
|
|
90
90
|
churn = Factbase::Churn.new
|
|
91
91
|
errors = []
|
|
@@ -112,7 +112,6 @@ class Judges::Update
|
|
|
112
112
|
end
|
|
113
113
|
delta = cycle(opts, judges, fb, options, errors, statistics)
|
|
114
114
|
churn += delta
|
|
115
|
-
impex.export(fb)
|
|
116
115
|
if delta.zero?
|
|
117
116
|
@loog.info("The update cycle ##{c} has made no changes to the factbase, let's stop")
|
|
118
117
|
break
|
|
@@ -132,7 +131,6 @@ class Judges::Update
|
|
|
132
131
|
statistics&.report(@loog)
|
|
133
132
|
return unless %w[add append].include?(opts['summary'])
|
|
134
133
|
summarize(fb, churn, errors, c)
|
|
135
|
-
impex.export(fb)
|
|
136
134
|
end
|
|
137
135
|
|
|
138
136
|
# Update the summary.
|
|
@@ -44,11 +44,16 @@ class Judges::Upload
|
|
|
44
44
|
elapsed(@loog, level: Logger::INFO) do
|
|
45
45
|
id = baza.durable_find(jname, name)
|
|
46
46
|
if id.nil? || id.to_s.strip.empty?
|
|
47
|
-
Dir.
|
|
47
|
+
# Block form of Dir.mkdir causes error Errno::EACCESS on windows
|
|
48
|
+
# so we use non-block form
|
|
49
|
+
tmp = Dir.mktmpdir
|
|
50
|
+
begin
|
|
48
51
|
f = File.join(tmp, name)
|
|
49
52
|
File.write(f, 'placeholder')
|
|
50
53
|
id = baza.durable_place(jname, f)
|
|
51
54
|
@loog.info("Placed a placeholder to new durable '#{name}' in '#{jname}' (ID: #{id})")
|
|
55
|
+
ensure
|
|
56
|
+
FileUtils.rm_rf(tmp, secure: true)
|
|
52
57
|
end
|
|
53
58
|
end
|
|
54
59
|
size = File.size(path)
|
data/lib/judges.rb
CHANGED