judges 0.0.14 → 0.0.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e45e98c063327eedc9ae2731bb8c8c39358291ca8c687f6cf37997df37cf84aa
4
- data.tar.gz: 811ae41514764e68e9cc4fa0a3ea0429bed9128eec2142268e4cdb779ce12b5e
3
+ metadata.gz: 921a2ee75d8305caea875d0ed79fcbd6b45edc165a7ddb6d8f049a66c489146e
4
+ data.tar.gz: 73176a8f9b99a4aad3ab987f611468b3ca26b47bcc7a9048c4890a76f22e0d7b
5
5
  SHA512:
6
- metadata.gz: 0414dfaa83953985ce7186c336eac2c1a53e71f88c73f9b89c8f1410208191c5d1ff106d91045fa7c6f6f0dd9eb59ed8c189138b51d4b546d5a0a9bbe4211546
7
- data.tar.gz: d3b3e538af3fa858fd19d67afe3f4b10942c97befa99538fceefcb3eef770cb130bbb1631160191d4e7bac47c0dbe62a184959ba3f1c29956bdf86708f88eefe
6
+ metadata.gz: 567a566e23353d7cf625b117f733379543a24725456f13c0f5aa680abfc08732c7074e2159368ecf4a7c90e2615a0a72a32e88819f195bea9f2bc93ed9ed80cb
7
+ data.tar.gz: 1294c1cd68138b2e39a632b51e913ac0cb1e8e539f32f7ea3067339a946ce93ea6c27356d45ea375d8fd8d42b396f24a4ca2b868d05707c4140d5d4c47a4b866
data/bin/judges CHANGED
@@ -29,13 +29,15 @@ require 'factbase'
29
29
  Encoding.default_external = Encoding::UTF_8
30
30
  Encoding.default_internal = Encoding::UTF_8
31
31
 
32
+ ver = '0.0.15'
33
+
32
34
  include GLI::App
33
35
 
34
36
  loog = Loog::REGULAR
35
37
 
36
38
  program_desc('Automated executor of judges for a factbase')
37
39
 
38
- version('0.0.14')
40
+ version(ver)
39
41
 
40
42
  synopsis_format(:full)
41
43
 
@@ -48,6 +50,7 @@ pre do |global, command, options, args|
48
50
  if global[:verbose]
49
51
  loog = Loog::VERBOSE
50
52
  end
53
+ loog.debug("judges #{ver}")
51
54
  true
52
55
  end
53
56
 
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.14'
29
+ s.version = '0.0.15'
30
30
  s.license = 'MIT'
31
31
  s.summary = 'Command-Line Tool for a Factbase'
32
32
  s.description = '
@@ -49,6 +49,8 @@ class Judges::Options
49
49
  pp = @pairs || []
50
50
  pp = @pairs.map { |k, v| "#{k}=#{v}" } if pp.is_a?(Hash)
51
51
  pp = pp.split(',') if pp.is_a?(String)
52
+ pp.compact!
53
+ pp.reject!(&:empty?)
52
54
  pp.to_h do |pair|
53
55
  p = pair.split('=', 2)
54
56
  k = p[0].strip
data/test/test_options.rb CHANGED
@@ -46,6 +46,16 @@ class TestOptions < Minitest::Test
46
46
  assert(opts.foo.nil?)
47
47
  end
48
48
 
49
+ def test_with_empty_string
50
+ opts = Judges::Options.new(' ')
51
+ assert(opts.foo.nil?)
52
+ end
53
+
54
+ def test_with_empty_strings
55
+ opts = Judges::Options.new(['', nil])
56
+ assert(opts.foo.nil?)
57
+ end
58
+
49
59
  def test_with_string
50
60
  opts = Judges::Options.new('a=1,b=42')
51
61
  assert_equal(1, opts.a)
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.0.14
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko