judges 0.54.0 → 0.56.0

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
  SHA256:
3
- metadata.gz: 362db1ae173a36a6d70359dcb5302f0e9256399471857f45dfca0c8b56e74e72
4
- data.tar.gz: 383960c78930d7475d6750a994f83cfe514169c052090e7b2e7613119376cf77
3
+ metadata.gz: c1bce8cfaa9c1567d94332da48e35b303ec5b963198d72a82bf69164cbd1928d
4
+ data.tar.gz: 467ab5d5bab974f97be24720c3e44f15d353c38f2ecf553648431facb603864f
5
5
  SHA512:
6
- metadata.gz: 5e9e77e4a0f716c8efec912ba87aa5243617eed5a90c21f6402b6596f17ee888b8741956111f8e6cd6b426b34b32681c6f8dc9a6b2fc6f02de5077b921b55d5a
7
- data.tar.gz: ed95c04645d0c0521d1908a31c7ddad0481780faf31d709f8807340500b5ef8badbee8f9994816549a4213e43b6f472e6e3c57af2ac4a0c093a9fe3dde6afd1a
6
+ metadata.gz: dfd3eb005e029e442b5c924620a897df19c974599122e6ae20f0369718f02b8b6171b852e32d408c5a27c766dac92260ad59e4420e14c5d8ccdcc5c8b4ca38b5
7
+ data.tar.gz: 66fbdd630846645475cab1daa36b326d92e37eeb08cf41c176b1a710e93d25acc3565b8bd4c43f6905e0bdb2752ac03dc609d6d5152e93b08b993b34463be0b2
data/Gemfile.lock CHANGED
@@ -28,7 +28,7 @@ GEM
28
28
  ast (2.4.3)
29
29
  backtrace (0.4.1)
30
30
  base64 (0.3.0)
31
- baza.rb (0.10.2)
31
+ baza.rb (0.11.0)
32
32
  backtrace (~> 0.4)
33
33
  elapsed (~> 0.2)
34
34
  faraday (~> 2.13)
@@ -40,13 +40,13 @@ GEM
40
40
  retries (~> 0.0)
41
41
  tago (~> 0.2)
42
42
  typhoeus (~> 1.4)
43
- bigdecimal (3.2.3)
43
+ bigdecimal (3.3.1)
44
44
  builder (3.3.0)
45
45
  concurrent-ruby (1.3.5)
46
- crack (1.0.0)
46
+ crack (1.0.1)
47
47
  bigdecimal
48
48
  rexml
49
- cucumber (10.1.0)
49
+ cucumber (10.1.1)
50
50
  base64 (~> 0.2)
51
51
  builder (~> 3.2)
52
52
  cucumber-ci-environment (> 9, < 11)
@@ -59,18 +59,18 @@ GEM
59
59
  multi_test (~> 1.1)
60
60
  sys-uname (~> 1.3)
61
61
  cucumber-ci-environment (10.0.1)
62
- cucumber-core (15.2.1)
63
- cucumber-gherkin (> 27, < 33)
62
+ cucumber-core (15.3.0)
63
+ cucumber-gherkin (> 27, < 35)
64
64
  cucumber-messages (> 26, < 30)
65
- cucumber-tag-expressions (> 5, < 7)
65
+ cucumber-tag-expressions (> 5, < 9)
66
66
  cucumber-cucumber-expressions (18.0.1)
67
67
  bigdecimal
68
- cucumber-gherkin (32.2.0)
69
- cucumber-messages (> 25, < 28)
68
+ cucumber-gherkin (34.0.0)
69
+ cucumber-messages (> 25, < 29)
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 (6.1.2)
73
+ cucumber-tag-expressions (8.0.0)
74
74
  decoor (0.1.0)
75
75
  diff-lcs (1.6.2)
76
76
  docile (1.4.1)
@@ -78,9 +78,10 @@ GEM
78
78
  loog (~> 0.6)
79
79
  tago (~> 0.1)
80
80
  ellipsized (0.3.0)
81
- ethon (0.17.0)
81
+ ethon (0.18.0)
82
82
  ffi (>= 1.15.0)
83
- factbase (0.16.7)
83
+ logger
84
+ factbase (0.16.8)
84
85
  backtrace (~> 0.4)
85
86
  decoor (~> 0.1)
86
87
  ellipsized (~> 0.3)
