como 0.1.1 → 0.1.2
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.
- data/CHANGELOG.rdoc +8 -0
- data/doc/Como/ArgsParseState.html +50 -50
- data/doc/Como/ComoCommon.html +9 -9
- data/doc/Como/MainOpt.html +126 -43
- data/doc/Como/Opt/ErrorWithData.html +10 -10
- data/doc/Como/Opt/InvalidOption.html +1 -1
- data/doc/Como/Opt/MissingArgument.html +1 -1
- data/doc/Como/Opt.html +767 -741
- data/doc/Como/RuleCheck.html +87 -87
- data/doc/Como/RuleDisplay.html +79 -79
- data/doc/Como/Spec.html +76 -90
- data/doc/Como.html +7 -6
- data/doc/_index.html +1 -1
- data/doc/file.CHANGELOG.html +9 -2
- data/doc/file.README.html +1 -1
- data/doc/index.html +1 -1
- data/doc/method_list.html +81 -75
- data/doc/top-level-namespace.html +1 -1
- data/lib/como.rb +160 -127
- data/test/como_compatible +1 -4
- data/test/como_config +4 -6
- data/test/como_options +2 -11
- data/test/como_queries +1 -4
- data/test/como_subcmd +2 -16
- data/test/como_subcmd_config +6 -9
- data/test/como_subcmd_rule +69 -0
- data/test/golden/compatible.txt +108 -97
- data/test/golden/config.txt +45 -149
- data/test/golden/options.txt +144 -115
- data/test/golden/queries.txt +13 -8
- data/test/golden/rule_1.txt +60 -39
- data/test/golden/rule_2.txt +60 -39
- data/test/golden/subcmd.txt +137 -131
- data/test/golden/subcmd_config.txt +162 -124
- data/test/golden/subcmd_rule.txt +366 -0
- data/test/test_como.rb +18 -9
- data/test/test_compatible +28 -28
- data/test/test_options +1 -0
- data/test/test_subcmd_rule +30 -0
- metadata +5 -2
data/test/golden/subcmd.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
+
---- CMD: como_subcmd
|
1
2
|
|
2
3
|
como_subcmd error: Subcommand required for "como_subcmd"...
|
3
4
|
|
4
|
-
|
5
|
-
como_subcmd [-p <password>] [-u <username>+] <<subcommand>>
|
5
|
+
como_subcmd [-p <password>] [-u <username>+] <<subcommand>>
|
6
6
|
|
7
|
-
Options:
|
7
|
+
Options:
|
8
8
|
-p User password.
|
9
9
|
-u Username(s).
|
10
10
|
|
@@ -16,13 +16,13 @@ como_subcmd error: Subcommand required for "como_subcmd"...
|
|
16
16
|
|
17
17
|
Copyright (c) 2013 by Como Tester
|
18
18
|
|
19
|
+
---- CMD: como_subcmd -p passwd
|
19
20
|
|
20
21
|
como_subcmd error: Subcommand required for "como_subcmd"...
|
21
22
|
|
22
|
-
|
23
|
-
como_subcmd [-p <password>] [-u <username>+] <<subcommand>>
|
23
|
+
como_subcmd [-p <password>] [-u <username>+] <<subcommand>>
|
24
24
|
|
25
|
-
Options:
|
25
|
+
Options:
|
26
26
|
-p User password.
|
27
27
|
-u Username(s).
|
28
28
|
|
@@ -34,6 +34,7 @@ como_subcmd error: Subcommand required for "como_subcmd"...
|
|
34
34
|
|
35
35
|
Copyright (c) 2013 by Como Tester
|
36
36
|
|
37
|
+
---- CMD: como_subcmd add
|
37
38
|
|
38
39
|
como_subcmd error: Option "-f" missing for "como_subcmd add"...
|
39
40
|
|
@@ -45,41 +46,9 @@ como_subcmd error: Option "-f" missing for "como_subcmd add"...
|
|
45
46
|
-f File.
|
46
47
|
|
47
48
|
|
48
|
-
|
49
|
-
|
50
|
-
Subcommand "add" usage:
|
51
|
-
como_subcmd add [-fo] [-u <username>] -f <file>
|
52
|
-
|
53
|
-
-fo Force operation.
|
54
|
-
-u Username.
|
55
|
-
-f File.
|
56
|
-
|
57
|
-
|
58
|
-
como_subcmd error: Option combination mismatch!
|
59
|
-
|
60
|
-
Usage:
|
61
|
-
como_subcmd [-p <password>] [-u <username>+] <<subcommand>>
|
62
|
-
|
63
|
-
Options:
|
64
|
-
-p User password.
|
65
|
-
-u Username(s).
|
66
|
-
|
67
|
-
Subcommands:
|
68
|
-
add Add file to repo.
|
69
|
-
rm Remove file from repo.
|
70
|
-
commit Commit (pending) changes to repo.
|
49
|
+
---- CMD: como_subcmd add -f
|
71
50
|
|
72
|
-
|
73
|
-
Copyright (c) 2013 by Como Tester
|
74
|
-
|
75
|
-
|
76
|
-
Option Combinations:
|
77
|
-
|--# One or more of:
|
78
|
-
| |--<password>
|
79
|
-
| |--<username>
|
80
|
-
|
81
|
-
|
82
|
-
como_subcmd error: Option combination mismatch!
|
51
|
+
como_subcmd error: No argument given for "-f"...
|
83
52
|
|
84
53
|
Subcommand "add" usage:
|
85
54
|
como_subcmd add [-fo] [-u <username>] -f <file>
|
@@ -89,20 +58,44 @@ como_subcmd error: Option combination mismatch!
|
|
89
58
|
-f File.
|
90
59
|
|
91
60
|
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
61
|
+
---- CMD: como_subcmd add -f file
|
62
|
+
Options for: como_subcmd
|
63
|
+
Given "help": false
|
64
|
+
Given "password": false
|
65
|
+
Given "username": false
|
66
|
+
Given "terminator": false
|
67
|
+
Given "add": true
|
68
|
+
Given "rm": false
|
69
|
+
Given "commit": false
|
70
|
+
Options for: add
|
71
|
+
Given "help": false
|
72
|
+
Given "force": false
|
73
|
+
Given "username": false
|
74
|
+
Given "file": true
|
75
|
+
Value "file": file
|
76
|
+
---- CMD: como_subcmd -p pass add -f file
|
77
|
+
Options for: como_subcmd
|
78
|
+
Given "help": false
|
79
|
+
Given "password": true
|
80
|
+
Value "password": pass
|
81
|
+
Given "username": false
|
82
|
+
Given "terminator": false
|
83
|
+
Given "add": true
|
84
|
+
Given "rm": false
|
85
|
+
Given "commit": false
|
86
|
+
Options for: add
|
87
|
+
Given "help": false
|
88
|
+
Given "force": false
|
89
|
+
Given "username": false
|
90
|
+
Given "file": true
|
91
|
+
Value "file": file
|
92
|
+
---- CMD: como_subcmd -p pass -u name1 add -f file
|
99
93
|
|
100
94
|
como_subcmd error: Unknown option "-f"...
|
101
95
|
|
102
|
-
|
103
|
-
como_subcmd [-p <password>] [-u <username>+] <<subcommand>>
|
96
|
+
como_subcmd [-p <password>] [-u <username>+] <<subcommand>>
|
104
97
|
|
105
|
-
Options:
|
98
|
+
Options:
|
106
99
|
-p User password.
|
107
100
|
-u Username(s).
|
108
101
|
|
@@ -114,77 +107,73 @@ como_subcmd error: Unknown option "-f"...
|
|
114
107
|
|
115
108
|
Copyright (c) 2013 by Como Tester
|
116
109
|
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
como_subcmd error: Option combination mismatch!
|
137
|
-
|
138
|
-
Subcommand "add" usage:
|
139
|
-
como_subcmd add [-fo] [-u <username>] -f <file>
|
140
|
-
|
141
|
-
-fo Force operation.
|
142
|
-
-u Username.
|
143
|
-
-f File.
|
144
|
-
|
145
|
-
|
146
|
-
Option Combinations:
|
147
|
-
|--# One of:
|
148
|
-
| |--<file>
|
149
|
-
| |--<username>
|
150
|
-
| |--# Not:
|
151
|
-
| | |--<-fo>
|
152
|
-
|
153
|
-
|
154
|
-
como_subcmd error: Option combination mismatch!
|
155
|
-
|
156
|
-
Subcommand "add" usage:
|
157
|
-
como_subcmd add [-fo] [-u <username>] -f <file>
|
158
|
-
|
159
|
-
-fo Force operation.
|
160
|
-
-u Username.
|
161
|
-
-f File.
|
162
|
-
|
163
|
-
|
164
|
-
Option Combinations:
|
165
|
-
|--# One of:
|
166
|
-
| |--<file>
|
167
|
-
| |--<username>
|
168
|
-
| |--# Not:
|
169
|
-
| | |--<-fo>
|
170
|
-
|
110
|
+
---- CMD: como_subcmd -p pass -u name1 - add -f file
|
111
|
+
Options for: como_subcmd
|
112
|
+
Given "help": false
|
113
|
+
Given "password": true
|
114
|
+
Value "password": pass
|
115
|
+
Given "username": true
|
116
|
+
Value "username": ["name1"]
|
117
|
+
Given "terminator": true
|
118
|
+
Given "add": true
|
119
|
+
Given "rm": false
|
120
|
+
Given "commit": false
|
121
|
+
Options for: add
|
122
|
+
Given "help": false
|
123
|
+
Given "force": false
|
124
|
+
Given "username": false
|
125
|
+
Given "file": true
|
126
|
+
Value "file": file
|
127
|
+
---- CMD: como_subcmd -p pass add -f file -u user
|
171
128
|
Options for: como_subcmd
|
172
129
|
Given "help": false
|
173
130
|
Given "password": true
|
131
|
+
Value "password": pass
|
174
132
|
Given "username": false
|
175
133
|
Given "terminator": false
|
176
134
|
Given "add": true
|
177
135
|
Given "rm": false
|
178
136
|
Given "commit": false
|
137
|
+
Options for: add
|
138
|
+
Given "help": false
|
139
|
+
Given "force": false
|
140
|
+
Given "username": true
|
141
|
+
Value "username": user
|
142
|
+
Given "file": true
|
143
|
+
Value "file": file
|
144
|
+
---- CMD: como_subcmd -p pass add -f file
|
145
|
+
Options for: como_subcmd
|
146
|
+
Given "help": false
|
147
|
+
Given "password": true
|
179
148
|
Value "password": pass
|
180
|
-
|
149
|
+
Given "username": false
|
150
|
+
Given "terminator": false
|
151
|
+
Given "add": true
|
152
|
+
Given "rm": false
|
153
|
+
Given "commit": false
|
154
|
+
Options for: add
|
155
|
+
Given "help": false
|
156
|
+
Given "force": false
|
157
|
+
Given "username": false
|
158
|
+
Given "file": true
|
159
|
+
Value "file": file
|
160
|
+
---- CMD: como_subcmd -p pass add -f file -fo
|
161
|
+
Options for: como_subcmd
|
162
|
+
Given "help": false
|
163
|
+
Given "password": true
|
164
|
+
Value "password": pass
|
165
|
+
Given "username": false
|
166
|
+
Given "terminator": false
|
167
|
+
Given "add": true
|
168
|
+
Given "rm": false
|
169
|
+
Given "commit": false
|
181
170
|
Options for: add
|
182
171
|
Given "help": false
|
183
172
|
Given "force": true
|
184
173
|
Given "username": false
|
185
174
|
Given "file": true
|
186
|
-
Value "force": true
|
187
175
|
Value "file": file
|
176
|
+
---- CMD: como_subcmd -p pass add -f file -fo -h
|
188
177
|
|
189
178
|
Subcommand "add" usage:
|
190
179
|
como_subcmd add [-fo] [-u <username>] -f <file>
|
@@ -194,7 +183,9 @@ Options for: add
|
|
194
183
|
-f File.
|
195
184
|
|
196
185
|
|
197
|
-
|
186
|
+
---- CMD: como_subcmd -p pass add -f file -fo rm
|
187
|
+
|
188
|
+
como_subcmd error: No default option specified to allow "rm"...
|
198
189
|
|
199
190
|
Subcommand "add" usage:
|
200
191
|
como_subcmd add [-fo] [-u <username>] -f <file>
|
@@ -204,7 +195,9 @@ como_subcmd error: No default option specified for "rm"...
|
|
204
195
|
-f File.
|
205
196
|
|
206
197
|
|
207
|
-
|
198
|
+
---- CMD: como_subcmd add -f file -fo commit
|
199
|
+
|
200
|
+
como_subcmd error: No default option specified to allow "commit"...
|
208
201
|
|
209
202
|
Subcommand "add" usage:
|
210
203
|
como_subcmd add [-fo] [-u <username>] -f <file>
|
@@ -214,7 +207,9 @@ como_subcmd error: No default option specified for "commit"...
|
|
214
207
|
-f File.
|
215
208
|
|
216
209
|
|
217
|
-
|
210
|
+
---- CMD: como_subcmd -p pass add -f file -fo commit
|
211
|
+
|
212
|
+
como_subcmd error: No default option specified to allow "commit"...
|
218
213
|
|
219
214
|
Subcommand "add" usage:
|
220
215
|
como_subcmd add [-fo] [-u <username>] -f <file>
|
@@ -223,22 +218,24 @@ como_subcmd error: No default option specified for "commit"...
|
|
223
218
|
-u Username.
|
224
219
|
-f File.
|
225
220
|
|
221
|
+
|
222
|
+
---- CMD: como_subcmd -p pass rm
|
226
223
|
Options for: como_subcmd
|
227
224
|
Given "help": false
|
228
225
|
Given "password": true
|
226
|
+
Value "password": pass
|
229
227
|
Given "username": false
|
230
228
|
Given "terminator": false
|
231
229
|
Given "add": false
|
232
230
|
Given "rm": true
|
233
231
|
Given "commit": false
|
234
|
-
Value "password": pass
|
235
|
-
Value "rm": false
|
236
232
|
Options for: rm
|
237
233
|
Given "help": false
|
238
234
|
Given "force": false
|
239
235
|
Given "file": false
|
236
|
+
---- CMD: como_subcmd -p pass rm commit
|
240
237
|
|
241
|
-
como_subcmd error: No default option specified
|
238
|
+
como_subcmd error: No default option specified to allow "commit"...
|
242
239
|
|
243
240
|
Subcommand "rm" usage:
|
244
241
|
como_subcmd rm [-fo] [-f <file>]
|
@@ -246,111 +243,120 @@ como_subcmd error: No default option specified for "commit"...
|
|
246
243
|
-fo Force operation.
|
247
244
|
-f File.
|
248
245
|
|
246
|
+
|
247
|
+
---- CMD: como_subcmd -p pass rm -f commit
|
249
248
|
Options for: como_subcmd
|
250
249
|
Given "help": false
|
251
250
|
Given "password": true
|
251
|
+
Value "password": pass
|
252
252
|
Given "username": false
|
253
253
|
Given "terminator": false
|
254
254
|
Given "add": false
|
255
255
|
Given "rm": true
|
256
256
|
Given "commit": false
|
257
|
-
Value "password": pass
|
258
|
-
Value "rm": false
|
259
257
|
Options for: rm
|
260
258
|
Given "help": false
|
261
259
|
Given "force": false
|
262
260
|
Given "file": true
|
263
261
|
Value "file": commit
|
262
|
+
---- CMD: como_subcmd -p pass commit
|
264
263
|
Options for: como_subcmd
|
265
264
|
Given "help": false
|
266
265
|
Given "password": true
|
266
|
+
Value "password": pass
|
267
267
|
Given "username": false
|
268
268
|
Given "terminator": false
|
269
269
|
Given "add": false
|
270
270
|
Given "rm": false
|
271
271
|
Given "commit": true
|
272
|
-
Value "password": pass
|
273
|
-
Value "commit": false
|
274
272
|
Options for: commit
|
275
273
|
Given "help": false
|
276
274
|
Given "quiet": false
|
277
275
|
Given "username": false
|
278
276
|
Given "<default>": false
|
277
|
+
---- CMD: como_subcmd -p pass commit dii duu
|
279
278
|
Options for: como_subcmd
|
280
279
|
Given "help": false
|
281
280
|
Given "password": true
|
281
|
+
Value "password": pass
|
282
282
|
Given "username": false
|
283
283
|
Given "terminator": false
|
284
284
|
Given "add": false
|
285
285
|
Given "rm": false
|
286
286
|
Given "commit": true
|
287
|
-
Value "password": pass
|
288
|
-
Value "commit": false
|
289
287
|
Options for: commit
|
290
288
|
Given "help": false
|
291
289
|
Given "quiet": false
|
292
290
|
Given "username": false
|
293
291
|
Given "<default>": true
|
294
292
|
Value "<default>": ["dii", "duu"]
|
293
|
+
---- CMD: como_subcmd -p pass commit -u user1 dii duu
|
295
294
|
Options for: como_subcmd
|
296
295
|
Given "help": false
|
297
296
|
Given "password": true
|
297
|
+
Value "password": pass
|
298
298
|
Given "username": false
|
299
299
|
Given "terminator": false
|
300
300
|
Given "add": false
|
301
301
|
Given "rm": false
|
302
302
|
Given "commit": true
|
303
|
-
Value "password": pass
|
304
|
-
Value "commit": false
|
305
303
|
Options for: commit
|
306
304
|
Given "help": false
|
307
305
|
Given "quiet": false
|
308
306
|
Given "username": true
|
309
|
-
Given "<default>": true
|
310
307
|
Value "username": user1
|
308
|
+
Given "<default>": true
|
311
309
|
Value "<default>": ["dii", "duu"]
|
310
|
+
---- CMD: como_subcmd -p pass commit -u user1 dii duu -h
|
312
311
|
|
313
312
|
Subcommand "commit" usage:
|
314
|
-
como_subcmd commit [-q] [-u <username>] [<
|
313
|
+
como_subcmd commit [-q] [-u <username>] [<default>]
|
315
314
|
|
316
315
|
-q Quiet operation.
|
317
316
|
-u Username.
|
318
|
-
<
|
317
|
+
<default> File(s) to commit.
|
319
318
|
|
320
319
|
|
320
|
+
---- CMD: como_subcmd -p pass commit -h -u user1 dii duu
|
321
|
+
|
321
322
|
Subcommand "commit" usage:
|
322
|
-
como_subcmd commit [-q] [-u <username>] [<
|
323
|
+
como_subcmd commit [-q] [-u <username>] [<default>]
|
323
324
|
|
324
325
|
-q Quiet operation.
|
325
326
|
-u Username.
|
326
|
-
<
|
327
|
+
<default> File(s) to commit.
|
328
|
+
|
327
329
|
|
330
|
+
---- CMD: como_subcmd commit -h -u user1 dii duu -h
|
328
331
|
|
329
332
|
Subcommand "commit" usage:
|
330
|
-
como_subcmd commit [-q] [-u <username>] [<
|
333
|
+
como_subcmd commit [-q] [-u <username>] [<default>]
|
331
334
|
|
332
335
|
-q Quiet operation.
|
333
336
|
-u Username.
|
334
|
-
<
|
337
|
+
<default> File(s) to commit.
|
335
338
|
|
336
339
|
|
340
|
+
---- CMD: como_subcmd commit -u user1 dii duu -h
|
341
|
+
|
337
342
|
Subcommand "commit" usage:
|
338
|
-
como_subcmd commit [-q] [-u <username>] [<
|
343
|
+
como_subcmd commit [-q] [-u <username>] [<default>]
|
339
344
|
|
340
345
|
-q Quiet operation.
|
341
346
|
-u Username.
|
342
|
-
<
|
347
|
+
<default> File(s) to commit.
|
348
|
+
|
343
349
|
|
350
|
+
---- CMD: como_subcmd -p foo commit foo -- external arguments
|
344
351
|
Options for: como_subcmd
|
345
352
|
Given "help": false
|
346
353
|
Given "password": true
|
354
|
+
Value "password": foo
|
347
355
|
Given "username": false
|
348
356
|
Given "terminator": false
|
349
357
|
Given "add": false
|
350
358
|
Given "rm": false
|
351
359
|
Given "commit": true
|
352
|
-
Value "password": foo
|
353
|
-
Value "commit": false
|
354
360
|
Options for: commit
|
355
361
|
Given "help": false
|
356
362
|
Given "quiet": false
|