judges 0.53.7 → 0.53.9
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 +12 -12
- data/features/test.feature +2 -2
- data/features/update.feature +1 -1
- data/judges.gemspec +1 -1
- data/lib/judges/commands/update.rb +2 -0
- data/lib/judges/commands/upload.rb +13 -11
- 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: 60034ea48fc61859326f81b86d8cd41961a0dffc2ffbee2517e5045e2038d9c6
|
4
|
+
data.tar.gz: c20e1a6c297801c9a297e298fa3647327994e68fed1372bdc91b94e1bbea0df6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1f0a903fc6a01db440613f958b157ba3b44500c632aa4433cd0683b3227f28ffb24ed7b2d1d6a63e76e95ec7993a132c514b85931e39af152d680bf605ba784
|
7
|
+
data.tar.gz: 8c7ed1d12b3e7c3c8b96210256044bd2068d4e2aae5d061a83b42863091e1774ef735707dc0a191fddf31758dc2547cd336e4078054046d3ce40974c77059c9e
|
data/Gemfile.lock
CHANGED
@@ -80,7 +80,7 @@ GEM
|
|
80
80
|
ellipsized (0.3.0)
|
81
81
|
ethon (0.17.0)
|
82
82
|
ffi (>= 1.15.0)
|
83
|
-
factbase (0.16.
|
83
|
+
factbase (0.16.7)
|
84
84
|
backtrace (~> 0.4)
|
85
85
|
decoor (~> 0.1)
|
86
86
|
ellipsized (~> 0.3)
|
@@ -137,23 +137,23 @@ GEM
|
|
137
137
|
multipart-post (2.4.1)
|
138
138
|
net-http (0.6.0)
|
139
139
|
uri
|
140
|
-
nokogiri (1.18.
|
140
|
+
nokogiri (1.18.10-aarch64-linux-gnu)
|
141
141
|
racc (~> 1.4)
|
142
|
-
nokogiri (1.18.
|
142
|
+
nokogiri (1.18.10-aarch64-linux-musl)
|
143
143
|
racc (~> 1.4)
|
144
|
-
nokogiri (1.18.
|
144
|
+
nokogiri (1.18.10-arm-linux-gnu)
|
145
145
|
racc (~> 1.4)
|
146
|
-
nokogiri (1.18.
|
146
|
+
nokogiri (1.18.10-arm-linux-musl)
|
147
147
|
racc (~> 1.4)
|
148
|
-
nokogiri (1.18.
|
148
|
+
nokogiri (1.18.10-arm64-darwin)
|
149
149
|
racc (~> 1.4)
|
150
|
-
nokogiri (1.18.
|
150
|
+
nokogiri (1.18.10-x64-mingw-ucrt)
|
151
151
|
racc (~> 1.4)
|
152
|
-
nokogiri (1.18.
|
152
|
+
nokogiri (1.18.10-x86_64-darwin)
|
153
153
|
racc (~> 1.4)
|
154
|
-
nokogiri (1.18.
|
154
|
+
nokogiri (1.18.10-x86_64-linux-gnu)
|
155
155
|
racc (~> 1.4)
|
156
|
-
nokogiri (1.18.
|
156
|
+
nokogiri (1.18.10-x86_64-linux-musl)
|
157
157
|
racc (~> 1.4)
|
158
158
|
online (0.1.0)
|
159
159
|
timeout (~> 0.4)
|
@@ -164,7 +164,7 @@ GEM
|
|
164
164
|
parser (3.3.9.0)
|
165
165
|
ast (~> 2.4.1)
|
166
166
|
racc
|
167
|
-
prism (1.
|
167
|
+
prism (1.5.1)
|
168
168
|
public_suffix (6.0.2)
|
169
169
|
qbash (0.4.5)
|
170
170
|
backtrace (> 0)
|
@@ -176,7 +176,7 @@ GEM
|
|
176
176
|
rake (13.3.0)
|
177
177
|
random-port (0.7.5)
|
178
178
|
tago (> 0)
|
179
|
-
regexp_parser (2.11.
|
179
|
+
regexp_parser (2.11.3)
|
180
180
|
retries (0.0.5)
|
181
181
|
rexml (3.4.4)
|
182
182
|
rubocop (1.80.2)
|
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.16.
|
19
|
+
When I run bin/judges with "--factbase 0.16.7 --verbose test --judge guess ./fixtures"
|
20
20
|
Then Exit code is zero
|
21
|
-
And Stdout contains "Factbase version to be used: '0.16.
|
21
|
+
And Stdout contains "Factbase version to be used: '0.16.7'"
|
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/features/update.feature
CHANGED
@@ -94,7 +94,7 @@ Feature: Update
|
|
94
94
|
Then I run bin/judges with "--verbose update --timeout 1 --quiet . foo.fb"
|
95
95
|
Then Stdout contains "execution expired"
|
96
96
|
Then Stdout contains "1 judge(s) processed"
|
97
|
-
Then Stdout contains "Update completed in 1 cycle(s), did
|
97
|
+
Then Stdout contains "Update completed in 1 cycle(s), did nothing"
|
98
98
|
And Exit code is zero
|
99
99
|
|
100
100
|
Scenario: Simple run of a few judges, with a lib
|
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.53.
|
12
|
+
s.version = '0.53.9'
|
13
13
|
s.license = 'MIT'
|
14
14
|
s.summary = 'Command-Line Tool for a Factbase'
|
15
15
|
s.description =
|
@@ -74,6 +74,7 @@ class Judges::Update
|
|
74
74
|
loop_them(impex, judges, fb, opts, options)
|
75
75
|
end
|
76
76
|
rescue Timeout::Error, Timeout::ExitException => e
|
77
|
+
@loog.error("Terminated due to --lifetime=#{opts['lifetime']}")
|
77
78
|
raise e unless opts['quiet']
|
78
79
|
@loog.info("Had to stop due to the --lifetime=#{opts['lifetime']}")
|
79
80
|
ensure
|
@@ -238,6 +239,7 @@ class Judges::Update
|
|
238
239
|
judge.run(fb, global, local, options)
|
239
240
|
end
|
240
241
|
rescue Timeout::Error, Timeout::ExitException => e
|
242
|
+
@loog.error("Terminated due to --timeout=#{opts['timeout']}")
|
241
243
|
errors << "Judge #{judge.name} stopped by timeout after #{start.ago}: #{e.message}"
|
242
244
|
end
|
243
245
|
fb.churn
|
@@ -9,7 +9,7 @@ require 'baza-rb'
|
|
9
9
|
require 'elapsed'
|
10
10
|
require_relative '../../judges'
|
11
11
|
|
12
|
-
# The +upload+ command.
|
12
|
+
# The +upload+ command, to send a durable to Zerocracy.
|
13
13
|
#
|
14
14
|
# This class is instantiated by the +bin/judge+ command line interface. You
|
15
15
|
# are not supposed to instantiate it yourself.
|
@@ -45,18 +45,20 @@ class Judges::Upload
|
|
45
45
|
id = baza.durable_find(jname, name)
|
46
46
|
size = File.size(path)
|
47
47
|
if id.nil? || id.to_s.strip.empty?
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
baza.durable_lock(id, opts['owner'] || 'default')
|
53
|
-
begin
|
54
|
-
baza.durable_save(id, path)
|
55
|
-
throw :"👍 Uploaded #{path} to existing durable '#{name}' in '#{jname}' (ID: #{id}, #{size} bytes)"
|
56
|
-
ensure
|
57
|
-
baza.durable_unlock(id, opts['owner'] || 'default')
|
48
|
+
Tempfile.create do |f|
|
49
|
+
File.write(f.path, 'placeholder')
|
50
|
+
id = baza.durable_place(jname, f.path)
|
51
|
+
@loog.info("Placed a placeholder to new durable '#{name}' in '#{jname}' (ID: #{id})")
|
58
52
|
end
|
59
53
|
end
|
54
|
+
id = id.to_i
|
55
|
+
baza.durable_lock(id, opts['owner'] || 'default')
|
56
|
+
begin
|
57
|
+
baza.durable_save(id, path)
|
58
|
+
throw :"👍 Uploaded #{path} to existing durable '#{name}' in '#{jname}' (ID: #{id}, #{size} bytes)"
|
59
|
+
ensure
|
60
|
+
baza.durable_unlock(id, opts['owner'] || 'default')
|
61
|
+
end
|
60
62
|
end
|
61
63
|
end
|
62
64
|
end
|
data/lib/judges.rb
CHANGED