@@ -91,7 +92,7 @@ GEM
91
92
  others (~> 0.1)
92
93
  tago (~> 0.1)
93
94
  yaml (~> 0.3)
94
- faraday (2.13.4)
95
+ faraday (2.14.0)
95
96
  faraday-net_http (>= 2.0, < 3.5)
96
97
  json
97
98
  logger
@@ -99,8 +100,8 @@ GEM
99
100
  faraday (>= 0.8)
100
101
  faraday-multipart (1.1.1)
101
102
  multipart-post (~> 2.0)
102
- faraday-net_http (3.4.1)
103
- net-http (>= 0.5.0)
103
+ faraday-net_http (3.4.2)
104
+ net-http (~> 0.5)
104
105
  faraday-retry (2.3.2)
105
106
  faraday (~> 2.0)
106
107
  ffi (1.17.2-aarch64-linux-gnu)
@@ -116,7 +117,7 @@ GEM
116
117
  ostruct
117
118
  hashdiff (1.2.1)
118
119
  iri (0.11.2)
119
- json (2.13.2)
120
+ json (2.16.0)
120
121
  language_server-protocol (3.17.0.5)
121
122
  lint_roller (1.1.0)
122
123
  logger (1.7.0)
@@ -124,7 +125,7 @@ GEM
124
125
  logger (~> 1.0)
125
126
  memoist3 (1.0.0)
126
127
  mini_mime (1.1.5)
127
- minitest (5.25.5)
128
+ minitest (5.26.1)
128
129
  minitest-reporters (1.7.1)
129
130
  ansi
130
131
  builder
@@ -135,7 +136,7 @@ GEM
135
136
  moments (0.3.0)
136
137
  multi_test (1.1.0)
137
138
  multipart-post (2.4.1)
138
- net-http (0.6.0)
139
+ net-http (0.7.0)
139
140
  uri
140
141
  nokogiri (1.18.10-aarch64-linux-gnu)
141
142
  racc (~> 1.4)
@@ -161,25 +162,25 @@ GEM
161
162
  ostruct (0.6.3)
162
163
  others (0.1.1)
163
164
  parallel (1.27.0)
164
- parser (3.3.9.0)
165
+ parser (3.3.10.0)
165
166
  ast (~> 2.4.1)
166
167
  racc
167
- prism (1.5.1)
168
+ prism (1.6.0)
168
169
  public_suffix (6.0.2)
169
- qbash (0.4.5)
170
+ qbash (0.4.7)
170
171
  backtrace (> 0)
171
172
  elapsed (> 0)
172
173
  loog (> 0)
173
174
  tago (> 0)
174
175
  racc (1.8.1)
175
176
  rainbow (3.1.1)
176
- rake (13.3.0)
177
- random-port (0.7.5)
178
- tago (> 0)
177
+ rake (13.3.1)
178
+ random-port (0.7.6)
179
+ tago (~> 0.0)
179
180
  regexp_parser (2.11.3)
180
181
  retries (0.0.5)
181
182
  rexml (3.4.4)
182
- rubocop (1.80.2)
183
+ rubocop (1.81.7)
183
184
  json (~> 2.3)
184
185
  language_server-protocol (~> 3.17.0.2)
185
186
  lint_roller (~> 1.1.0)
@@ -187,20 +188,20 @@ GEM
187
188
  parser (>= 3.3.0.2)
188
189
  rainbow (>= 2.2.2, < 4.0)
189
190
  regexp_parser (>= 2.9.3, < 3.0)
190
- rubocop-ast (>= 1.46.0, < 2.0)
191
+ rubocop-ast (>= 1.47.1, < 2.0)
191
192
  ruby-progressbar (~> 1.7)
192
193
  unicode-display_width (>= 2.4.0, < 4.0)
193
- rubocop-ast (1.46.0)
194
+ rubocop-ast (1.48.0)
194
195
  parser (>= 3.3.7.2)
195
196
  prism (~> 1.4)
196
197
  rubocop-minitest (0.38.2)
197
198
  lint_roller (~> 1.1)
198
199
  rubocop (>= 1.75.0, < 2.0)
199
200
  rubocop-ast (>= 1.38.0, < 2.0)
200
- rubocop-performance (1.26.0)
201
+ rubocop-performance (1.26.1)
201
202
  lint_roller (~> 1.1)
202
203
  rubocop (>= 1.75.0, < 2.0)
203
- rubocop-ast (>= 1.44.0, < 2.0)
204
+ rubocop-ast (>= 1.47.1, < 2.0)
204
205
  rubocop-rake (0.7.1)
205
206
  lint_roller (~> 1.1)
206
207
  rubocop (>= 1.72.1)
@@ -217,20 +218,20 @@ GEM
217
218
  sys-uname (1.4.1)
218
219
  ffi (~> 1.1)
219
220
  memoist3 (~> 1.0.0)
220
- tago (0.2.0)
221
- timeout (0.4.3)
221
+ tago (0.4.0)
222
+ timeout (0.4.4)
222
223
  total (0.4.1)
223
224
  typhoeus (1.4.1)
224
225
  ethon (>= 0.9.0)
225
226
  unicode-display_width (3.2.0)
226
227
  unicode-emoji (~> 4.1)
227
228
  unicode-emoji (4.1.0)
228
- uri (1.0.3)
229
+ uri (1.1.1)
229
230
  w3c_validators (1.3.7)
230
231
  json (>= 1.8)
231
232
  nokogiri (~> 1.6)
232
233
  rexml (~> 3.2)
233
- webmock (3.25.1)
234
+ webmock (3.26.1)
234
235
  addressable (>= 2.8.0)
235
236
  crack (>= 0.3.2)
236
237
  hashdiff (>= 0.4.0, < 2.0.0)
data/README.md CHANGED
@@ -20,10 +20,10 @@ of `.yml` files. A script in the Ruby file is executed with the following
20
20
  global variables available to it:
21
21
 
22
22
  * `$fb` — an instance
23
- of [`Factbase`](https://www.rubydoc.info/gems/factbase/0.0.22/Factbase),
23
+ of [Factbase](https://www.rubydoc.info/gems/factbase/0.0.22/Factbase),
24
24
  where facts may be added/updated;
25
25
  * `$loog` — an instance
26
- of [`Loog`](https://www.rubydoc.info/gems/loog/0.5.1/Loog),
26
+ of [Loog](https://www.rubydoc.info/gems/loog/0.5.1/Loog),
27
27
  where `.info` and `.debug` logs are welcome;
28
28
  * `$options` — a holder of options coming from either the `--option` command
29
29
  line flag or the `.yml` file during testing;
data/Rakefile CHANGED
@@ -56,6 +56,7 @@ require 'yard'
56
56
  desc 'Build Yard documentation'
57
57
  YARD::Rake::YardocTask.new do |t|
58
58
  t.files = ['lib/**/*.rb']
59
+ t.options = ['--fail-on-warning']
59
60
  end
60
61
 
61
62
  require 'rubocop/rake_task'
data/bin/judges CHANGED
@@ -13,6 +13,7 @@ require 'tago'
13
13
  require 'time'
14
14
  require 'total'
15
15
  require_relative '../lib/judges'
16
+ require_relative '../lib/judges/ascii_loog'
16
17
 
17
18
  Encoding.default_external = Encoding::UTF_8
18
19
  Encoding.default_internal = Encoding::UTF_8
@@ -55,11 +56,18 @@ class JudgesGLI extend GLI::App
55
56
  flag([:factbase], type: String)
56
57
  desc 'Echo the entire command line'
57
58
  switch([:echo])
59
+ desc 'Stay strictly offline, never attempt to reach Internet resources'
60
+ switch([:offline])
61
+ desc 'Suppress all Unicode symbols in the output'
62
+ switch([:ascii])
58
63
 
59
64
  pre do |global, command, options, args|
60
65
  if global[:verbose]
61
66
  @@loog = Loog::VERBOSE
62
67
  end
68
+ if global[:ascii]
69
+ @@loog = Judges::AsciiLoog.new(@@loog)
70
+ end
63
71
  if global[:echo]
64
72
  @@loog.info("+ #{File.absolute_path($0)} #{@@args.join(' ')}")
65
73
  end
@@ -71,15 +79,20 @@ class JudgesGLI extend GLI::App
71
79
  end
72
80
  require 'factbase'
73
81
  if global[:hello]
74
- [
82
+ info = [
75
83
  "Judges #{Judges::VERSION}",
76
84
  "Factbase #{Factbase::VERSION}",
77
85
  "Baza-rb #{BazaRb::VERSION}",
78
86
  "Ruby: #{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}",
79
87
  "Current directory: #{Dir.getwd}",
80
- "Time: #{Time.now.utc.iso8601}",
81
- "Total memory: #{Total::Mem.new.bytes / (1024 * 1024)}Mb"
82
- ].each { |m| @@loog.info(m) }
88
+ "Time: #{Time.now.utc.iso8601}"
89
+ ]
90
+ begin
91
+ info << "Total memory: #{Total::Mem.new.bytes / (1024 * 1024)}Mb"
92
+ rescue Total::CantDetect => e
93
+ @@loog.debug("Can't detect memory: #{e.message}")
94
+ end
95
+ info.each { |m| @@loog.info(m) }
83
96
  end
84
97
  true
85
98
  end
@@ -92,6 +105,7 @@ class JudgesGLI extend GLI::App
92
105
  end
93
106
 
94
107
  desc 'Update the factbase by executing all judges sequentially'
108
+ arg_name '<dir> <factbase>'
95
109
  command :update do |c|
96
110
  c.desc 'Options to pass to each judge'
97
111
  c.flag([:o, :option], multiple: true, arg_name: '<key=value>')
@@ -127,6 +141,7 @@ class JudgesGLI extend GLI::App
127
141
  end
128
142
 
129
143
  desc 'Evaluate a single Ruby expression against the factbase'
144
+ arg_name '<factbase> <expression>'
130
145
  command :eval do |c|
131
146
  c.desc 'Use default logging facility'
132
147
  c.switch([:log], default_value: true)
@@ -134,11 +149,13 @@ class JudgesGLI extend GLI::App
134
149
  end
135
150
 
136
151
  desc 'Join two factbases'
152
+ arg_name '<first> <second>'
137
153
  command :join do |c|
138
154
  run_it(c, 'join')
139
155
  end
140
156
 
141
157
  desc 'Import YAML into a factbase'
158
+ arg_name '<factbase> <yaml>'
142
159
  command :import do |c|
143
160
  c.desc 'Use default logging facility'
144
161
  c.switch([:log], default_value: true)
@@ -146,6 +163,7 @@ class JudgesGLI extend GLI::App
146
163
  end
147
164
 
148
165
  desc 'Remove outdated facts from the factbase'
166
+ arg_name 'factbase'
149
167
  command :trim do |c|
150
168
  c.desc 'Delete only facts matching the specified expression'
151
169
  c.flag([:query], default_value: '(never)')
@@ -153,6 +171,7 @@ class JudgesGLI extend GLI::App
153
171
  end
154
172
 
155
173
  desc 'Convert the factbase to a human-readable format (YAML, JSON, etc.)'
174
+ arg_name '<factbase> [<output>]'
156
175
  command :print do |c|
157
176
  c.desc 'Output format (xml, json, or yaml)'
158
177
  c.flag([:format], default_value: 'yaml')
@@ -172,11 +191,13 @@ class JudgesGLI extend GLI::App
172
191
  end
173
192
 
174
193
  desc 'Inspect the factbase and display all available metadata'
194
+ arg_name '<factbase>'
175
195
  command :inspect do |c|
176
196
  run_it(c, 'inspect')
177
197
  end
178
198
 
179
199
  desc 'Run automated tests for all judges'
200
+ arg_name '<dir>'
180
201
  command :test do |c|
181
202
  c.desc 'Options to pass to each judge (may be overridden by YAML)'
182
203
  c.flag([:o, :option], multiple: true, arg_name: '<key=value>')
@@ -198,6 +219,7 @@ class JudgesGLI extend GLI::App
198
219
  end
199
220
 
200
221
  desc 'Push the factbase to the server and unlock it remotely'
222
+ arg_name '<name> <factbase>'
201
223
  command :push do |c|
202
224
  c.desc 'Authentication token'
203
225
  c.flag([:token])
@@ -221,6 +243,7 @@ class JudgesGLI extend GLI::App
221
243
  end
222
244
 
223
245
  desc 'Pull the factbase from the server and lock it remotely'
246
+ arg_name '<name> <factbase>'
224
247
  command :pull do |c|
225
248
  c.desc 'Authentication token'
226
249
  c.flag([:token])
@@ -242,6 +265,7 @@ class JudgesGLI extend GLI::App
242
265
  end
243
266
 
244
267
  desc 'Download a durable from the server by ID'
268
+ arg_name '<id> <factbase>'
245
269
  command :download do |c|
246
270
  c.desc 'Authentication token'
247
271
  c.flag([:token])
@@ -261,6 +285,7 @@ class JudgesGLI extend GLI::App
261
285
  end
262
286
 
263
287
  desc 'Upload a file as a durable to the server'
288
+ arg_name '<file> <path>'
264
289
  command :upload do |c|
265
290
  c.desc 'Authentication token'
266
291
  c.flag([:token])
@@ -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.7 --verbose test --judge guess ./fixtures"
19
+ When I run bin/judges with "--factbase 0.16.8 --verbose test --judge guess ./fixtures"
20
20
  Then Exit code is zero
21
- And Stdout contains "Factbase version to be used: '0.16.7'"
21
+ And Stdout contains "Factbase version to be used: '0.16.8'"
22
22
 
23
23
  Scenario: Simple test of no judges
24
24
  Given I run bin/judges with "test --judge absent_for_sure ./fixtures"
@@ -55,14 +55,14 @@ Feature: Update
55
55
  """
56
56
  n = $fb.insert
57
57
  n.type = 'first'
58
- sleep 1.9
58
+ sleep 1.91
59
59
  """
60
60
  Then I have a "second/second.rb" file with content:
61
61
  """
62
62
  n = $fb.insert
63
63
  n.type = 'second'
64
64
  """
65
- Then I run bin/judges with "--verbose update --quiet --lifetime 2 --timeout 1 --max-cycles 5 . simple.fb"
65
+ Then I run bin/judges with "--verbose update --quiet --lifetime 4 --timeout 3 --max-cycles 5 . simple.fb"
66
66
  Then Stdout contains "Update completed in 2 cycle(s), did 3i/0d/3a"
67
67
  And Exit code is zero
68
68
 
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.54.0'
12
+ s.version = '0.56.0'
13
13
  s.license = 'MIT'
14
14
  s.summary = 'Command-Line Tool for a Factbase'
15
15
  s.description =
@@ -0,0 +1,81 @@
1
+ # frozen_string_literal: true
2
+
3
+ # SPDX-FileCopyrightText: Copyright (c) 2024-2025 Yegor Bugayenko
4
+ # SPDX-License-Identifier: MIT
5
+
6
+ require_relative '../judges'
7
+
8
+ # ASCII wrapper for Loog logging facility.
9
+ #
10
+ # This class wraps any Loog logger and converts Unicode symbols to ASCII
11
+ # equivalents when the --ascii option is enabled.
12
+ #
13
+ # Author:: Yegor Bugayenko (yegor256@gmail.com)
14
+ # Copyright:: Copyright (c) 2024-2025 Yegor Bugayenko
15
+ # License:: MIT
16
+ class Judges::AsciiLoog
17
+ # Unicode to ASCII symbol mapping
18
+ UNICODE_TO_ASCII = {
19
+ '👍' => '+',
20
+ '👎' => '-',
21
+ '❌' => '!',
22
+ '👉' => '>',
23
+ '✓' => '+',
24
+ '✗' => '!',
25
+ '►' => '>',
26
+ '◄' => '<',
27
+ '▼' => 'v',
28
+ '▲' => '^'
29
+ }.freeze
30
+
31
+ # Initialize the ASCII wrapper.
32
+ # @param [Loog] loog The original logging facility to wrap
33
+ def initialize(loog)
34
+ @loog = loog
35
+ end
36
+
37
+ # Convert Unicode symbols to ASCII equivalents.
38
+ # @param [String] message The message to convert
39
+ # @return [String] The converted message with ASCII symbols
40
+ def to_ascii(message)
41
+ result = message.to_s
42
+ UNICODE_TO_ASCII.each do |unicode, ascii|
43
+ result = result.gsub(unicode, ascii)
44
+ end
45
+ result
46
+ end
47
+
48
+ # Log an info message, converting Unicode to ASCII.
49
+ # @param [String] message The message to log
50
+ def info(message)
51
+ @loog.info(to_ascii(message))
52
+ end
53
+
54
+ # Log a warning message, converting Unicode to ASCII.
55
+ # @param [String] message The message to log
56
+ def warn(message)
57
+ @loog.warn(to_ascii(message))
58
+ end
59
+
60
+ # Log an error message, converting Unicode to ASCII.
61
+ # @param [String] message The message to log
62
+ def error(message)
63
+ @loog.error(to_ascii(message))
64
+ end
65
+
66
+ # Log a debug message, converting Unicode to ASCII.
67
+ # @param [String] message The message to log
68
+ def debug(message)
69
+ @loog.debug(to_ascii(message))
70
+ end
71
+
72
+ # Delegate all other methods to the original logger.
73
+ def method_missing(method, *, &)
74
+ @loog.send(method, *, &)
75
+ end
76
+
77
+ # Check if the original logger responds to a method.
78
+ def respond_to_missing?(method, include_private = false)
79
+ @loog.respond_to?(method, include_private) || super
80
+ end
81
+ end
@@ -89,13 +89,14 @@ class Judges::Print
89
89
  'columns' => opts['columns'] || 'when,what,who',
90
90
  'hidden' => opts['hidden'] || '_id,_version,_time,_job',
91
91
  'version' => Judges::VERSION,
92
- 'css_hash' => sha384('index.css'),
93
- 'js_hash' => sha384('index.js')
92
+ 'css_hash' => sha384(opts, 'index.css'),
93
+ 'js_hash' => sha384(opts, 'index.js')
94
94
  )
95
95
  )
96
96
  end
97
97
 
98
- def sha384(asset)
98
+ def sha384(opts, asset)
99
+ return 'sha256-offline' if opts['offline']
99
100
  with_retries do
100
101
  url = "https://yegor256.github.io/judges/assets/#{asset}"
101
102
  http = Typhoeus::Request.get(url)
@@ -186,7 +186,7 @@ class Judges::Update
186
186
  end
187
187
  if opts['lifetime'] && opts['timeout']
188
188
  remained = @start + opts['lifetime'] - Time.now
189
- if remained < opts['timeout'] / 16
189
+ if remained < opts['timeout'].to_f / 16
190
190
  @loog.info("Not running #{judge.name.inspect}, not enough time left (just #{remained.seconds})")
191
191
  next
192
192
  end
@@ -45,10 +45,15 @@ 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
- Tempfile.create do |f|
48
+ f = Tempfile.new('placeholder')
49
+ begin
49
50
  File.write(f.path, 'placeholder')
51
+ f.close
50
52
  id = baza.durable_place(jname, f.path)
51
53
  @loog.info("Placed a placeholder to new durable '#{name}' in '#{jname}' (ID: #{id})")
54
+ ensure
55
+ f.close unless f.closed?
56
+ f.unlink
52
57
  end
53
58
  end
54
59
  id = id.to_i
@@ -144,8 +144,11 @@ class Judges::Options
144
144
  # Method names are automatically converted to uppercase symbols to match
145
145
  # the keys in the options hash.
146
146
  #
147
- # @param [Symbol, String] method_name The option name to retrieve
148
- # @return [Object, nil] The value of the option, or nil if not found
147
+ # @!method method_missing(method_name, *args)
148
+ # Dynamic method to access option values
149
+ # @param [Symbol] method_name The name of the option to retrieve
150
+ # @param [Array] args Additional arguments (unused)
151
+ # @return [Object, nil] The value of the option, or nil if not found
149
152
  # @example Access options as methods
150
153
  # options = Judges::Options.new(["token=abc123", "max_speed=100"])
151
154
  # options.token # => "abc123"
data/lib/judges.rb CHANGED
@@ -8,5 +8,5 @@
8
8
  # Copyright:: Copyright (c) 2024-2025 Yegor Bugayenko
9
9
  # License:: MIT
10
10
  module Judges
11
- VERSION = '0.54.0' unless const_defined?(:VERSION)
11
+ VERSION = '0.56.0' unless const_defined?(:VERSION)
12
12
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: judges
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.54.0
4
+ version: 0.56.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko
@@ -280,6 +280,7 @@ files:
280
280
  - fixtures/try/try.rb
281
281
  - judges.gemspec
282
282
  - lib/judges.rb
283
+ - lib/judges/ascii_loog.rb
283
284
  - lib/judges/categories.rb
284
285
  - lib/judges/commands/download.rb
285
286
  - lib/judges/commands/eval.rb