girdle-podcast 0.0.1
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/.gitignore +17 -0
- data/Gemfile +4 -0
- data/README.markdown +4 -0
- data/Rakefile +2 -0
- data/girdle-podcast.gemspec +19 -0
- data/lib/girdle/podcast.rb +5 -0
- data/lib/girdle/podcast/task.rb +226 -0
- data/lib/girdle/podcast/version.rb +5 -0
- data/spec/spec_helper.rb +5 -0
- data/spec/task_spec.rb +521 -0
- metadata +68 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/README.markdown
ADDED
data/Rakefile
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/girdle/podcast/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.authors = ["Jamie Hodge"]
|
6
|
+
gem.email = ["jamiehodge@me.com"]
|
7
|
+
gem.description = %q{Girdle Podcast Producer actions}
|
8
|
+
gem.summary = %q{Create Xgrid tasks for Podcast Producer actions}
|
9
|
+
gem.homepage = ''
|
10
|
+
|
11
|
+
gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
12
|
+
gem.files = `git ls-files`.split("\n")
|
13
|
+
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
14
|
+
gem.name = "girdle-podcast"
|
15
|
+
gem.require_paths = ['lib/girdle']
|
16
|
+
gem.version = Girdle::Podcast::VERSION
|
17
|
+
|
18
|
+
gem.add_dependency 'girdle'
|
19
|
+
end
|
@@ -0,0 +1,226 @@
|
|
1
|
+
module Girdle
|
2
|
+
module Podcast
|
3
|
+
class Task < Girdle::Task
|
4
|
+
|
5
|
+
def initialize(options={})
|
6
|
+
super(options)
|
7
|
+
@command = '/usr/bin/pcastaction'
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.add_chapter(options={})
|
11
|
+
name = "#{File.basename(options[:input])}-addchapter-#{uuid}.mov"
|
12
|
+
arguments = [
|
13
|
+
'addchapter',
|
14
|
+
'--basedir', options[:base_dir] || '.',
|
15
|
+
'--input', options[:input],
|
16
|
+
'--output', name,
|
17
|
+
'--time', options[:time],
|
18
|
+
'--title', options[:title]
|
19
|
+
]
|
20
|
+
self.new(
|
21
|
+
name: name,
|
22
|
+
arguments: arguments,
|
23
|
+
depends_on: [
|
24
|
+
options[:input]
|
25
|
+
]
|
26
|
+
)
|
27
|
+
end
|
28
|
+
|
29
|
+
def self.add_tracks(options={})
|
30
|
+
name = "#{File.basename(options[:input])}-addtracks-#{uuid}.mov"
|
31
|
+
arguments = [
|
32
|
+
'addtracks',
|
33
|
+
'--basedir', options[:base_dir] || '.',
|
34
|
+
'--tracks', options[:tracks],
|
35
|
+
'--input', options[:input],
|
36
|
+
'--output', name
|
37
|
+
]
|
38
|
+
self.new(
|
39
|
+
name: name,
|
40
|
+
arguments: arguments,
|
41
|
+
depends_on: [
|
42
|
+
File.basename(options[:input].to_s)
|
43
|
+
]
|
44
|
+
)
|
45
|
+
end
|
46
|
+
|
47
|
+
def self.annotate(options={})
|
48
|
+
arguments = [
|
49
|
+
'annotate',
|
50
|
+
'--basedir', options[:base_dir] || '.',
|
51
|
+
'--input', options[:input]
|
52
|
+
]
|
53
|
+
arguments += ['--title', options[:title]] if options[:title]
|
54
|
+
arguments += ['--comment', options[:comment]] if options[:comment]
|
55
|
+
arguments +=
|
56
|
+
['--description', options[:description]] if options[:description]
|
57
|
+
arguments += ['--author', options[:author]] if options[:author]
|
58
|
+
arguments += ['--keywords', options[:keywords]] if options[:keywords]
|
59
|
+
arguments += ['--copyright', options[:copyright]] if options[:copyright]
|
60
|
+
self.new(
|
61
|
+
name: "#{File.basename(options[:input])}-annotate-#{uuid}.mov",
|
62
|
+
arguments: arguments,
|
63
|
+
depends_on: [ options[:input] ]
|
64
|
+
)
|
65
|
+
end
|
66
|
+
|
67
|
+
def self.chapterize(options={})
|
68
|
+
name = "#{File.basename(options[:input])}-chapterize-#{uuid}.mov"
|
69
|
+
arguments = [
|
70
|
+
'chapterize',
|
71
|
+
'--basedir', options[:base_dir] || '.',
|
72
|
+
'--input', options[:input],
|
73
|
+
'--output', name
|
74
|
+
]
|
75
|
+
self.new(
|
76
|
+
name: name,
|
77
|
+
arguments: arguments,
|
78
|
+
depends_on: [
|
79
|
+
options[:input]
|
80
|
+
]
|
81
|
+
)
|
82
|
+
end
|
83
|
+
|
84
|
+
def self.delete_tracks(options={})
|
85
|
+
name = "#{File.basename(options[:input])}-deletetracks-#{uuid}.mov"
|
86
|
+
arguments = [
|
87
|
+
'deletetracks',
|
88
|
+
'--basedir', options[:base_dir] || '.',
|
89
|
+
'--input', options[:input],
|
90
|
+
'--output', name,
|
91
|
+
'--type', options[:type]
|
92
|
+
]
|
93
|
+
self.new(
|
94
|
+
name: name,
|
95
|
+
arguments: arguments,
|
96
|
+
depends_on: [ options[:input] ]
|
97
|
+
)
|
98
|
+
end
|
99
|
+
|
100
|
+
def self.encode(options={})
|
101
|
+
name = "#{File.basename(options[:input])}-encode-#{uuid}.mov"
|
102
|
+
arguments = [
|
103
|
+
'encode',
|
104
|
+
'--basedir', options[:base_dir] || '.',
|
105
|
+
'--input', options[:input],
|
106
|
+
'--output', name,
|
107
|
+
'--encoder', options[:encoder]
|
108
|
+
]
|
109
|
+
self.new(
|
110
|
+
name: name,
|
111
|
+
arguments: arguments,
|
112
|
+
depends_on: [
|
113
|
+
options[:input]
|
114
|
+
]
|
115
|
+
)
|
116
|
+
end
|
117
|
+
|
118
|
+
def self.extract_tracks(options={})
|
119
|
+
name = "#{File.basename(options[:input])}-extracttracks-#{uuid}.mov"
|
120
|
+
arguments = [
|
121
|
+
'extracttracks',
|
122
|
+
'--basedir', options[:base_dir] || '.',
|
123
|
+
'--input', options[:input],
|
124
|
+
'--output', name,
|
125
|
+
'--type', options[:type]
|
126
|
+
]
|
127
|
+
self.new(
|
128
|
+
name: name,
|
129
|
+
arguments: arguments,
|
130
|
+
depends_on: [
|
131
|
+
File.basename(options[:input])
|
132
|
+
]
|
133
|
+
)
|
134
|
+
end
|
135
|
+
|
136
|
+
def self.get_poster_image(options={})
|
137
|
+
name = "#{File.basename(options[:input])}-getposterimage-#{uuid}.png"
|
138
|
+
arguments = [
|
139
|
+
'getposterimage',
|
140
|
+
'--input', options[:input],
|
141
|
+
'--output', name,
|
142
|
+
'--time', options[:time]
|
143
|
+
]
|
144
|
+
self.new(
|
145
|
+
name: name,
|
146
|
+
arguments: arguments,
|
147
|
+
depends_on: [
|
148
|
+
options[:input]
|
149
|
+
]
|
150
|
+
)
|
151
|
+
end
|
152
|
+
|
153
|
+
def self.join(options={})
|
154
|
+
name = "#{File.basename(options[:input_1])}-#{File.basename(options[:input_2])}-join-#{uuid}.mov"
|
155
|
+
arguments = [
|
156
|
+
'join',
|
157
|
+
'--basedir', options[:base_dir] || '.',
|
158
|
+
'--input1', options[:input_1],
|
159
|
+
'--input2', options[:input_2],
|
160
|
+
'--output', name
|
161
|
+
]
|
162
|
+
self.new(
|
163
|
+
name: name,
|
164
|
+
arguments: arguments,
|
165
|
+
depends_on: [
|
166
|
+
options[:input_1],
|
167
|
+
options[:input_2]
|
168
|
+
]
|
169
|
+
)
|
170
|
+
end
|
171
|
+
|
172
|
+
def self.qt_import(options={})
|
173
|
+
name = "#{File.basename(options[:input])}-qtimport-#{uuid}.mov"
|
174
|
+
arguments = [
|
175
|
+
'qtimport',
|
176
|
+
'--basedir', options[:base_dir] || '.',
|
177
|
+
'--input', options[:input],
|
178
|
+
'--output', name
|
179
|
+
]
|
180
|
+
if options[:enable_auto_chaptering] == true
|
181
|
+
arguments << '--enable_auto_chaptering'
|
182
|
+
end
|
183
|
+
self.new(
|
184
|
+
name: name,
|
185
|
+
arguments: arguments,
|
186
|
+
depends_on: ['preflight']
|
187
|
+
)
|
188
|
+
end
|
189
|
+
|
190
|
+
def self.qt_info(options={})
|
191
|
+
arguments = [
|
192
|
+
'qtinfo',
|
193
|
+
'--basedir', options[:base_dir] || '.',
|
194
|
+
'--input', options[:input]
|
195
|
+
]
|
196
|
+
arguments += ['--key', options[:key] ] if options[:key]
|
197
|
+
self.new(
|
198
|
+
name: "#{File.basename(options[:input])}-qtinfo-#{uuid}",
|
199
|
+
arguments: arguments,
|
200
|
+
depends_on: [ options[:input] ]
|
201
|
+
)
|
202
|
+
end
|
203
|
+
|
204
|
+
def self.qc_composition(options={})
|
205
|
+
name = "qc_composition_#{options[:composition]}_#{uuid}.mov"
|
206
|
+
arguments = [
|
207
|
+
options[:composition],
|
208
|
+
name,
|
209
|
+
options[:width],
|
210
|
+
options[:height],
|
211
|
+
options[:duration]
|
212
|
+
] + options[:parameters].map {|k,v| ["--#{k}", v] }.flatten
|
213
|
+
self.new(
|
214
|
+
name: name,
|
215
|
+
arguments: arguments
|
216
|
+
).tap { |t| t.instance_eval { @command = '/usr/bin/qc2movie' }}
|
217
|
+
end
|
218
|
+
|
219
|
+
private
|
220
|
+
|
221
|
+
def self.uuid
|
222
|
+
`uuidgen`.strip
|
223
|
+
end
|
224
|
+
end
|
225
|
+
end
|
226
|
+
end
|
data/spec/spec_helper.rb
ADDED
data/spec/task_spec.rb
ADDED
@@ -0,0 +1,521 @@
|
|
1
|
+
require_relative 'spec_helper'
|
2
|
+
|
3
|
+
def must_set_subcommand(value)
|
4
|
+
@task.arguments.first.must_equal value
|
5
|
+
end
|
6
|
+
|
7
|
+
def must_set_argument(argument, value)
|
8
|
+
@task.arguments[
|
9
|
+
@task.arguments.index("--#{argument}") + 1
|
10
|
+
].must_equal value
|
11
|
+
end
|
12
|
+
|
13
|
+
describe 'Girdle::Podcast::Task' do
|
14
|
+
|
15
|
+
it 'must set a default command' do
|
16
|
+
Task = Girdle::Podcast::Task.new
|
17
|
+
Task.command.must_equal '/usr/bin/pcastaction'
|
18
|
+
end
|
19
|
+
|
20
|
+
describe '.add_chapter' do
|
21
|
+
|
22
|
+
before do
|
23
|
+
@task = Girdle::Podcast::Task.add_chapter(
|
24
|
+
input: 'input',
|
25
|
+
time: 'time',
|
26
|
+
title: 'title'
|
27
|
+
)
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'must set name' do
|
31
|
+
@task.name.must_match 'input-addchapter'
|
32
|
+
end
|
33
|
+
|
34
|
+
it 'must set subcommand argument' do
|
35
|
+
must_set_subcommand 'addchapter'
|
36
|
+
end
|
37
|
+
|
38
|
+
it 'must set base_dir argument' do
|
39
|
+
must_set_argument 'basedir', '.'
|
40
|
+
end
|
41
|
+
|
42
|
+
it 'must set input argument' do
|
43
|
+
must_set_argument 'input', 'input'
|
44
|
+
end
|
45
|
+
|
46
|
+
it 'must set time argument' do
|
47
|
+
must_set_argument 'time', 'time'
|
48
|
+
end
|
49
|
+
|
50
|
+
it 'must set title argument' do
|
51
|
+
must_set_argument 'title', 'title'
|
52
|
+
end
|
53
|
+
|
54
|
+
it 'must set output argument' do
|
55
|
+
must_set_argument 'output', @task.name
|
56
|
+
end
|
57
|
+
|
58
|
+
it 'must set depends_on' do
|
59
|
+
@task.depends_on.must_equal ['input']
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
describe '.add_tracks' do
|
64
|
+
|
65
|
+
before do
|
66
|
+
@task = Girdle::Podcast::Task.add_tracks(
|
67
|
+
tracks: 'tracks',
|
68
|
+
input: 'input'
|
69
|
+
)
|
70
|
+
end
|
71
|
+
|
72
|
+
it 'must set name' do
|
73
|
+
@task.name.must_match 'input-addtracks'
|
74
|
+
end
|
75
|
+
|
76
|
+
it 'must set subcommand argument' do
|
77
|
+
must_set_subcommand 'addtracks'
|
78
|
+
end
|
79
|
+
|
80
|
+
it 'must set base_dir argument' do
|
81
|
+
must_set_argument 'basedir', '.'
|
82
|
+
end
|
83
|
+
|
84
|
+
it 'must set tracks argument' do
|
85
|
+
must_set_argument 'tracks', 'tracks'
|
86
|
+
end
|
87
|
+
|
88
|
+
it 'must set input argument' do
|
89
|
+
must_set_argument 'input', 'input'
|
90
|
+
end
|
91
|
+
|
92
|
+
it 'must set output argument' do
|
93
|
+
must_set_argument 'output', @task.name
|
94
|
+
end
|
95
|
+
|
96
|
+
it 'must set depends_on' do
|
97
|
+
@task.depends_on.must_equal ['input']
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
describe '.annotate' do
|
102
|
+
|
103
|
+
before do
|
104
|
+
@task = Girdle::Podcast::Task.annotate(
|
105
|
+
input: 'input',
|
106
|
+
title: 'title',
|
107
|
+
comment: 'comment',
|
108
|
+
description: 'description',
|
109
|
+
author: 'author',
|
110
|
+
keywords: 'keywords',
|
111
|
+
copyright: 'copyright'
|
112
|
+
)
|
113
|
+
end
|
114
|
+
|
115
|
+
it 'must set name' do
|
116
|
+
@task.name.must_match 'input-annotate'
|
117
|
+
end
|
118
|
+
|
119
|
+
it 'must set subcommand argument' do
|
120
|
+
must_set_subcommand 'annotate'
|
121
|
+
end
|
122
|
+
|
123
|
+
it 'must set base_dir argument' do
|
124
|
+
must_set_argument 'basedir', '.'
|
125
|
+
end
|
126
|
+
|
127
|
+
it 'must set input argument' do
|
128
|
+
must_set_argument 'input', 'input'
|
129
|
+
end
|
130
|
+
|
131
|
+
it 'must set title argument' do
|
132
|
+
must_set_argument 'title', 'title'
|
133
|
+
end
|
134
|
+
|
135
|
+
it 'must set comment argument' do
|
136
|
+
must_set_argument 'comment', 'comment'
|
137
|
+
end
|
138
|
+
|
139
|
+
it 'must set author argument' do
|
140
|
+
must_set_argument 'author', 'author'
|
141
|
+
end
|
142
|
+
|
143
|
+
it 'must set keywords argument' do
|
144
|
+
must_set_argument 'keywords', 'keywords'
|
145
|
+
end
|
146
|
+
|
147
|
+
it 'must set copyright argument' do
|
148
|
+
must_set_argument 'copyright', 'copyright'
|
149
|
+
end
|
150
|
+
|
151
|
+
it 'must set depends_on' do
|
152
|
+
@task.depends_on.must_equal ['input']
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
describe '.chapterize' do
|
157
|
+
|
158
|
+
before do
|
159
|
+
@task = Girdle::Podcast::Task.chapterize(
|
160
|
+
input: 'input'
|
161
|
+
)
|
162
|
+
end
|
163
|
+
|
164
|
+
it 'must set name' do
|
165
|
+
@task.name.must_match 'input-chapterize'
|
166
|
+
end
|
167
|
+
|
168
|
+
it 'must set subcommand argument' do
|
169
|
+
must_set_subcommand 'chapterize'
|
170
|
+
end
|
171
|
+
|
172
|
+
it 'must set base_dir argument' do
|
173
|
+
must_set_argument 'basedir', '.'
|
174
|
+
end
|
175
|
+
|
176
|
+
it 'must set input argument' do
|
177
|
+
must_set_argument 'input', 'input'
|
178
|
+
end
|
179
|
+
|
180
|
+
it 'must set output argument' do
|
181
|
+
must_set_argument 'output', @task.name
|
182
|
+
end
|
183
|
+
|
184
|
+
it 'must set depends_on' do
|
185
|
+
@task.depends_on.must_equal ['input']
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
189
|
+
describe '.delete_tracks' do
|
190
|
+
|
191
|
+
before do
|
192
|
+
@task = Girdle::Podcast::Task.delete_tracks(
|
193
|
+
input: 'input',
|
194
|
+
type: 'type'
|
195
|
+
)
|
196
|
+
end
|
197
|
+
|
198
|
+
it 'must set name' do
|
199
|
+
@task.name.must_match 'input-deletetracks'
|
200
|
+
end
|
201
|
+
|
202
|
+
it 'must set subcommand argument' do
|
203
|
+
must_set_subcommand 'deletetracks'
|
204
|
+
end
|
205
|
+
|
206
|
+
it 'must set base_dir argument' do
|
207
|
+
must_set_argument 'basedir', '.'
|
208
|
+
end
|
209
|
+
|
210
|
+
it 'must set input argument' do
|
211
|
+
must_set_argument 'input', 'input'
|
212
|
+
end
|
213
|
+
|
214
|
+
it 'must set output argument' do
|
215
|
+
must_set_argument 'output', @task.name
|
216
|
+
end
|
217
|
+
|
218
|
+
it 'must set type argument' do
|
219
|
+
must_set_argument 'type', 'type'
|
220
|
+
end
|
221
|
+
|
222
|
+
it 'must set depends_on' do
|
223
|
+
@task.depends_on.must_equal ['input']
|
224
|
+
end
|
225
|
+
end
|
226
|
+
|
227
|
+
describe '.encode' do
|
228
|
+
|
229
|
+
before do
|
230
|
+
@task = Girdle::Podcast::Task.encode(
|
231
|
+
input: 'input',
|
232
|
+
encoder: 'encoder'
|
233
|
+
)
|
234
|
+
end
|
235
|
+
|
236
|
+
it 'must set name' do
|
237
|
+
@task.name.must_match 'input-encode'
|
238
|
+
end
|
239
|
+
|
240
|
+
it 'must set subcommand argument' do
|
241
|
+
must_set_subcommand 'encode'
|
242
|
+
end
|
243
|
+
|
244
|
+
it 'must set base_dir argument' do
|
245
|
+
must_set_argument 'basedir', '.'
|
246
|
+
end
|
247
|
+
|
248
|
+
it 'must set input argument' do
|
249
|
+
must_set_argument 'input', 'input'
|
250
|
+
end
|
251
|
+
|
252
|
+
it 'must set encoder argument' do
|
253
|
+
must_set_argument 'encoder', 'encoder'
|
254
|
+
end
|
255
|
+
|
256
|
+
it 'must set output argument' do
|
257
|
+
must_set_argument 'output', @task.name
|
258
|
+
end
|
259
|
+
|
260
|
+
it 'must set depends_on' do
|
261
|
+
@task.depends_on.must_equal ['input']
|
262
|
+
end
|
263
|
+
end
|
264
|
+
|
265
|
+
describe '.extract_tracks' do
|
266
|
+
|
267
|
+
before do
|
268
|
+
@task = Girdle::Podcast::Task.extract_tracks(
|
269
|
+
input: 'input',
|
270
|
+
type: 'type'
|
271
|
+
)
|
272
|
+
end
|
273
|
+
|
274
|
+
it 'must set name' do
|
275
|
+
@task.name.must_match 'input-extracttracks'
|
276
|
+
end
|
277
|
+
|
278
|
+
it 'must set subcommand argument' do
|
279
|
+
must_set_subcommand 'extracttracks'
|
280
|
+
end
|
281
|
+
|
282
|
+
it 'must set base_dir argument' do
|
283
|
+
must_set_argument 'basedir', '.'
|
284
|
+
end
|
285
|
+
|
286
|
+
it 'must set input argument' do
|
287
|
+
must_set_argument 'input', 'input'
|
288
|
+
end
|
289
|
+
|
290
|
+
it 'must set output argument' do
|
291
|
+
must_set_argument 'output', @task.name
|
292
|
+
end
|
293
|
+
|
294
|
+
it 'must set type argument' do
|
295
|
+
must_set_argument 'type', 'type'
|
296
|
+
end
|
297
|
+
|
298
|
+
it 'must set depends_on' do
|
299
|
+
@task.depends_on.must_equal ['input']
|
300
|
+
end
|
301
|
+
end
|
302
|
+
|
303
|
+
describe '.get_poster_image' do
|
304
|
+
|
305
|
+
before do
|
306
|
+
@task = Girdle::Podcast::Task.get_poster_image(
|
307
|
+
input: 'input',
|
308
|
+
time: 'time'
|
309
|
+
)
|
310
|
+
end
|
311
|
+
|
312
|
+
it 'must set name' do
|
313
|
+
@task.name.must_match 'input-getposterimage'
|
314
|
+
end
|
315
|
+
|
316
|
+
it 'must set subcommand' do
|
317
|
+
must_set_subcommand 'getposterimage'
|
318
|
+
end
|
319
|
+
|
320
|
+
it 'must set input argument' do
|
321
|
+
must_set_argument 'input', 'input'
|
322
|
+
end
|
323
|
+
|
324
|
+
it 'must set time argument' do
|
325
|
+
must_set_argument 'time', 'time'
|
326
|
+
end
|
327
|
+
|
328
|
+
it 'must set output argument' do
|
329
|
+
must_set_argument 'output', @task.name
|
330
|
+
end
|
331
|
+
|
332
|
+
end
|
333
|
+
|
334
|
+
describe '.get_preview_movie' do; end
|
335
|
+
|
336
|
+
describe '.join' do
|
337
|
+
|
338
|
+
before do
|
339
|
+
@task = Girdle::Podcast::Task.join(
|
340
|
+
input_1: 'input 1',
|
341
|
+
input_2: 'input 2'
|
342
|
+
)
|
343
|
+
end
|
344
|
+
|
345
|
+
it 'must set name' do
|
346
|
+
@task.name.must_match 'input 1-input 2-join'
|
347
|
+
end
|
348
|
+
|
349
|
+
it 'must set subcommand argument' do
|
350
|
+
must_set_subcommand 'join'
|
351
|
+
end
|
352
|
+
|
353
|
+
it 'must set base_dir argument' do
|
354
|
+
must_set_argument 'basedir', '.'
|
355
|
+
end
|
356
|
+
|
357
|
+
it 'must set input_1 argument' do
|
358
|
+
must_set_argument 'input1', 'input 1'
|
359
|
+
end
|
360
|
+
|
361
|
+
it 'must set input_2 argument' do
|
362
|
+
must_set_argument 'input2', 'input 2'
|
363
|
+
end
|
364
|
+
|
365
|
+
it 'must set output argument' do
|
366
|
+
must_set_argument 'output', @task.name
|
367
|
+
end
|
368
|
+
|
369
|
+
it 'must set depends_on' do
|
370
|
+
@task.depends_on.must_equal ['input 1', 'input 2']
|
371
|
+
end
|
372
|
+
end
|
373
|
+
|
374
|
+
describe '.merge' do; end
|
375
|
+
|
376
|
+
describe '.picture_in_picture' do; end
|
377
|
+
|
378
|
+
describe '.qceffect' do; end
|
379
|
+
|
380
|
+
describe '.qtimport' do
|
381
|
+
|
382
|
+
before do
|
383
|
+
@task = Girdle::Podcast::Task.qt_import(
|
384
|
+
input: 'input',
|
385
|
+
output: 'output',
|
386
|
+
enable_auto_chaptering: true
|
387
|
+
)
|
388
|
+
end
|
389
|
+
|
390
|
+
it 'must set name' do
|
391
|
+
@task.name.must_match 'input-qtimport'
|
392
|
+
end
|
393
|
+
|
394
|
+
it 'must set subcommand argument' do
|
395
|
+
must_set_subcommand 'qtimport'
|
396
|
+
end
|
397
|
+
|
398
|
+
it 'must set base_dir argument' do
|
399
|
+
must_set_argument 'basedir', '.'
|
400
|
+
end
|
401
|
+
|
402
|
+
it 'must set input argument' do
|
403
|
+
must_set_argument 'input', 'input'
|
404
|
+
end
|
405
|
+
|
406
|
+
it 'must set output argument' do
|
407
|
+
must_set_argument 'output', @task.name
|
408
|
+
end
|
409
|
+
|
410
|
+
it 'must set auto chaptering argument' do
|
411
|
+
@task.arguments.must_include('--enable_auto_chaptering')
|
412
|
+
end
|
413
|
+
|
414
|
+
it 'must not set auto chaptering argument' do
|
415
|
+
Girdle::Podcast::Task.qt_import(
|
416
|
+
input: 'input',
|
417
|
+
output: 'output',
|
418
|
+
enable_auto_chaptering: false
|
419
|
+
).arguments.wont_include('--enable_auto_chaptering')
|
420
|
+
end
|
421
|
+
|
422
|
+
it 'must set depends_on' do
|
423
|
+
@task.depends_on.must_equal ['preflight']
|
424
|
+
end
|
425
|
+
end
|
426
|
+
|
427
|
+
describe '.qtinfo' do
|
428
|
+
|
429
|
+
before do
|
430
|
+
@task = Girdle::Podcast::Task.qt_info(
|
431
|
+
input: 'input',
|
432
|
+
key: 'key'
|
433
|
+
)
|
434
|
+
end
|
435
|
+
|
436
|
+
it 'must set name' do
|
437
|
+
@task.name.must_match 'input-qtinfo'
|
438
|
+
end
|
439
|
+
|
440
|
+
it 'must set subcommand' do
|
441
|
+
must_set_subcommand 'qtinfo'
|
442
|
+
end
|
443
|
+
|
444
|
+
it 'must set basedir argument' do
|
445
|
+
must_set_argument 'basedir', '.'
|
446
|
+
end
|
447
|
+
|
448
|
+
it 'must set input argument' do
|
449
|
+
must_set_argument 'input', 'input'
|
450
|
+
end
|
451
|
+
|
452
|
+
it 'must set key argument' do
|
453
|
+
must_set_argument 'key', 'key'
|
454
|
+
end
|
455
|
+
|
456
|
+
it 'must not set key argument' do
|
457
|
+
Girdle::Podcast::Task.qt_info(
|
458
|
+
input: 'input'
|
459
|
+
).arguments.wont_include '--key'
|
460
|
+
end
|
461
|
+
|
462
|
+
it 'must set depends_on' do
|
463
|
+
@task.depends_on.must_equal [ 'input' ]
|
464
|
+
end
|
465
|
+
end
|
466
|
+
|
467
|
+
describe '.split' do; end
|
468
|
+
|
469
|
+
describe '.trim' do; end
|
470
|
+
|
471
|
+
describe '.watermark' do; end
|
472
|
+
|
473
|
+
describe '.qc_composition' do
|
474
|
+
|
475
|
+
before do
|
476
|
+
@task = Girdle::Podcast::Task.qc_composition(
|
477
|
+
composition: 'composition',
|
478
|
+
width: 'width',
|
479
|
+
height: 'height',
|
480
|
+
duration: 'duration',
|
481
|
+
parameters: { a_param: 'a_value', another_param: 'another_value' }
|
482
|
+
)
|
483
|
+
end
|
484
|
+
|
485
|
+
it 'must set name' do
|
486
|
+
@task.name.must_match 'qc_composition_composition'
|
487
|
+
end
|
488
|
+
|
489
|
+
it 'must set command' do
|
490
|
+
@task.command.must_equal '/usr/bin/qc2movie'
|
491
|
+
end
|
492
|
+
|
493
|
+
it 'must set composition argument' do
|
494
|
+
@task.arguments[0].must_equal 'composition'
|
495
|
+
end
|
496
|
+
|
497
|
+
it 'must set output argument' do
|
498
|
+
@task.arguments[1].must_equal @task.name
|
499
|
+
end
|
500
|
+
|
501
|
+
it 'must set width argument' do
|
502
|
+
@task.arguments[2].must_equal 'width'
|
503
|
+
end
|
504
|
+
|
505
|
+
it 'must set height argument' do
|
506
|
+
@task.arguments[3].must_equal 'height'
|
507
|
+
end
|
508
|
+
|
509
|
+
it 'must set duration argument' do
|
510
|
+
@task.arguments[4].must_equal 'duration'
|
511
|
+
end
|
512
|
+
|
513
|
+
it 'must set parameters' do
|
514
|
+
@task.arguments[5].must_equal '--a_param'
|
515
|
+
@task.arguments[6].must_equal 'a_value'
|
516
|
+
@task.arguments[7].must_equal '--another_param'
|
517
|
+
@task.arguments[8].must_equal 'another_value'
|
518
|
+
end
|
519
|
+
end
|
520
|
+
|
521
|
+
end
|
metadata
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: girdle-podcast
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Jamie Hodge
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2011-10-03 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: girdle
|
16
|
+
requirement: &70300641819500 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *70300641819500
|
25
|
+
description: Girdle Podcast Producer actions
|
26
|
+
email:
|
27
|
+
- jamiehodge@me.com
|
28
|
+
executables: []
|
29
|
+
extensions: []
|
30
|
+
extra_rdoc_files: []
|
31
|
+
files:
|
32
|
+
- .gitignore
|
33
|
+
- Gemfile
|
34
|
+
- README.markdown
|
35
|
+
- Rakefile
|
36
|
+
- girdle-podcast.gemspec
|
37
|
+
- lib/girdle/podcast.rb
|
38
|
+
- lib/girdle/podcast/task.rb
|
39
|
+
- lib/girdle/podcast/version.rb
|
40
|
+
- spec/spec_helper.rb
|
41
|
+
- spec/task_spec.rb
|
42
|
+
homepage: ''
|
43
|
+
licenses: []
|
44
|
+
post_install_message:
|
45
|
+
rdoc_options: []
|
46
|
+
require_paths:
|
47
|
+
- lib/girdle
|
48
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
55
|
+
none: false
|
56
|
+
requirements:
|
57
|
+
- - ! '>='
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '0'
|
60
|
+
requirements: []
|
61
|
+
rubyforge_project:
|
62
|
+
rubygems_version: 1.8.5
|
63
|
+
signing_key:
|
64
|
+
specification_version: 3
|
65
|
+
summary: Create Xgrid tasks for Podcast Producer actions
|
66
|
+
test_files:
|
67
|
+
- spec/spec_helper.rb
|
68
|
+
- spec/task_spec.rb
|