zencoder-cli 0.1.7 → 0.1.8
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/lib/zencoder-cli/cli.rb +4 -5
- data/lib/zencoder-cli/version.rb +1 -1
- metadata +2 -8
data/lib/zencoder-cli/cli.rb
CHANGED
|
@@ -37,21 +37,20 @@ end
|
|
|
37
37
|
command = ARGV.shift.strip
|
|
38
38
|
args = ARGV
|
|
39
39
|
|
|
40
|
-
|
|
41
40
|
flat_commands = Zencoder::CLI::Command.commands.values.inject({}){|memo,group| memo.merge!(group) }
|
|
42
41
|
command_options = Trollop::options do
|
|
43
42
|
banner <<-EOS
|
|
44
43
|
#{head}
|
|
45
44
|
#{
|
|
46
|
-
if flat_commands[command] && flat_commands[command][:help]
|
|
45
|
+
if flat_commands[command].is_a?(Hash) && flat_commands[command][:help]
|
|
47
46
|
"\n"+flat_commands[command][:help]+"\n"
|
|
48
47
|
end
|
|
49
48
|
}
|
|
50
49
|
== Usage
|
|
51
50
|
|
|
52
|
-
zencoder [global-options] #{command}#{" [args]" if flat_commands[command] && flat_commands[command][:arguments]} [options]
|
|
51
|
+
zencoder [global-options] #{command}#{" [args]" if flat_commands[command].is_a?(Hash) && flat_commands[command][:arguments]} [options]
|
|
53
52
|
#{
|
|
54
|
-
if flat_commands[command] && flat_commands[command][:arguments]
|
|
53
|
+
if flat_commands[command].is_a?(Hash) && flat_commands[command][:arguments]
|
|
55
54
|
"\n== Arguments\n\n"+
|
|
56
55
|
(1..flat_commands[command][:arguments].size).to_a.map{|i|
|
|
57
56
|
"#{i}: #{flat_commands[command][:arguments][i-1].to_s}"
|
|
@@ -61,7 +60,7 @@ zencoder [global-options] #{command}#{" [args]" if flat_commands[command] && fla
|
|
|
61
60
|
|
|
62
61
|
== Command Options
|
|
63
62
|
EOS
|
|
64
|
-
if flat_commands[command] && flat_commands[command][:options]
|
|
63
|
+
if flat_commands[command].is_a?(Hash) && flat_commands[command][:options]
|
|
65
64
|
flat_commands[command][:options].call(self)
|
|
66
65
|
end
|
|
67
66
|
end
|
data/lib/zencoder-cli/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zencoder-cli
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash: 21
|
|
5
4
|
prerelease: false
|
|
6
5
|
segments:
|
|
7
6
|
- 0
|
|
8
7
|
- 1
|
|
9
|
-
-
|
|
10
|
-
version: 0.1.
|
|
8
|
+
- 8
|
|
9
|
+
version: 0.1.8
|
|
11
10
|
platform: ruby
|
|
12
11
|
authors:
|
|
13
12
|
- Brandon Arbini
|
|
@@ -26,7 +25,6 @@ dependencies:
|
|
|
26
25
|
requirements:
|
|
27
26
|
- - ~>
|
|
28
27
|
- !ruby/object:Gem::Version
|
|
29
|
-
hash: 1
|
|
30
28
|
segments:
|
|
31
29
|
- 2
|
|
32
30
|
- 3
|
|
@@ -42,7 +40,6 @@ dependencies:
|
|
|
42
40
|
requirements:
|
|
43
41
|
- - ~>
|
|
44
42
|
- !ruby/object:Gem::Version
|
|
45
|
-
hash: 83
|
|
46
43
|
segments:
|
|
47
44
|
- 1
|
|
48
45
|
- 16
|
|
@@ -58,7 +55,6 @@ dependencies:
|
|
|
58
55
|
requirements:
|
|
59
56
|
- - ~>
|
|
60
57
|
- !ruby/object:Gem::Version
|
|
61
|
-
hash: 3
|
|
62
58
|
segments:
|
|
63
59
|
- 1
|
|
64
60
|
- 4
|
|
@@ -107,7 +103,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
107
103
|
requirements:
|
|
108
104
|
- - ">="
|
|
109
105
|
- !ruby/object:Gem::Version
|
|
110
|
-
hash: 3
|
|
111
106
|
segments:
|
|
112
107
|
- 0
|
|
113
108
|
version: "0"
|
|
@@ -116,7 +111,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
116
111
|
requirements:
|
|
117
112
|
- - ">="
|
|
118
113
|
- !ruby/object:Gem::Version
|
|
119
|
-
hash: 3
|
|
120
114
|
segments:
|
|
121
115
|
- 0
|
|
122
116
|
version: "0"
|