cli-dispatcher 1.2.5 → 1.2.6
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/lib/cli-dispatcher.rb +17 -9
- data/lib/structured.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: be7440d7ccb3b1dfd9b90eae4b32d62597a864e4dd6676deaf9dc36e08d08470
|
|
4
|
+
data.tar.gz: 3338fab7655d4074368786f822ffac62c9b12d3e74ea98ef7bc554f44b248e93
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 16e45a2046ebbd9679789549b53e15afb4b4cd556bf1857feb25e61c4d90f55a4bb4d555f242fc66af926550566aa4e75fcf5bd693133475c00070ffbc102b91
|
|
7
|
+
data.tar.gz: 2f09de799fcca6242233880aa6452abf600e3d179f6ddd7b9b3d03747980d327e68e56cb8609264c3ac7b29397f5285d2264c4b96ef55c5d1eb4c74e05a26cb0
|
data/lib/cli-dispatcher.rb
CHANGED
|
@@ -227,12 +227,16 @@ class Dispatcher
|
|
|
227
227
|
end
|
|
228
228
|
|
|
229
229
|
|
|
230
|
-
# Receives options, passing them to OptionParser. The options are processed
|
|
231
|
-
# when dispatch_argv is called. The usage of this method is that after the
|
|
232
|
-
# Dispatcher object is created, this method is called to instantiate the
|
|
233
|
-
# options for the class. See #add_options for another way of doing this.
|
|
234
230
|
#
|
|
235
|
-
#
|
|
231
|
+
# Creates an OptionParser object for this Dispatcher. The options for the
|
|
232
|
+
# OptionParser are defined in a block passed to this method. The block
|
|
233
|
+
# receives one argument, which is the OptionParser object being created.
|
|
234
|
+
#
|
|
235
|
+
# The banner and -h/--help options will be added automatically to the created
|
|
236
|
+
# OptionParser object.
|
|
237
|
+
#
|
|
238
|
+
# For a slightly simpler way to set up options for this Dispatcher object, see
|
|
239
|
+
# the add_options method.
|
|
236
240
|
#
|
|
237
241
|
def setup_options
|
|
238
242
|
@option_parser = OptionParser.new do |opts|
|
|
@@ -241,10 +245,14 @@ class Dispatcher
|
|
|
241
245
|
end
|
|
242
246
|
|
|
243
247
|
#
|
|
244
|
-
#
|
|
245
|
-
# nothing.
|
|
246
|
-
#
|
|
247
|
-
#
|
|
248
|
+
# Adds command-line options for this class. By default, this method does
|
|
249
|
+
# nothing. Subclasses may override this method to add options. The method will
|
|
250
|
+
# be automatically invoked during a dispatch_argv call, thereby constructing
|
|
251
|
+
# an OptionParser object to handle the command-line arguments.
|
|
252
|
+
#
|
|
253
|
+
# The argument to this method is an OptionParser object, to which the desired
|
|
254
|
+
# options may be added. The banner and -h/--help options will be added
|
|
255
|
+
# automatically to the OptionParser object.
|
|
248
256
|
#
|
|
249
257
|
def add_options(opts)
|
|
250
258
|
end
|
data/lib/structured.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cli-dispatcher
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Charles Duan
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2025-
|
|
10
|
+
date: 2025-12-04 00:00:00.000000000 Z
|
|
11
11
|
dependencies: []
|
|
12
12
|
description: |
|
|
13
13
|
Library for creating command-line programs that accept commands. Also
|
|
@@ -42,7 +42,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
42
42
|
- !ruby/object:Gem::Version
|
|
43
43
|
version: '0'
|
|
44
44
|
requirements: []
|
|
45
|
-
rubygems_version: 3.
|
|
45
|
+
rubygems_version: 3.6.9
|
|
46
46
|
specification_version: 4
|
|
47
47
|
summary: Command-line command dispatcher
|
|
48
48
|
test_files: []
|