judges 0.0.22 → 0.0.23

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/judges +69 -67
  3. data/judges.gemspec +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c7b4a80762cb37240925afe0778c87a829f891a4e5a3a3fb7f22ccc3802c1a3a
4
- data.tar.gz: 914e85bda9dea1030a06fde8a635d1452ae73c0d3e736e8ef04164cd692df378
3
+ metadata.gz: 15c96f4af35d626de3ae2f9de6d510550b2307a014b0a76148219f8a04091907
4
+ data.tar.gz: 19e2b425671a4a711b1c0ebf62b1ad17c25d13c355aeef050a48c030b22a47a0
5
5
  SHA512:
6
- metadata.gz: 2fb32730607a2b122391447f7bd371f9b1d318d4c6be50ae1bf2d3bcd46c80561ac1ebe792824909cfa8f7fbd4edda17404e41b2510b9ab25c750fcb34f836ef
7
- data.tar.gz: 6f6fa5d67867c3f0abb8b54e65d59aedbfa607abde5ca1336505001d35c916c8a928a4228393c2d5d22e2a341ed09afb2c199057389a966ce1f07326b7444e13
6
+ metadata.gz: fe53d0e31dcd30a125d8130fbb46ed1f13709a13f642c8e19db9ae74ef4aeb1485ea374ede9f1abe1f0f1308331fc98f507c532a97803a75b96c8fbf4a6f79b3
7
+ data.tar.gz: 36a8369665200eb177572803b555c4948ccfe1f96cc2ed695c9c104bcb8cf89ca11204224ddf2549ad5fa5f7ff7082069edd87e1aa94ac1acca7be22df54f1a7
data/bin/judges CHANGED
@@ -29,93 +29,95 @@ require 'factbase'
29
29
  Encoding.default_external = Encoding::UTF_8
30
30
  Encoding.default_internal = Encoding::UTF_8
31
31
 
32
- ver = '0.0.22'
32
+ class App
33
+ extend GLI::App
33
34
 
34
- include GLI::App
35
+ ver = '0.0.23'
35
36
 
36
- loog = Loog::REGULAR
37
+ loog = Loog::REGULAR
37
38
 
38
- program_desc('Automated executor of judges for a factbase')
39
+ program_desc('Automated executor of judges for a factbase')
39
40
 
40
- version(ver)
41
+ version(ver)
41
42
 
42
- synopsis_format(:full)
43
+ synopsis_format(:full)
43
44
 
44
- subcommand_option_handling(:normal)
45
+ subcommand_option_handling(:normal)
45
46
 
46
- desc 'Make it more verbose, logging as much as possible'
47
- switch([:v, :verbose])
47
+ desc 'Make it more verbose, logging as much as possible'
48
+ switch([:v, :verbose])
48
49
 
49
- pre do |global, command, options, args|
50
- if global[:verbose]
51
- loog = Loog::VERBOSE
50
+ pre do |global, command, options, args|
51
+ if global[:verbose]
52
+ loog = Loog::VERBOSE
53
+ end
54
+ loog.debug("judges #{ver}")
55
+ true
52
56
  end
53
- loog.debug("judges #{ver}")
54
- true
55
- end
56
57
 
57
- desc 'Update the factbase by passing all judges one by one'
58
- command :update do |c|
59
- c.desc 'Options to pass to every judge'
60
- c.flag([:o, :option], multiple: true, arg_name: '<key=value>')
61
- c.desc 'Maximum number of update cycles to run'
62
- c.flag([:'max-cycles'], default_value: 8, type: Integer)
63
- c.desc 'Stay quiet even if some judges fail'
64
- c.switch([:q, :quiet], default_value: false)
65
- c.action do |global, options, args|
66
- require_relative '../lib/judges/commands/update'
67
- Judges::Update.new(loog).run(options, args)
58
+ desc 'Update the factbase by passing all judges one by one'
59
+ command :update do |c|
60
+ c.desc 'Options to pass to every judge'
61
+ c.flag([:o, :option], multiple: true, arg_name: '<key=value>')
62
+ c.desc 'Maximum number of update cycles to run'
63
+ c.flag([:'max-cycles'], default_value: 8, type: Integer)
64
+ c.desc 'Stay quiet even if some judges fail'
65
+ c.switch([:q, :quiet], default_value: false)
66
+ c.action do |global, options, args|
67
+ require_relative '../lib/judges/commands/update'
68
+ Judges::Update.new(loog).run(options, args)
69
+ end
68
70
  end
