cl 0.1.28 → 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 +5 -5
- data/Gemfile +1 -0
- data/Gemfile.lock +19 -1
- data/NOTES.md +2 -0
- data/README.md +210 -142
- data/examples/args/cast +53 -41
- data/examples/args/opts +72 -14
- data/examples/args/required +28 -14
- data/examples/args/splat +29 -32
- data/examples/gem +26 -37
- data/examples/heroku +15 -16
- data/examples/rakeish +13 -15
- data/examples/readme/abstract +6 -5
- data/examples/readme/alias +4 -7
- data/examples/readme/arg +4 -2
- data/examples/readme/arg_array +4 -2
- data/examples/readme/arg_type +3 -1
- data/examples/readme/args_splat +13 -4
- data/examples/readme/default +2 -2
- data/examples/readme/deprecated +3 -6
- data/examples/readme/deprecated_alias +2 -4
- data/examples/readme/downcase +2 -2
- data/examples/readme/enum +10 -5
- data/examples/readme/example +6 -4
- data/examples/readme/format +9 -7
- data/examples/readme/internal +8 -4
- data/examples/readme/negate +20 -5
- data/examples/readme/node +19 -0
- data/examples/readme/opts +8 -8
- data/examples/readme/opts_block +4 -3
- data/examples/readme/range +9 -7
- data/examples/readme/required +9 -7
- data/examples/readme/requireds +26 -18
- data/examples/readme/requires +13 -14
- data/examples/readme/secret +7 -9
- data/examples/readme/see +6 -8
- data/examples/readme/type +2 -6
- data/examples/src/args/cast.erb.rb +96 -0
- data/examples/src/args/opts.erb.rb +96 -0
- data/examples/src/args/required.erb.rb +61 -0
- data/examples/src/args/splat.erb.rb +55 -0
- data/examples/src/gem.erb.rb +95 -0
- data/examples/src/heroku.erb.rb +47 -0
- data/examples/src/rakeish.erb.rb +54 -0
- data/examples/src/readme/abstract.erb.rb +25 -0
- data/examples/src/readme/alias.erb.rb +20 -0
- data/examples/src/readme/arg.erb.rb +19 -0
- data/examples/src/readme/arg_array.erb.rb +19 -0
- data/examples/src/readme/arg_type.erb.rb +21 -0
- data/examples/src/readme/args_splat.erb.rb +49 -0
- data/examples/src/readme/array.erb.rb +19 -0
- data/examples/src/readme/default.erb.rb +19 -0
- data/examples/src/readme/deprecated.erb.rb +19 -0
- data/examples/src/readme/deprecated_alias.erb.rb +19 -0
- data/examples/src/readme/downcase.erb.rb +19 -0
- data/examples/src/readme/enum.erb.rb +33 -0
- data/examples/src/readme/example.erb.rb +23 -0
- data/examples/src/readme/format.erb.rb +33 -0
- data/examples/src/readme/internal.erb.rb +26 -0
- data/examples/src/readme/negate.erb.rb +35 -0
- data/examples/src/readme/node.erb.rb +23 -0
- data/examples/src/readme/opts.erb.rb +31 -0
- data/examples/src/readme/opts_block.erb.rb +28 -0
- data/examples/src/readme/range.erb.rb +33 -0
- data/examples/src/readme/required.erb.rb +33 -0
- data/examples/src/readme/requireds.erb.rb +44 -0
- data/examples/src/readme/requires.erb.rb +33 -0
- data/examples/src/readme/secret.erb.rb +20 -0
- data/examples/src/readme/see.erb.rb +23 -0
- data/examples/src/readme/type.erb.rb +19 -0
- data/lib/cl/ui.rb +2 -2
- data/lib/cl/version.rb +1 -1
- metadata +40 -10
data/examples/args/cast
CHANGED
|
@@ -3,67 +3,57 @@ $: << File.expand_path('lib')
|
|
|
3
3
|
|
|
4
4
|
require 'cl'
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
module Cast
|
|
7
|
+
class Bool < Cl::Cmd
|
|
8
|
+
arg :bool, type: :bool
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
def run
|
|
11
|
+
p cmd: registry_key, bool: bool
|
|
12
|
+
end
|
|
11
13
|
end
|
|
12
|
-
end
|
|
13
14
|
|
|
14
|
-
class Types < Cl::Cmd
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
class Types < Cl::Cmd
|
|
16
|
+
arg :a, type: :bool
|
|
17
|
+
arg :b, type: :int
|
|
18
|
+
arg :c, type: :float
|
|
19
|
+
arg :d
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
def run
|
|
22
|
+
p cmd: registry_key, a: a, b: b, c: c, d: d
|
|
23
|
+
end
|
|
22
24
|
end
|
|
23
25
|
end
|
|
24
26
|
|
|
25
|
-
|
|
26
|
-
args = args.map { |key, value| "#{key}=#{value.inspect}" }.join(' ')
|
|
27
|
-
puts "Called #{cmd} with #{args}\n\n"
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
output *Cl.new($0).run(%w(bool on))
|
|
27
|
+
Cl.new($0).run(%w(bool on))
|
|
31
28
|
|
|
32
29
|
# Output:
|
|
33
30
|
#
|
|
34
|
-
#
|
|
31
|
+
# {:cmd=>:bool, :bool=>true}
|
|
35
32
|
|
|
36
|
-
|
|
33
|
+
Cl.new($0).run(%w(types true 1 1.2 foo))
|
|
37
34
|
|
|
38
35
|
# Output:
|
|
39
36
|
#
|
|
40
|
-
#
|
|
37
|
+
# {:cmd=>:types, :a=>true, :b=>1, :c=>1.2, :d=>"foo"}
|
|
41
38
|
|
|
42
|
-
|
|
39
|
+
Cl.new($0).run(%w(types true 1 1.2 foo bar))
|
|
43
40
|
|
|
44
41
|
# Output:
|
|
45
42
|
#
|
|
46
|
-
#
|
|
47
|
-
|
|
48
|
-
output *Cl.new($0).run(%w(bool on))
|
|
49
|
-
|
|
50
|
-
# Output:
|
|
43
|
+
# Too many arguments (given: 5, allowed: 4)
|
|
51
44
|
#
|
|
52
|
-
#
|
|
53
|
-
|
|
54
|
-
output *Cl.new($0).run(%w(types true 1 1.2 foo))
|
|
55
|
-
|
|
56
|
-
# Output:
|
|
45
|
+
# Usage: bin/examples types [a:bool] [b:int] [c:float] [d] [options]
|
|
57
46
|
#
|
|
58
|
-
#
|
|
59
|
-
|
|
60
|
-
Cl.new($0).run(%w(types true 1 1.2))
|
|
61
|
-
|
|
62
|
-
# Output:
|
|
47
|
+
# Arguments:
|
|
63
48
|
#
|
|
64
|
-
#
|
|
49
|
+
# a type: bool
|
|
50
|
+
# b type: int
|
|
51
|
+
# c type: float
|
|
52
|
+
# d type: string
|
|
53
|
+
#
|
|
54
|
+
# Options:
|
|
65
55
|
#
|
|
66
|
-
#
|
|
56
|
+
# --help Get help on this command
|
|
67
57
|
|
|
68
58
|
Cl.new($0).run(%w(types true one 1.2))
|
|
69
59
|
|
|
@@ -71,7 +61,18 @@ Cl.new($0).run(%w(types true one 1.2))
|
|
|
71
61
|
#
|
|
72
62
|
# Wrong argument type (given: "one", expected: int)
|
|
73
63
|
#
|
|
74
|
-
# Usage:
|
|
64
|
+
# Usage: bin/examples types [a:bool] [b:int] [c:float] [d] [options]
|
|
65
|
+
#
|
|
66
|
+
# Arguments:
|
|
67
|
+
#
|
|
68
|
+
# a type: bool
|
|
69
|
+
# b type: int
|
|
70
|
+
# c type: float
|
|
71
|
+
# d type: string
|
|
72
|
+
#
|
|
73
|
+
# Options:
|
|
74
|
+
#
|
|
75
|
+
# --help Get help on this command
|
|
75
76
|
|
|
76
77
|
Cl.new($0).run(%w(types true 1 one))
|
|
77
78
|
|
|
@@ -79,4 +80,15 @@ Cl.new($0).run(%w(types true 1 one))
|
|
|
79
80
|
#
|
|
80
81
|
# Wrong argument type (given: "one", expected: float)
|
|
81
82
|
#
|
|
82
|
-
# Usage:
|
|
83
|
+
# Usage: bin/examples types [a:bool] [b:int] [c:float] [d] [options]
|
|
84
|
+
#
|
|
85
|
+
# Arguments:
|
|
86
|
+
#
|
|
87
|
+
# a type: bool
|
|
88
|
+
# b type: int
|
|
89
|
+
# c type: float
|
|
90
|
+
# d type: string
|
|
91
|
+
#
|
|
92
|
+
# Options:
|
|
93
|
+
#
|
|
94
|
+
# --help Get help on this command
|
data/examples/args/opts
CHANGED
|
@@ -3,34 +3,92 @@ $: << File.expand_path('lib')
|
|
|
3
3
|
|
|
4
4
|
require 'cl'
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
module Opts
|
|
7
|
+
class Bool < Cl::Cmd
|
|
8
|
+
arg :bool, type: :bool
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
def run
|
|
11
|
+
p cmd: registry_key, bool: bool
|
|
12
|
+
end
|
|
12
13
|
end
|
|
13
|
-
end
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
class Types < Cl::Cmd
|
|
16
|
+
arg :a, type: :bool
|
|
17
|
+
arg :b, type: :int
|
|
18
|
+
arg :c, type: :float
|
|
19
|
+
arg :d
|
|
20
|
+
|
|
21
|
+
def run
|
|
22
|
+
p cmd: registry_key, a: a, b: b, c: c, d: d
|
|
23
|
+
end
|
|
24
|
+
end
|
|
17
25
|
end
|
|
18
26
|
|
|
19
|
-
|
|
27
|
+
Cl.new($0).run(%w(bool on))
|
|
20
28
|
|
|
21
29
|
# Output:
|
|
22
30
|
#
|
|
23
|
-
#
|
|
31
|
+
# {:cmd=>:bool, :bool=>true}
|
|
24
32
|
|
|
25
|
-
|
|
33
|
+
Cl.new($0).run(%w(types true 1 1.2 foo))
|
|
26
34
|
|
|
27
35
|
# Output:
|
|
28
36
|
#
|
|
29
|
-
#
|
|
37
|
+
# {:cmd=>:types, :a=>true, :b=>1, :c=>1.2, :d=>"foo"}
|
|
30
38
|
|
|
31
|
-
|
|
39
|
+
Cl.new($0).run(%w(types true 1 1.2 foo bar))
|
|
32
40
|
|
|
33
41
|
# Output:
|
|
34
42
|
#
|
|
35
|
-
#
|
|
43
|
+
# Too many arguments (given: 5, allowed: 4)
|
|
44
|
+
#
|
|
45
|
+
# Usage: bin/examples types [a:bool] [b:int] [c:float] [d] [options]
|
|
46
|
+
#
|
|
47
|
+
# Arguments:
|
|
48
|
+
#
|
|
49
|
+
# a type: bool
|
|
50
|
+
# b type: int
|
|
51
|
+
# c type: float
|
|
52
|
+
# d type: string
|
|
53
|
+
#
|
|
54
|
+
# Options:
|
|
55
|
+
#
|
|
56
|
+
# --help Get help on this command
|
|
57
|
+
|
|
58
|
+
Cl.new($0).run(%w(types true one 1.2))
|
|
36
59
|
|
|
60
|
+
# Output:
|
|
61
|
+
#
|
|
62
|
+
# Wrong argument type (given: "one", expected: int)
|
|
63
|
+
#
|
|
64
|
+
# Usage: bin/examples types [a:bool] [b:int] [c:float] [d] [options]
|
|
65
|
+
#
|
|
66
|
+
# Arguments:
|
|
67
|
+
#
|
|
68
|
+
# a type: bool
|
|
69
|
+
# b type: int
|
|
70
|
+
# c type: float
|
|
71
|
+
# d type: string
|
|
72
|
+
#
|
|
73
|
+
# Options:
|
|
74
|
+
#
|
|
75
|
+
# --help Get help on this command
|
|
76
|
+
|
|
77
|
+
Cl.new($0).run(%w(types true 1 one))
|
|
78
|
+
|
|
79
|
+
# Output:
|
|
80
|
+
#
|
|
81
|
+
# Wrong argument type (given: "one", expected: float)
|
|
82
|
+
#
|
|
83
|
+
# Usage: bin/examples types [a:bool] [b:int] [c:float] [d] [options]
|
|
84
|
+
#
|
|
85
|
+
# Arguments:
|
|
86
|
+
#
|
|
87
|
+
# a type: bool
|
|
88
|
+
# b type: int
|
|
89
|
+
# c type: float
|
|
90
|
+
# d type: string
|
|
91
|
+
#
|
|
92
|
+
# Options:
|
|
93
|
+
#
|
|
94
|
+
# --help Get help on this command
|
data/examples/args/required
CHANGED
|
@@ -8,39 +8,53 @@ class Required < Cl::Cmd
|
|
|
8
8
|
arg :two
|
|
9
9
|
|
|
10
10
|
def run
|
|
11
|
-
|
|
11
|
+
p cmd: registry_key, one: one, two: two
|
|
12
12
|
end
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
args = args.map { |key, value| "#{key}=#{value.inspect}" }.join(' ')
|
|
17
|
-
puts "Called #{cmd} with #{args}\n\n"
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
output *Cl.new($0).run(%w(required one two))
|
|
15
|
+
Cl.new($0).run(%w(required one two))
|
|
21
16
|
|
|
22
17
|
# Output:
|
|
23
18
|
#
|
|
24
|
-
#
|
|
19
|
+
# {:cmd=>:required, :one=>"one", :two=>"two"}
|
|
25
20
|
|
|
26
|
-
|
|
21
|
+
Cl.new($0).run(%w(required one))
|
|
27
22
|
|
|
28
23
|
# Output:
|
|
29
24
|
#
|
|
30
|
-
#
|
|
25
|
+
# {:cmd=>:required, :one=>"one", :two=>nil}
|
|
31
26
|
|
|
32
|
-
|
|
27
|
+
Cl.new($0).run(%w(required))
|
|
33
28
|
|
|
34
29
|
# Output:
|
|
35
30
|
#
|
|
36
31
|
# Missing arguments (given: 0, required: 1)
|
|
37
32
|
#
|
|
38
|
-
# Usage:
|
|
33
|
+
# Usage: bin/examples required one [two] [options]
|
|
34
|
+
#
|
|
35
|
+
# Arguments:
|
|
36
|
+
#
|
|
37
|
+
# one type: string, required: true
|
|
38
|
+
# two type: string
|
|
39
|
+
#
|
|
40
|
+
# Options:
|
|
41
|
+
#
|
|
42
|
+
# --help Get help on this command
|
|
39
43
|
|
|
40
|
-
|
|
44
|
+
Cl.new($0).run(%w(required one two three))
|
|
41
45
|
|
|
42
46
|
# Output:
|
|
43
47
|
#
|
|
44
48
|
# Too many arguments (given: 3, allowed: 2)
|
|
45
49
|
#
|
|
46
|
-
# Usage:
|
|
50
|
+
# Usage: bin/examples required one [two] [options]
|
|
51
|
+
#
|
|
52
|
+
# Arguments:
|
|
53
|
+
#
|
|
54
|
+
# one type: string, required: true
|
|
55
|
+
# two type: string
|
|
56
|
+
#
|
|
57
|
+
# Options:
|
|
58
|
+
#
|
|
59
|
+
# --help Get help on this command
|
|
60
|
+
|
data/examples/args/splat
CHANGED
|
@@ -3,59 +3,56 @@ $: << File.expand_path('lib')
|
|
|
3
3
|
|
|
4
4
|
require 'cl'
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
module Splat
|
|
7
|
+
class Left < Cl::Cmd
|
|
8
|
+
register :left
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
arg :one, type: :array, splat: true
|
|
11
|
+
args :two, :three
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
def run
|
|
14
|
+
p cmd: registry_key, one: one, two: two, three: three
|
|
15
|
+
end
|
|
14
16
|
end
|
|
15
|
-
end
|
|
16
17
|
|
|
17
|
-
class
|
|
18
|
-
|
|
18
|
+
class Middle < Cl::Cmd
|
|
19
|
+
register :middle
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
arg :one
|
|
22
|
+
arg :two, type: :array, splat: true
|
|
23
|
+
arg :three
|
|
23
24
|
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
def run
|
|
26
|
+
p cmd: registry_key, one: one, two: two, three: three
|
|
27
|
+
end
|
|
26
28
|
end
|
|
27
|
-
end
|
|
28
29
|
|
|
29
|
-
class
|
|
30
|
-
|
|
30
|
+
class Right < Cl::Cmd
|
|
31
|
+
register :right
|
|
31
32
|
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
args :one, :two
|
|
34
|
+
arg :three, type: :array, splat: true
|
|
34
35
|
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
def run
|
|
37
|
+
p cmd: registry_key, one: one, two: two, three: three
|
|
38
|
+
end
|
|
37
39
|
end
|
|
38
40
|
end
|
|
39
41
|
|
|
40
|
-
|
|
41
|
-
args = args.map { |key, value| "#{key}=#{value.inspect}" }.join(' ')
|
|
42
|
-
puts "Called #{cmd} with #{args}\n\n"
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
output *Cl.new($0).run(%w(splat left foo bar baz buz))
|
|
42
|
+
Cl.new('splat').run(%w(left foo bar baz buz))
|
|
46
43
|
|
|
47
44
|
# Output:
|
|
48
45
|
#
|
|
49
|
-
#
|
|
46
|
+
# {:cmd=>:left, :one=>["foo", "bar"], :two=>"baz", :three=>"buz"}
|
|
50
47
|
|
|
51
|
-
|
|
48
|
+
Cl.new('splat').run(%w(middle foo bar baz buz))
|
|
52
49
|
|
|
53
50
|
# Output:
|
|
54
51
|
#
|
|
55
|
-
#
|
|
52
|
+
# {:cmd=>:middle, :one=>"foo", :two=>["bar", "baz"], :three=>"buz"}
|
|
56
53
|
|
|
57
|
-
|
|
54
|
+
Cl.new('splat').run(%w(right foo bar baz buz))
|
|
58
55
|
|
|
59
56
|
# Output:
|
|
60
57
|
#
|
|
61
|
-
#
|
|
58
|
+
# {:cmd=>:right, :one=>"foo", :two=>"bar", :three=>["baz", "buz"]}
|
data/examples/gem
CHANGED
|
@@ -14,26 +14,23 @@ module Gem
|
|
|
14
14
|
opt '-q', '--quiet', 'Silence output'
|
|
15
15
|
|
|
16
16
|
def run
|
|
17
|
-
|
|
17
|
+
p cmd: registry_key, args: args, opts: opts
|
|
18
18
|
end
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
class Bump < Cl::Cmd
|
|
22
|
-
defaults commit: true
|
|
23
|
-
|
|
24
22
|
opt '-v', '--version VERSION', 'The version to bump to [1.1.1|major|minor|patch|pre|rc|release]'
|
|
25
23
|
opt '--[no-]commit', 'Bump the version, but do not commit'
|
|
26
24
|
|
|
27
25
|
def run
|
|
28
|
-
|
|
26
|
+
p cmd: registry_key, args: args, opts: opts
|
|
29
27
|
end
|
|
30
28
|
end
|
|
31
29
|
end
|
|
32
30
|
end
|
|
33
31
|
end
|
|
34
32
|
|
|
35
|
-
Cl.new(
|
|
36
|
-
puts
|
|
33
|
+
Cl.new('gem').run(%w(help))
|
|
37
34
|
|
|
38
35
|
# Output:
|
|
39
36
|
#
|
|
@@ -42,13 +39,12 @@ puts
|
|
|
42
39
|
# gem release [gemspec] [options]
|
|
43
40
|
# gem bump [options]
|
|
44
41
|
|
|
45
|
-
Cl.new($0).run(%w(help release))
|
|
46
|
-
puts
|
|
47
42
|
|
|
43
|
+
Cl.new('gem').run(%w(help release))
|
|
48
44
|
# or:
|
|
49
45
|
#
|
|
50
|
-
# Cl.new(
|
|
51
|
-
# Cl.new(
|
|
46
|
+
# Cl.new('gem').run(%w(release --help)))
|
|
47
|
+
# Cl.new('gem').run(%w(release -h)))
|
|
52
48
|
#
|
|
53
49
|
# Output:
|
|
54
50
|
#
|
|
@@ -56,22 +52,21 @@ puts
|
|
|
56
52
|
#
|
|
57
53
|
# Arguments:
|
|
58
54
|
#
|
|
59
|
-
# gemspec
|
|
55
|
+
# gemspec type: string
|
|
60
56
|
#
|
|
61
57
|
# Options:
|
|
62
58
|
#
|
|
63
|
-
# -h --host HOST
|
|
64
|
-
# -k --key KEY
|
|
65
|
-
# -q --quiet
|
|
66
|
-
# --help
|
|
59
|
+
# -h --host HOST Push to a compatible host other than rubygems.org (type: string)
|
|
60
|
+
# -k --key KEY Rubygems API key to use (type: string)
|
|
61
|
+
# -q --[no-]quiet Silence output
|
|
62
|
+
# --help Get help on this command
|
|
67
63
|
|
|
68
|
-
Cl.new($0).run(%w(help release))
|
|
69
|
-
puts
|
|
70
64
|
|
|
65
|
+
Cl.new('gem').run(%w(help bump))
|
|
71
66
|
# or:
|
|
72
67
|
#
|
|
73
|
-
# Cl.run(
|
|
74
|
-
# Cl.run(
|
|
68
|
+
# Cl.new('gem').run(%w(bump --help)))
|
|
69
|
+
# Cl.new('gem').run(%w(bump -h)))
|
|
75
70
|
#
|
|
76
71
|
# Output:
|
|
77
72
|
#
|
|
@@ -79,26 +74,20 @@ puts
|
|
|
79
74
|
#
|
|
80
75
|
# Options:
|
|
81
76
|
#
|
|
82
|
-
# -v --version VERSION The version to bump to [1.1.1|major|minor|patch|pre|rc|release]
|
|
83
|
-
# --no-commit
|
|
84
|
-
#
|
|
77
|
+
# -v --version VERSION The version to bump to [1.1.1|major|minor|patch|pre|rc|release] (type: string)
|
|
78
|
+
# --[no-]commit Bump the version, but do not commit
|
|
79
|
+
# --help Get help on this command
|
|
85
80
|
|
|
86
|
-
cmds = [
|
|
87
|
-
Cl.new($0).run(%w(bump -v 1.1.1)),
|
|
88
|
-
Cl.new($0).run(%w(release foo.gemspec -h host -k key -q))
|
|
89
|
-
]
|
|
90
81
|
|
|
91
|
-
|
|
92
|
-
puts cmds.map { |cmd, args, opts| " cmd #{cmd} has run with:\n\n args=#{args}\n opts=#{opts}\n\n" }
|
|
82
|
+
Cl.new('gem').run(%w(bump -v 1.1.1))
|
|
93
83
|
|
|
94
|
-
#
|
|
95
|
-
#
|
|
96
|
-
# cmd bump has run with:
|
|
97
|
-
#
|
|
98
|
-
# args=[]
|
|
99
|
-
# opts={:version=>"1.1.1"}
|
|
84
|
+
# Output:
|
|
100
85
|
#
|
|
101
|
-
# cmd
|
|
86
|
+
# {:cmd=>:bump, :args=>[], :opts=>{:version=>"1.1.1"}}
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
Cl.new('gem').run(%w(release foo.gemspec -h host -k key -q))
|
|
90
|
+
|
|
91
|
+
# Output:
|
|
102
92
|
#
|
|
103
|
-
#
|
|
104
|
-
# opts={:host=>"host", :key=>"key", :quiet=>true}
|
|
93
|
+
# {:cmd=>:release, :args=>["foo.gemspec"], :opts=>{:host=>"host", :key=>"key", :quiet=>true}}
|