judges 0.53.7 → 0.53.8

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: c24a03c87197bb97e5e92654de15874c1e104e22592ff3cd511be7262722c728
4
- data.tar.gz: c968a06426c1ad81022ee528bacec3a108e2aaa34a59de8e08d015dae65271f9
3
+ metadata.gz: c75fa1f015fb78647c5f976812eb3a93032c12643c41c5d2b008c7048bba3825
4
+ data.tar.gz: 1ddcb544a2593bee9a516a2301e81d67f223b112e48c31c2beda96e6356123df
5
5
  SHA512:
6
- metadata.gz: bc644b322013055974b5f5b6b81f39ce2f846b691ed66b0430513c15b46ec1666ebf4953c5c4c86a6ca47d437a2393b8ddc8964c5b06462163162872087791db
7
- data.tar.gz: 0e109826b79327638a57e7af592e167732c90d54a4774f6cc5509a1de889ecaf2b6f4d732a655dbcc73eed2601059fd559a7d1bc065af48837f3cc18d098c1ff
6
+ metadata.gz: 6d786a711fafe73654f96b7f0d3abc36ebe78f542d0f631d7d14afc7b883e893db641aad061e7ca266eab62905de9e87eacd326b05a40590e76f536f9acacf13
7
+ data.tar.gz: 54d21760d04b90f45a82ecd672b60f228fbc308a16c5b3998751feedfc9830a2dafc7d23d3fb090f68c10bb213e6106fac9343c0898f340c2a2c51b93e28d2ec
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.7'
12
+ s.version = '0.53.8'
13
13
  s.license = 'MIT'
14
14
  s.summary = 'Command-Line Tool for a Factbase'
15
15
  s.description =
@@ -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
- id = baza.durable_place(jname, path)
49
- throw :"👍 Uploaded #{path} to new durable '#{name}' in '#{jname}' (ID: #{id}, #{size} bytes)"
50
- else
51
- id = id.to_i
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
@@ -8,5 +8,5 @@
8
8
  # Copyright:: Copyright (c) 2024-2025 Yegor Bugayenko
9
9
  # License:: MIT
10
10
  module Judges
11
- VERSION = '0.53.7' unless const_defined?(:VERSION)
11
+ VERSION = '0.53.8' 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.53.7
4
+ version: 0.53.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko