benry-cmdapp 0.2.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/test/shared.rb CHANGED
@@ -1,75 +1,138 @@
1
1
  # -*- coding: utf-8 -*-
2
+ # frozen_string_literal: true
2
3
 
3
4
 
4
- module CommonTestingHelper
5
+ require 'oktest'
5
6
 
6
- def uncolorize(str)
7
- return str.gsub(/\e\[.*?m/, '')
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
- def without_tty(&block)
11
- result = nil
12
- capture_sio(tty: false) { result = yield }
13
- return result
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
- def with_tty(&block)
17
- result = nil
18
- capture_sio(tty: true) { result = yield }
19
- return result
30
+ @action.("raises ZeroDivisionError")
31
+ def testerr1()
32
+ 1/0
20
33
  end
21
34
 
22
- def with_important(keyval={}, &block)
23
- bkup = {}
24
- keyval.each do |name, val|
25
- action = Benry::CmdApp::INDEX.get_action(name)
26
- bkup[name] = action.important
27
- action.instance_variable_set('@important', val)
28
- end
29
- begin
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
- module_function
45
+ end
46
+
47
+
48
+ class GitAction < Benry::CmdApp::Action
49
+ category "git:"
40
50
 
41
- def clear_index_except(klass)
42
- actions = Benry::CmdApp::INDEX.instance_variable_get('@actions')
43
- aliases = Benry::CmdApp::INDEX.instance_variable_get('@aliases')
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
- def restore_index()
52
- actions = Benry::CmdApp::INDEX.instance_variable_get('@actions')
53
- aliases = Benry::CmdApp::INDEX.instance_variable_get('@aliases')
54
- actions.update(@_bkup_actions)
55
- aliases.update(@_bkup_aliases)
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
- module ActionMetadataTestingHelper
62
- include CommonTestingHelper
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
- def new_metadata(schema, meth=:halo1, **kwargs)
71
- metadata = Benry::CmdApp::ActionMetadata.new(meth.to_s, MetadataTestAction, meth, "greeting", schema, **kwargs)
72
- return metadata
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
- require 'benry/cmdapp'
6
- require_relative './shared'
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 '.hidden_name?()' do
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 "[!fcfic] returns true if name is '_foo'." do
18
- ok {Benry::CmdApp::Util.hidden_name?("_foo")} == true
34
+ spec "[!o5822] converts `:foo_` into `'foo'`." do
35
+ ok {Benry::CmdApp::Util.method2action(:foo_)} == "foo"
19
36
  end
20
37
 
21
- spec "[!po5co] returns true if name is '_foo:bar'." do
22
- ok {Benry::CmdApp::Util.hidden_name?("_foo:bar")} == true
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 "[!9iqz3] returns true if name is 'foo:_bar'." do
26
- ok {Benry::CmdApp::Util.hidden_name?("foo:_bar")} == true
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 "[!mjjbg] returns false if else." do
30
- ok {Benry::CmdApp::Util.hidden_name?("foo")} == false
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 '.schema_empty?()' do
55
+ topic '.#method2help()' do
40
56
 
41
- spec "[!8t5ju] returns true if schema empty." do
42
- sc = Benry::CmdOpt::Schema.new
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 "[!c4ljy] returns true if schema contains only private (hidden) options." do
49
- sc = Benry::CmdOpt::Schema.new
50
- sc.add(:help, "-h", "help", hidden: true)
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
- end
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
- topic '.method2action()' do
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 "[!801f9] converts action name 'aa_bb_cc_' into 'aa_bb_cc'." do
62
- ok {Benry::CmdApp::Util.method2action("aa_")} == "aa"
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 "[!9pahu] converts action name 'aa__bb__cc' into 'aa:bb:cc'." do
67
- ok {Benry::CmdApp::Util.method2action("aa__bb__cc")} == "aa:bb:cc"
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 "[!7a1s7] converts action name 'aa_bb:_cc_dd' into 'aa-bb:_cc-dd'." do
71
- ok {Benry::CmdApp::Util.method2action("aa_bb:cc_dd")} == "aa-bb:cc-dd"
72
- ok {Benry::CmdApp::Util.method2action("aa_bb:_cc_dd")} == "aa-bb:_cc-dd"
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 '.colorize?()' do
98
+ topic '.#param2arg()' do
80
99
 
81
- spec "[!801y1] returns $COLOR_MODE value if it is not nil." do
82
- bkup = $COLOR_MODE
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 "[!0harg] returns true if stdout is a tty." do
94
- capture_sio(tty: true) {
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 "[!u1j1x] returns false if stdout is not a tty." do
100
- capture_sio(tty: false) {
101
- ok {Benry::CmdApp::Util.colorize?()} == false
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 '.del_escape_seq()' do
119
+ topic '.#validate_args_and_kwargs()' do
109
120
 
110
- spec "[!wgp2b] deletes escape sequence." do
111
- s = " \e[1m%-18s\e[0m : %s"
112
- ok {Benry::CmdApp::Util.del_escape_seq(s)} == " %-18s : %s"
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
- end
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
- topic '._important?()' do
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 "[!0yz2h] returns nil if tag == nil." do
121
- ok {Benry::CmdApp::Util._important?(nil)} == nil
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 "[!h5pid] returns true if tag == :important." do
125
- ok {Benry::CmdApp::Util._important?(:important)} == true
126
- ok {Benry::CmdApp::Util._important?("important")} == true
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 "[!7zval] returns false if tag == :unimportant." do
130
- ok {Benry::CmdApp::Util._important?(:unimportant)} == false
131
- ok {Benry::CmdApp::Util._important?("unimportant")} == false
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
- spec "[!z1ygi] supports nested tag." do
135
- ok {Benry::CmdApp::Util._important?([:important, :foo])} == true
136
- ok {Benry::CmdApp::Util._important?([:bar, :unimportant])} == false
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 '.format_help_line()' do
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
- fixture :format do
145
- " [[%-10s]] : %s"
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
- spec "[!xx1vj] if `important == nil` then format help line with no decoration." do
149
- |format|
150
- s = Benry::CmdApp::Util.format_help_line(format, "<action>", "<desc>", nil)
151
- ok {s} == " [[<action> ]] : <desc>"
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 "[!oaxp1] if `important == true` then format help line with strong decoration." do
155
- |format|
156
- s = Benry::CmdApp::Util.format_help_line(format, "<action>", "<desc>", true)
157
- ok {s} == " [[\e[4m<action>\e[0m ]] : <desc>"
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 "[!bdhh6] if `important == false` then format help line with weak decoration." do
161
- |format|
162
- s = Benry::CmdApp::Util.format_help_line(format, "<action>", "<desc>", false)
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 '.fill_with_decoration()' do
225
+ topic '.#name_should_be_a_string()' do
170
226
 
171
- spec "[!udrbj] returns decorated string with padding by white spaces." do
172
- format = " [[%-10s]] : %s"
173
- s = Benry::CmdApp::Util.fill_with_decoration(format, "<action>") {|s| "\e[1m#{s}\e[0m" }
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 "[!7bl2b] considers minus sign in format." do
178
- format = " [[%10s]] : %s"
179
- s = Benry::CmdApp::Util.fill_with_decoration(format, "<action>") {|s| "\e[1m#{s}\e[0m" }
180
- ok {s} == " \e[1m<action>\e[0m"
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: 0.2.0
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-10-18 00:00:00.000000000 Z
11
+ date: 2023-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: benry-cmdopt
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '2'
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 2.1.0
22
+ version: 2.2.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '2'
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 2.1.0
32
+ version: 2.2.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: oktest
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -64,12 +64,16 @@ files:
64
64
  - doc/benry-cmdapp.html
65
65
  - doc/css/style.css
66
66
  - lib/benry/cmdapp.rb
67
- - test/action_test.rb
68
67
  - test/app_test.rb
68
+ - test/config_test.rb
69
+ - test/context_test.rb
69
70
  - test/func_test.rb
70
71
  - test/help_test.rb
71
- - test/index_test.rb
72
+ - test/metadata_test.rb
73
+ - test/misc_test.rb
74
+ - test/registry_test.rb
72
75
  - test/run_all.rb
76
+ - test/scope_test.rb
73
77
  - test/shared.rb
74
78
  - test/util_test.rb
75
79
  homepage: https://kwatch.github.io/benry-ruby/benry-cmdapp.html
@@ -94,11 +98,15 @@ requirements: []
94
98
  rubygems_version: 3.4.10
95
99
  signing_key:
96
100
  specification_version: 4
97
- summary: Command-line application framework`
101
+ summary: Command-line application framework
98
102
  test_files:
99
- - test/action_test.rb
100
103
  - test/app_test.rb
104
+ - test/config_test.rb
105
+ - test/context_test.rb
101
106
  - test/func_test.rb
102
107
  - test/help_test.rb
103
- - test/index_test.rb
108
+ - test/metadata_test.rb
109
+ - test/misc_test.rb
110
+ - test/registry_test.rb
111
+ - test/scope_test.rb
104
112
  - test/util_test.rb