69
- end
70
71
 
71
- desc 'Join two factbases'
72
- command :print do |c|
73
- c.action do |global, options, args|
74
- require_relative '../lib/judges/commands/join'
75
- Judges::Join.new(loog).run(options, args)
72
+ desc 'Join two factbases'
73
+ command :print do |c|
74
+ c.action do |global, options, args|
75
+ require_relative '../lib/judges/commands/join'
76
+ Judges::Join.new(loog).run(options, args)
77
+ end
76
78
  end
77
- end
78
79
 
79
- desc 'Remove the facts that are too old'
80
- command :trim do |c|
81
- c.desc 'Remove facts that are older than X days'
82
- c.flag([:days], type: Integer, default_value: 90)
83
- c.action do |global, options, args|
84
- require_relative '../lib/judges/commands/trim'
85
- Judges::Trim.new(loog).run(options, args)
80
+ desc 'Remove the facts that are too old'
81
+ command :trim do |c|
82
+ c.desc 'Remove facts that are older than X days'
83
+ c.flag([:days], type: Integer, default_value: 90)
84
+ c.action do |global, options, args|
85
+ require_relative '../lib/judges/commands/trim'
86
+ Judges::Trim.new(loog).run(options, args)
87
+ end
86
88
  end
87
- end
88
89
 
89
- desc 'Print the factbase into a human-readable format (YAML, JSON, etc.)'
90
- command :print do |c|
91
- c.desc 'Output format (xml, json, or yaml)'
92
- c.flag([:format], default_value: 'yaml')
93
- c.desc 'Generate output name of the file automatically'
94
- c.switch([:auto], default_value: false)
95
- c.action do |global, options, args|
96
- require_relative '../lib/judges/commands/print'
97
- Judges::Print.new(loog).run(options, args)
90
+ desc 'Print the factbase into a human-readable format (YAML, JSON, etc.)'
91
+ command :print do |c|
92
+ c.desc 'Output format (xml, json, or yaml)'
93
+ c.flag([:format], default_value: 'yaml')
94
+ c.desc 'Generate output name of the file automatically'
95
+ c.switch([:auto], default_value: false)
96
+ c.action do |global, options, args|
97
+ require_relative '../lib/judges/commands/print'
98
+ Judges::Print.new(loog).run(options, args)
99
+ end
98
100
  end
99
- end
100
101
 
101
- desc 'Inspect the factbase and print all its possible meta-data'
102
- command :inspect do |c|
103
- c.action do |global, options, args|
104
- require_relative '../lib/judges/commands/inspect'
105
- Judges::Inspect.new(loog).run(options, args)
102
+ desc 'Inspect the factbase and print all its possible meta-data'
103
+ command :inspect do |c|
104
+ c.action do |global, options, args|
105
+ require_relative '../lib/judges/commands/inspect'
106
+ Judges::Inspect.new(loog).run(options, args)
107
+ end
106
108
  end
107
- end
108
109
 
109
- desc 'Run automated tests for all judges'
110
- command :test do |c|
111
- c.desc 'Name of the test pack to run'
112
- c.flag([:pack], multiple: true)
113
- c.desc 'Stay quiet even if some tests fail or simply no tests executed?'
114
- c.switch([:quiet], default_value: false)
115
- c.action do |global, options, args|
116
- require_relative '../lib/judges/commands/test'
117
- Judges::Test.new(loog).run(options, args)
110
+ desc 'Run automated tests for all judges'
111
+ command :test do |c|
112
+ c.desc 'Name of the test pack to run'
113
+ c.flag([:pack], multiple: true)
114
+ c.desc 'Stay quiet even if some tests fail or simply no tests executed?'
115
+ c.switch([:quiet], default_value: false)
116
+ c.action do |global, options, args|
117
+ require_relative '../lib/judges/commands/test'
118
+ Judges::Test.new(loog).run(options, args)
119
+ end
118
120
  end
119
121
  end
120
122
 
121
- exit run(ARGV)
123
+ exit App.run(ARGV)
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.22'
29
+ s.version = '0.0.23'
30
30
  s.license = 'MIT'
31
31
  s.summary = 'Command-Line Tool for a Factbase'
32
32
  s.description = '
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.22
4
+ version: 0.0.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko