judges 0.0.22 → 0.0.23
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/judges +69 -67
- data/judges.gemspec +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: 15c96f4af35d626de3ae2f9de6d510550b2307a014b0a76148219f8a04091907
|
4
|
+
data.tar.gz: 19e2b425671a4a711b1c0ebf62b1ad17c25d13c355aeef050a48c030b22a47a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
32
|
+
class App
|
33
|
+
extend GLI::App
|
33
34
|
|
34
|
-
|
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
|
-
|
51
|
-
|
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
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
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
|
-
|
74
|
-
|
75
|
-
|
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
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
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
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
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
|
-
|
104
|
-
|
105
|
-
|
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
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
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.
|
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 = '
|