benry-cmdapp 0.1.0 → 1.0.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 +4 -4
- data/CHANGES.md +14 -0
- data/README.md +1698 -857
- data/benry-cmdapp.gemspec +4 -6
- data/doc/benry-cmdapp.html +1587 -911
- data/lib/benry/cmdapp.rb +1894 -1059
- data/test/app_test.rb +882 -1078
- data/test/config_test.rb +71 -0
- data/test/context_test.rb +382 -0
- data/test/func_test.rb +302 -82
- data/test/help_test.rb +1054 -553
- data/test/metadata_test.rb +191 -0
- data/test/misc_test.rb +175 -0
- data/test/registry_test.rb +402 -0
- data/test/run_all.rb +4 -3
- data/test/scope_test.rb +1210 -0
- data/test/shared.rb +112 -49
- data/test/util_test.rb +154 -99
- metadata +21 -7
- data/test/action_test.rb +0 -1038
- data/test/index_test.rb +0 -185
data/test/shared.rb
CHANGED
@@ -1,75 +1,138 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
4
|
|
4
|
-
|
5
|
+
require 'oktest'
|
5
6
|
|
6
|
-
|
7
|
-
|
7
|
+
require 'benry/cmdapp'
|
8
|
+
|
9
|
+
|
10
|
+
class MyAction < Benry::CmdApp::Action
|
11
|
+
|
12
|
+
@action.("greeting message")
|
13
|
+
@option.(:lang, "-l, --lang=<lang>", "language name (en/fr/it)")
|
14
|
+
def hello(name="world", lang: "en")
|
15
|
+
case lang
|
16
|
+
when "en" ; puts "Hello, #{name}!"
|
17
|
+
when "fr" ; puts "Bonjour, #{name}!"
|
18
|
+
when "it" ; puts "Chao, #{name}!"
|
19
|
+
else
|
20
|
+
raise "#{lang}: unkown language"
|
21
|
+
end
|
8
22
|
end
|
9
23
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
24
|
+
@action.("hidden action", hidden: true)
|
25
|
+
@option.(:val, "--val=<val>", "something value", hidden: true)
|
26
|
+
def debuginfo(val: nil)
|
27
|
+
puts "val: #{val.inspect}"
|
14
28
|
end
|
15
29
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
return result
|
30
|
+
@action.("raises ZeroDivisionError")
|
31
|
+
def testerr1()
|
32
|
+
1/0
|
20
33
|
end
|
21
34
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
yield
|
31
|
-
ensure
|
32
|
-
bkup.each do |name, val|
|
33
|
-
action = Benry::CmdApp::INDEX.get_action(name)
|
34
|
-
action.instance_variable_set('@important', val)
|
35
|
-
end
|
36
|
-
end
|
35
|
+
@action.("looped action")
|
36
|
+
def testerr2()
|
37
|
+
run_once "testerr3"
|
38
|
+
end
|
39
|
+
|
40
|
+
@action.("looped action")
|
41
|
+
def testerr3()
|
42
|
+
run_action "testerr2"
|
37
43
|
end
|
38
44
|
|
39
|
-
|
45
|
+
end
|
46
|
+
|
47
|
+
|
48
|
+
class GitAction < Benry::CmdApp::Action
|
49
|
+
category "git:"
|
40
50
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
@_bkup_actions = actions.dup()
|
45
|
-
actions.delete_if {|_, x| x.klass != klass }
|
46
|
-
anames = actions.keys()
|
47
|
-
@_bkup_aliases = aliases.dup()
|
48
|
-
aliases.delete_if {|_, x| ! anames.include?(x.action_name) }
|
51
|
+
@action.("same as `git add -p`")
|
52
|
+
def stage(*file)
|
53
|
+
puts "git add -p #{file.join(' ')}"
|
49
54
|
end
|
50
55
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
+
@action.("same as `git diff --cached`")
|
57
|
+
def staged()
|
58
|
+
puts "git diff --cached"
|
59
|
+
end
|
60
|
+
|
61
|
+
@action.("same as `git reset HEAD`")
|
62
|
+
def unstage()
|
63
|
+
puts "git reset HEAD"
|
64
|
+
end
|
65
|
+
|
66
|
+
private
|
67
|
+
|
68
|
+
@action.("same as `git commit --amend`")
|
69
|
+
def correct()
|
70
|
+
puts "git commit --amend"
|
56
71
|
end
|
57
72
|
|
58
73
|
end
|
59
74
|
|
60
75
|
|
61
|
-
|
62
|
-
|
76
|
+
class DeepPrefixAction < Benry::CmdApp::Action
|
77
|
+
category "giit:", "gitt commands" do
|
78
|
+
|
79
|
+
#@action.("show current status in compact format")
|
80
|
+
#def status()
|
81
|
+
# sys "git status -sb"
|
82
|
+
#end
|
83
|
+
|
84
|
+
category "staging:" do
|
85
|
+
@action.("add changes into staging area")
|
86
|
+
def add(); end
|
87
|
+
@action.("show changes in staging area")
|
88
|
+
def show(); end
|
89
|
+
@action.("delete changes in staging area")
|
90
|
+
def delete(); end
|
91
|
+
end
|
92
|
+
|
93
|
+
category "commit:" do
|
94
|
+
@action.("list commits")
|
95
|
+
def list(); end
|
96
|
+
end
|
97
|
+
|
98
|
+
category "branch:" do
|
99
|
+
@action.("list branches")
|
100
|
+
def list(); end
|
101
|
+
@action.("switch branch")
|
102
|
+
def switch(name); end
|
103
|
+
end
|
104
|
+
|
105
|
+
category "repo:" do
|
106
|
+
@action.("create direcotry, move to it, and init repository")
|
107
|
+
def create(); end
|
108
|
+
@action.("initialize git repository with initial empty commit")
|
109
|
+
def init(); end
|
110
|
+
|
111
|
+
category "config:" do
|
112
|
+
@action.("add config of repository")
|
113
|
+
def add(); end
|
114
|
+
@action.("delete config of repository")
|
115
|
+
def delete(); end
|
116
|
+
@action.("list config of repository")
|
117
|
+
def list(); end
|
118
|
+
end
|
119
|
+
|
120
|
+
category "remote:" do
|
121
|
+
@action.("list remote repositories")
|
122
|
+
def list(); end
|
123
|
+
@action.("set remote repo url ('github:<user>/<proj>' available)")
|
124
|
+
def set(); end
|
125
|
+
end
|
126
|
+
|
127
|
+
end
|
63
128
|
|
64
|
-
def new_schema(lang: true)
|
65
|
-
schema = Benry::Cmdopt::Schema.new
|
66
|
-
schema.add(:lang, "-l, --lang=<en|fr|it>", "language") if lang
|
67
|
-
return schema
|
68
129
|
end
|
69
130
|
|
70
|
-
|
71
|
-
|
72
|
-
|
131
|
+
category "md:", "markdown actions" do
|
132
|
+
@action.("create *.html", hidden: true)
|
133
|
+
def html(); end
|
134
|
+
@action.("create *.txt", hidden: true)
|
135
|
+
def txt(); end
|
73
136
|
end
|
74
137
|
|
75
138
|
end
|
data/test/util_test.rb
CHANGED
@@ -1,9 +1,22 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
|
-
require 'oktest'
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
require_relative 'shared'
|
6
|
+
|
7
|
+
|
8
|
+
class UtilTestObject
|
9
|
+
def foo0(aa, bb, cc=0, dd=nil, *rest, xx: nil, yy: nil); end
|
10
|
+
def foo1(x); end
|
11
|
+
def foo2(x=0); end
|
12
|
+
def foo3(*x); end
|
13
|
+
def foo4(x, y=0, *z); end
|
14
|
+
def foo5(x: 0, y: nil); end
|
15
|
+
def foo6a(file, *file_); end
|
16
|
+
def foo6b(file=nil, *file_); end
|
17
|
+
def foo7a(file, *file2); end
|
18
|
+
def foo7b(file=nil, *file2); end
|
19
|
+
end
|
7
20
|
|
8
21
|
|
9
22
|
Oktest.scope do
|
@@ -12,172 +25,214 @@ Oktest.scope do
|
|
12
25
|
topic Benry::CmdApp::Util do
|
13
26
|
|
14
27
|
|
15
|
-
topic '
|
28
|
+
topic '.#method2action()' do
|
29
|
+
|
30
|
+
spec "[!bt77a] converts method name (Symbol) to action name (String)." do
|
31
|
+
ok {Benry::CmdApp::Util.method2action(:foo)} == "foo"
|
32
|
+
end
|
16
33
|
|
17
|
-
spec "[!
|
18
|
-
ok {Benry::CmdApp::Util.
|
34
|
+
spec "[!o5822] converts `:foo_` into `'foo'`." do
|
35
|
+
ok {Benry::CmdApp::Util.method2action(:foo_)} == "foo"
|
19
36
|
end
|
20
37
|
|
21
|
-
spec "[!
|
22
|
-
ok {Benry::CmdApp::Util.
|
38
|
+
spec "[!msgjc] converts `:aa__bb____cc` into `'aa:bb:cc'`." do
|
39
|
+
ok {Benry::CmdApp::Util.method2action(:aa__bb__cc)} == "aa:bb:cc"
|
40
|
+
ok {Benry::CmdApp::Util.method2action(:aa____bb____cc)} == "aa:bb:cc"
|
41
|
+
ok {Benry::CmdApp::Util.method2action(:aa__bb____cc)} == "aa:bb:cc"
|
23
42
|
end
|
24
43
|
|
25
|
-
spec "[!
|
26
|
-
ok {Benry::CmdApp::Util.
|
44
|
+
spec "[!qmkfv] converts `:aa_bb_cc` into `'aa-bb-cc'`." do
|
45
|
+
ok {Benry::CmdApp::Util.method2action(:aa__bb__cc)} == "aa:bb:cc"
|
27
46
|
end
|
28
47
|
|
29
|
-
spec "[!
|
30
|
-
ok {Benry::CmdApp::Util.
|
31
|
-
ok {Benry::CmdApp::Util.hidden_name?("foo_")} == false
|
32
|
-
ok {Benry::CmdApp::Util.hidden_name?("foo_:bar")} == false
|
33
|
-
ok {Benry::CmdApp::Util.hidden_name?("foo:bar_")} == false
|
48
|
+
spec "[!tvczb] converts `:_aa_bb:_cc_dd:_ee` into `'_aa-bb:_cc-dd:_ee'`." do
|
49
|
+
ok {Benry::CmdApp::Util.method2action("_aa_bb:_cc_dd:_ee")} == "_aa-bb:_cc-dd:_ee"
|
34
50
|
end
|
35
51
|
|
36
52
|
end
|
37
53
|
|
38
54
|
|
39
|
-
topic '
|
55
|
+
topic '.#method2help()' do
|
40
56
|
|
41
|
-
|
42
|
-
|
43
|
-
ok {Benry::CmdApp::Util.schema_empty?(sc)} == true
|
44
|
-
sc.add(:help, "-h", "help")
|
45
|
-
ok {Benry::CmdApp::Util.schema_empty?(sc)} == false
|
57
|
+
before do
|
58
|
+
@obj = UtilTestObject.new
|
46
59
|
end
|
47
60
|
|
48
|
-
spec "[!
|
49
|
-
|
50
|
-
sc.add(:_help, "-h", "help")
|
51
|
-
ok {Benry::CmdApp::Util.schema_empty?(sc)} == true
|
52
|
-
sc.add(:version, "-V", "version")
|
53
|
-
ok {Benry::CmdApp::Util.schema_empty?(sc)} == false
|
61
|
+
spec "[!q3y3a] returns command argument string which represents method parameters." do
|
62
|
+
ok {Benry::CmdApp::Util.method2help(@obj, :foo0)} == " <aa> <bb> [<cc> [<dd> [<rest>...]]]"
|
54
63
|
end
|
55
64
|
|
56
|
-
|
65
|
+
spec "[!r6u58] converts `.foo(x)` into `' <x>'`." do
|
66
|
+
ok {Benry::CmdApp::Util.method2help(@obj, :foo1)} == " <x>"
|
67
|
+
end
|
68
|
+
|
69
|
+
spec "[!8be14] converts `.foo(x=0)` into `' [<x>]'`." do
|
70
|
+
ok {Benry::CmdApp::Util.method2help(@obj, :foo2)} == " [<x>]"
|
71
|
+
end
|
57
72
|
|
73
|
+
spec "[!skofc] converts `.foo(*x)` into `' [<x>...]'`." do
|
74
|
+
ok {Benry::CmdApp::Util.method2help(@obj, :foo3)} == " [<x>...]"
|
75
|
+
end
|
58
76
|
|
59
|
-
|
77
|
+
spec "[!61xy6] converts `.foo(x, y=0, *z)` into `' <x> [<y> [<z>...]]'`." do
|
78
|
+
ok {Benry::CmdApp::Util.method2help(@obj, :foo4)} == " <x> [<y> [<z>...]]"
|
79
|
+
end
|
60
80
|
|
61
|
-
spec "[!
|
62
|
-
ok {Benry::CmdApp::Util.
|
63
|
-
ok {Benry::CmdApp::Util.method2action("_aa_")} == "_aa"
|
81
|
+
spec "[!0342t] ignores keyword parameters." do
|
82
|
+
ok {Benry::CmdApp::Util.method2help(@obj, :foo5)} == ""
|
64
83
|
end
|
65
84
|
|
66
|
-
spec "[!
|
67
|
-
ok {Benry::CmdApp::Util.
|
85
|
+
spec "[!mbxy5] converts `.foo(x, *x_)` into `' <x>...'`." do
|
86
|
+
ok {Benry::CmdApp::Util.method2help(@obj, :foo6a)} == " <file>..."
|
87
|
+
ok {Benry::CmdApp::Util.method2help(@obj, :foo6b)} == " [<file>...]"
|
68
88
|
end
|
69
89
|
|
70
|
-
spec "[!
|
71
|
-
ok {Benry::CmdApp::Util.
|
72
|
-
ok {Benry::CmdApp::Util.
|
73
|
-
ok {Benry::CmdApp::Util.method2action("aa___bb")} == "aa:_bb"
|
90
|
+
spec "[!mh9ni] converts `.foo(x, *x2)` into `' <x>...'`." do
|
91
|
+
ok {Benry::CmdApp::Util.method2help(@obj, :foo7a)} == " <file>..."
|
92
|
+
ok {Benry::CmdApp::Util.method2help(@obj, :foo7b)} == " [<file>...]"
|
74
93
|
end
|
75
94
|
|
76
95
|
end
|
77
96
|
|
78
97
|
|
79
|
-
topic '
|
98
|
+
topic '.#param2arg()' do
|
80
99
|
|
81
|
-
spec "[!
|
82
|
-
|
83
|
-
begin
|
84
|
-
$COLOR_MODE = true
|
85
|
-
ok {Benry::CmdApp::Util.colorize?()} == true
|
86
|
-
$COLOR_MODE = false
|
87
|
-
ok {Benry::CmdApp::Util.colorize?()} == false
|
88
|
-
ensure
|
89
|
-
$COLOR_MODE = bkup
|
90
|
-
end
|
100
|
+
spec "[!ahvsn] converts parameter name (Symbol) into argument name (String)." do
|
101
|
+
ok {Benry::CmdApp::Util.param2arg(:foo)} == "foo"
|
91
102
|
end
|
92
103
|
|
93
|
-
spec "[!
|
94
|
-
|
95
|
-
ok {Benry::CmdApp::Util.colorize?()} == true
|
96
|
-
}
|
104
|
+
spec "[!27dpw] converts `:aa_or_bb_or_cc` into `'aa|bb|cc'`." do
|
105
|
+
ok {Benry::CmdApp::Util.param2arg(:aa_or_bb_or_cc)} == "aa|bb|cc"
|
97
106
|
end
|
98
107
|
|
99
|
-
spec "[!
|
100
|
-
|
101
|
-
|
102
|
-
|
108
|
+
spec "[!to41h] converts `:aa__bb__cc` into `'aa.bb.cc'`." do
|
109
|
+
ok {Benry::CmdApp::Util.param2arg(:aa__bb__cc)} == "aa.bb.cc"
|
110
|
+
end
|
111
|
+
|
112
|
+
spec "[!2ma08] converts `:aa_bb_cc` into `'aa-bb-cc'`." do
|
113
|
+
ok {Benry::CmdApp::Util.param2arg(:aa_bb_cc)} == "aa-bb-cc"
|
103
114
|
end
|
104
115
|
|
105
116
|
end
|
106
117
|
|
107
118
|
|
108
|
-
topic '
|
119
|
+
topic '.#validate_args_and_kwargs()' do
|
109
120
|
|
110
|
-
spec "[!
|
111
|
-
|
112
|
-
|
121
|
+
spec "[!jalnr] returns error message if argument required but no args specified." do
|
122
|
+
def g1(x); end
|
123
|
+
errmsg = Benry::CmdApp::Util.validate_args_and_kwargs(self, :g1, [], {})
|
124
|
+
ok {errmsg} == "Argument required (but nothing specified)."
|
113
125
|
end
|
114
126
|
|
115
|
-
|
116
|
-
|
127
|
+
spec "[!gv6ow] returns error message if too less arguments." do
|
128
|
+
def g2(x, y); end
|
129
|
+
errmsg = Benry::CmdApp::Util.validate_args_and_kwargs(self, :g2, ["A"], {})
|
130
|
+
ok {errmsg} == "Too less arguments (at least 2 args)."
|
131
|
+
end
|
117
132
|
|
118
|
-
|
133
|
+
spec "[!q5rp3] returns error message if argument specified but no args expected." do
|
134
|
+
def g3(); end
|
135
|
+
errmsg = Benry::CmdApp::Util.validate_args_and_kwargs(self, :g3, ["A"], {})
|
136
|
+
ok {errmsg} == %q|"A": Unexpected argument (expected no args).|
|
137
|
+
end
|
119
138
|
|
120
|
-
spec "[!
|
121
|
-
|
139
|
+
spec "[!dewkt] returns error message if too much arguments specified." do
|
140
|
+
def g4(x); end
|
141
|
+
errmsg = Benry::CmdApp::Util.validate_args_and_kwargs(self, :g4, ["A", "B"], {})
|
142
|
+
ok {errmsg} == "Too much arguments (at most 1 args)."
|
122
143
|
end
|
123
144
|
|
124
|
-
spec "[!
|
125
|
-
|
126
|
-
|
145
|
+
spec "[!u7wgm] returns error message if unknown keyword argument specified." do
|
146
|
+
def g5(x: 0); end
|
147
|
+
errmsg = Benry::CmdApp::Util.validate_args_and_kwargs(self, :g5, [], {y: "abc"})
|
148
|
+
ok {errmsg} == "y: Unknown keyword argument."
|
127
149
|
end
|
128
150
|
|
129
|
-
spec "[!
|
130
|
-
|
131
|
-
|
151
|
+
spec "[!2ep76] returns nil if no error found." do
|
152
|
+
def g6(x, y=nil, z: 0); end
|
153
|
+
errmsg = Benry::CmdApp::Util.validate_args_and_kwargs(self, :g6, ["A", "B"], {z: "abc"})
|
154
|
+
ok {errmsg} == nil
|
132
155
|
end
|
133
156
|
|
134
|
-
|
135
|
-
|
136
|
-
|
157
|
+
end
|
158
|
+
|
159
|
+
|
160
|
+
topic '.#delete_escape_chars()' do
|
161
|
+
|
162
|
+
spec "[!snl3e] removes escape chars from string." do
|
163
|
+
s = "\e[1;34mUsage:\e[0m (default: help)"
|
164
|
+
x = Benry::CmdApp::Util.delete_escape_chars(s)
|
165
|
+
ok {x} == "Usage: (default: help)"
|
137
166
|
end
|
138
167
|
|
139
168
|
end
|
140
169
|
|
141
170
|
|
142
|
-
topic '
|
171
|
+
topic '.#color_mode?()' do
|
172
|
+
|
173
|
+
spec "[!xyta1] returns value of $COLOR_MODE if it is not nil." do
|
174
|
+
bkup = $COLOR_MODE
|
175
|
+
at_end { $COLOR_MODE = bkup }
|
176
|
+
#
|
177
|
+
$COLOR_MODE = true
|
178
|
+
ok {Benry::CmdApp::Util.color_mode?} == true
|
179
|
+
$COLOR_MODE = false
|
180
|
+
ok {Benry::CmdApp::Util.color_mode?} == false
|
181
|
+
end
|
143
182
|
|
144
|
-
|
145
|
-
|
183
|
+
spec "[!8xufh] returns value of $stdout.tty? if $COLOR_MODE is nil." do
|
184
|
+
bkup = $COLOR_MODE
|
185
|
+
at_end { $COLOR_MODE = bkup }
|
186
|
+
#
|
187
|
+
$COLOR_MODE = nil
|
188
|
+
x = nil
|
189
|
+
capture_sio(tty: true) { x = Benry::CmdApp::Util.color_mode? }
|
190
|
+
ok {x} == true
|
191
|
+
capture_sio(tty: false) { x = Benry::CmdApp::Util.color_mode? }
|
192
|
+
ok {x} == false
|
146
193
|
end
|
147
194
|
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
195
|
+
end
|
196
|
+
|
197
|
+
|
198
|
+
topic '.#method_override?()' do
|
199
|
+
|
200
|
+
class DummyA
|
201
|
+
def f1(); end
|
202
|
+
end
|
203
|
+
module DummyB
|
204
|
+
def f2(); end
|
205
|
+
end
|
206
|
+
class DummyC < DummyA
|
207
|
+
include DummyB
|
208
|
+
def f3(); end
|
152
209
|
end
|
153
210
|
|
154
|
-
spec "[!
|
155
|
-
|
156
|
-
|
157
|
-
ok {
|
211
|
+
spec "[!ldd1x] returns true if method defined in parent or ancestor classes." do
|
212
|
+
ok {Benry::CmdApp::Util.method_override?(DummyC, :f1)} == true
|
213
|
+
ok {Benry::CmdApp::Util.method_override?(DummyC, :f2)} == true
|
214
|
+
ok {Benry::CmdApp::Util.method_override?(DummyC, :print)} == true
|
158
215
|
end
|
159
216
|
|
160
|
-
spec "[!
|
161
|
-
|
162
|
-
|
163
|
-
ok {s} == " [[\e[2m<action>\e[0m ]] : <desc>"
|
217
|
+
spec "[!bc65v] returns false if meethod not defined in parent nor ancestor classes." do
|
218
|
+
ok {Benry::CmdApp::Util.method_override?(DummyC, :f3)} == false
|
219
|
+
ok {Benry::CmdApp::Util.method_override?(DummyC, :hoge)} == false
|
164
220
|
end
|
165
221
|
|
166
222
|
end
|
167
223
|
|
168
224
|
|
169
|
-
topic '
|
225
|
+
topic '.#name_should_be_a_string()' do
|
170
226
|
|
171
|
-
spec "[!
|
172
|
-
|
173
|
-
|
174
|
-
ok {s} == "\e[1m<action>\e[0m "
|
227
|
+
spec "[!9j4d0] do nothing if name is a string." do
|
228
|
+
x = Benry::CmdApp::Util.name_should_be_a_string("hello", "Action", Benry::CmdApp::DefinitionError)
|
229
|
+
ok {x} == nil
|
175
230
|
end
|
176
231
|
|
177
|
-
spec "[!
|
178
|
-
|
179
|
-
|
180
|
-
|
232
|
+
spec "[!a2n8y] raises error if name is not a string." do
|
233
|
+
pr = proc { Benry::CmdApp::Util.name_should_be_a_string(:hello, "Action", Benry::CmdApp::DefinitionError) }
|
234
|
+
ok {pr}.raise?(Benry::CmdApp::DefinitionError,
|
235
|
+
"`:hello`: Action name should be a string, but got Symbol object.")
|
181
236
|
end
|
182
237
|
|
183
238
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: benry-cmdapp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kwatch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: benry-cmdopt
|
@@ -17,6 +17,9 @@ dependencies:
|
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '2'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 2.2.0
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -24,6 +27,9 @@ dependencies:
|
|
24
27
|
- - "~>"
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '2'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 2.2.0
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: oktest
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,12 +64,16 @@ files:
|
|
58
64
|
- doc/benry-cmdapp.html
|
59
65
|
- doc/css/style.css
|
60
66
|
- lib/benry/cmdapp.rb
|
61
|
-
- test/action_test.rb
|
62
67
|
- test/app_test.rb
|
68
|
+
- test/config_test.rb
|
69
|
+
- test/context_test.rb
|
63
70
|
- test/func_test.rb
|
64
71
|
- test/help_test.rb
|
65
|
-
- test/
|
72
|
+
- test/metadata_test.rb
|
73
|
+
- test/misc_test.rb
|
74
|
+
- test/registry_test.rb
|
66
75
|
- test/run_all.rb
|
76
|
+
- test/scope_test.rb
|
67
77
|
- test/shared.rb
|
68
78
|
- test/util_test.rb
|
69
79
|
homepage: https://kwatch.github.io/benry-ruby/benry-cmdapp.html
|
@@ -88,11 +98,15 @@ requirements: []
|
|
88
98
|
rubygems_version: 3.4.10
|
89
99
|
signing_key:
|
90
100
|
specification_version: 4
|
91
|
-
summary: Command-line application framework
|
101
|
+
summary: Command-line application framework
|
92
102
|
test_files:
|
93
|
-
- test/action_test.rb
|
94
103
|
- test/app_test.rb
|
104
|
+
- test/config_test.rb
|
105
|
+
- test/context_test.rb
|
95
106
|
- test/func_test.rb
|
96
107
|
- test/help_test.rb
|
97
|
-
- test/
|
108
|
+
- test/metadata_test.rb
|
109
|
+
- test/misc_test.rb
|
110
|
+
- test/registry_test.rb
|
111
|
+
- test/scope_test.rb
|
98
112
|
- test/util_test.rb
|