girdle-podcast 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/Guardfile +15 -0
- data/README.markdown +4 -1
- data/girdle-podcast.gemspec +5 -0
- data/lib/girdle/podcast/{task.rb → action.rb} +64 -83
- data/lib/girdle/podcast/composition.rb +24 -0
- data/lib/girdle/podcast/version.rb +1 -1
- data/lib/girdle/podcast.rb +5 -1
- data/spec/{task_spec.rb → action_spec.rb} +68 -118
- data/spec/composition_spec.rb +53 -0
- metadata +55 -7
data/Guardfile
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
# A sample Guardfile
|
2
|
+
# More info at https://github.com/guard/guard#readme
|
3
|
+
|
4
|
+
guard 'minitest' do
|
5
|
+
# with Minitest::Unit
|
6
|
+
watch(%r|^test/test_(.*)\.rb|)
|
7
|
+
watch(%r|^lib/(.*)([^/]+)\.rb|) { |m| "test/#{m[1]}test_#{m[2]}.rb" }
|
8
|
+
watch(%r|^test/test_helper\.rb|) { "test" }
|
9
|
+
|
10
|
+
# with Minitest::Spec
|
11
|
+
watch(%r|^spec/(.*)_spec\.rb|)
|
12
|
+
watch(%r|^lib/(.*)\.rb|) { |m| "spec/#{m[1]}_spec.rb" }
|
13
|
+
watch(%r|^lib/girdle/podcast/(.*)\.rb|) { |m| "spec/#{m[1]}_spec.rb" }
|
14
|
+
watch(%r|^spec/spec_helper\.rb|) { "spec" }
|
15
|
+
end
|
data/README.markdown
CHANGED
data/girdle-podcast.gemspec
CHANGED
@@ -16,4 +16,9 @@ Gem::Specification.new do |gem|
|
|
16
16
|
gem.version = Girdle::Podcast::VERSION
|
17
17
|
|
18
18
|
gem.add_dependency 'girdle'
|
19
|
+
|
20
|
+
gem.add_development_dependency 'guard'
|
21
|
+
gem.add_development_dependency 'guard-minitest'
|
22
|
+
gem.add_development_dependency 'rb-fsevent'
|
23
|
+
gem.add_development_dependency 'growl_notify'
|
19
24
|
end
|
@@ -1,14 +1,9 @@
|
|
1
1
|
module Girdle
|
2
2
|
module Podcast
|
3
|
-
|
3
|
+
module Action
|
4
4
|
|
5
|
-
def
|
6
|
-
|
7
|
-
@command = '/usr/bin/pcastaction'
|
8
|
-
end
|
9
|
-
|
10
|
-
def self.add_chapter(options={})
|
11
|
-
name = "#{File.basename(options[:input])}-addchapter-#{uuid}.mov"
|
5
|
+
def add_chapter(options={})
|
6
|
+
name = "add_chapter-#{uuid}.mov"
|
12
7
|
arguments = [
|
13
8
|
'addchapter',
|
14
9
|
'--basedir', options[:base_dir] || '.',
|
@@ -17,17 +12,16 @@ module Girdle
|
|
17
12
|
'--time', options[:time],
|
18
13
|
'--title', options[:title]
|
19
14
|
]
|
20
|
-
|
15
|
+
new(
|
21
16
|
name: name,
|
17
|
+
command: '/usr/bin/pcastaction',
|
22
18
|
arguments: arguments,
|
23
|
-
depends_on: [
|
24
|
-
options[:input]
|
25
|
-
]
|
19
|
+
depends_on: select_tasks([ options[:input] ] + (options[:depends_on] || []))
|
26
20
|
)
|
27
21
|
end
|
28
22
|
|
29
|
-
def
|
30
|
-
name = "
|
23
|
+
def add_tracks(options={})
|
24
|
+
name = "add_tracks-#{uuid}.mov"
|
31
25
|
arguments = [
|
32
26
|
'addtracks',
|
33
27
|
'--basedir', options[:base_dir] || '.',
|
@@ -35,16 +29,15 @@ module Girdle
|
|
35
29
|
'--input', options[:input],
|
36
30
|
'--output', name
|
37
31
|
]
|
38
|
-
|
32
|
+
new(
|
39
33
|
name: name,
|
34
|
+
command: '/usr/bin/pcastaction',
|
40
35
|
arguments: arguments,
|
41
|
-
depends_on: [
|
42
|
-
File.basename(options[:input].to_s)
|
43
|
-
]
|
36
|
+
depends_on: select_tasks([ options[:input] ] + (options[:depends_on] || []))
|
44
37
|
)
|
45
38
|
end
|
46
39
|
|
47
|
-
def
|
40
|
+
def annotate(options={})
|
48
41
|
arguments = [
|
49
42
|
'annotate',
|
50
43
|
'--basedir', options[:base_dir] || '.',
|
@@ -57,32 +50,32 @@ module Girdle
|
|
57
50
|
arguments += ['--author', options[:author]] if options[:author]
|
58
51
|
arguments += ['--keywords', options[:keywords]] if options[:keywords]
|
59
52
|
arguments += ['--copyright', options[:copyright]] if options[:copyright]
|
60
|
-
|
61
|
-
name: "
|
53
|
+
new(
|
54
|
+
name: "annotate-#{uuid}.mov",
|
55
|
+
command: '/usr/bin/pcastaction',
|
62
56
|
arguments: arguments,
|
63
|
-
depends_on: [ options[:input] ]
|
57
|
+
depends_on: select_tasks([ options[:input] ] + (options[:depends_on] || []))
|
64
58
|
)
|
65
59
|
end
|
66
60
|
|
67
|
-
def
|
68
|
-
name = "
|
61
|
+
def chapterize(options={})
|
62
|
+
name = "chapterize-#{uuid}.mov"
|
69
63
|
arguments = [
|
70
64
|
'chapterize',
|
71
65
|
'--basedir', options[:base_dir] || '.',
|
72
66
|
'--input', options[:input],
|
73
67
|
'--output', name
|
74
68
|
]
|
75
|
-
|
69
|
+
new(
|
76
70
|
name: name,
|
71
|
+
command: '/usr/bin/pcastaction',
|
77
72
|
arguments: arguments,
|
78
|
-
depends_on: [
|
79
|
-
options[:input]
|
80
|
-
]
|
73
|
+
depends_on: select_tasks([ options[:input] ] + (options[:depends_on] || []))
|
81
74
|
)
|
82
75
|
end
|
83
76
|
|
84
|
-
def
|
85
|
-
name = "
|
77
|
+
def delete_tracks(options={})
|
78
|
+
name = "delete_tracks-#{uuid}.mov"
|
86
79
|
arguments = [
|
87
80
|
'deletetracks',
|
88
81
|
'--basedir', options[:base_dir] || '.',
|
@@ -90,15 +83,16 @@ module Girdle
|
|
90
83
|
'--output', name,
|
91
84
|
'--type', options[:type]
|
92
85
|
]
|
93
|
-
|
86
|
+
new(
|
94
87
|
name: name,
|
88
|
+
command: '/usr/bin/pcastaction',
|
95
89
|
arguments: arguments,
|
96
|
-
depends_on: [ options[:input] ]
|
90
|
+
depends_on: select_tasks([ options[:input] ] + (options[:depends_on] || []))
|
97
91
|
)
|
98
92
|
end
|
99
93
|
|
100
|
-
def
|
101
|
-
name = "
|
94
|
+
def encode(options={})
|
95
|
+
name = "encode-#{uuid}.mov"
|
102
96
|
arguments = [
|
103
97
|
'encode',
|
104
98
|
'--basedir', options[:base_dir] || '.',
|
@@ -106,17 +100,16 @@ module Girdle
|
|
106
100
|
'--output', name,
|
107
101
|
'--encoder', options[:encoder]
|
108
102
|
]
|
109
|
-
|
103
|
+
new(
|
110
104
|
name: name,
|
105
|
+
command: '/usr/bin/pcastaction',
|
111
106
|
arguments: arguments,
|
112
|
-
depends_on: [
|
113
|
-
options[:input]
|
114
|
-
]
|
107
|
+
depends_on: select_tasks([ options[:input] ] + (options[:depends_on] || []))
|
115
108
|
)
|
116
109
|
end
|
117
110
|
|
118
|
-
def
|
119
|
-
name = "
|
111
|
+
def extract_tracks(options={})
|
112
|
+
name = "extract_tracks-#{uuid}.mov"
|
120
113
|
arguments = [
|
121
114
|
'extracttracks',
|
122
115
|
'--basedir', options[:base_dir] || '.',
|
@@ -124,34 +117,33 @@ module Girdle
|
|
124
117
|
'--output', name,
|
125
118
|
'--type', options[:type]
|
126
119
|
]
|
127
|
-
|
120
|
+
new(
|
128
121
|
name: name,
|
122
|
+
command: '/usr/bin/pcastaction',
|
129
123
|
arguments: arguments,
|
130
|
-
depends_on: [
|
131
|
-
File.basename(options[:input])
|
132
|
-
]
|
124
|
+
depends_on: select_tasks([ options[:input] ] + (options[:depends_on] || []))
|
133
125
|
)
|
134
126
|
end
|
135
127
|
|
136
|
-
def
|
137
|
-
name = "
|
128
|
+
def get_poster_image(options={})
|
129
|
+
name = "get_poster_image-#{uuid}.png"
|
138
130
|
arguments = [
|
139
131
|
'getposterimage',
|
132
|
+
'--basedir', options[:base_dir] || '.',
|
140
133
|
'--input', options[:input],
|
141
134
|
'--output', name,
|
142
135
|
'--time', options[:time]
|
143
136
|
]
|
144
|
-
|
137
|
+
new(
|
145
138
|
name: name,
|
139
|
+
command: '/usr/bin/pcastaction',
|
146
140
|
arguments: arguments,
|
147
|
-
depends_on: [
|
148
|
-
options[:input]
|
149
|
-
]
|
141
|
+
depends_on: select_tasks([ options[:input] ] + (options[:depends_on] || []))
|
150
142
|
)
|
151
143
|
end
|
152
144
|
|
153
|
-
def
|
154
|
-
name = "
|
145
|
+
def join(options={})
|
146
|
+
name = "join-#{uuid}.mov"
|
155
147
|
arguments = [
|
156
148
|
'join',
|
157
149
|
'--basedir', options[:base_dir] || '.',
|
@@ -159,18 +151,16 @@ module Girdle
|
|
159
151
|
'--input2', options[:input_2],
|
160
152
|
'--output', name
|
161
153
|
]
|
162
|
-
|
163
|
-
name: name,
|
154
|
+
new(
|
155
|
+
name: name,
|
156
|
+
command: '/usr/bin/pcastaction',
|
164
157
|
arguments: arguments,
|
165
|
-
depends_on: [
|
166
|
-
options[:input_1],
|
167
|
-
options[:input_2]
|
168
|
-
]
|
158
|
+
depends_on: select_tasks([ options[:input_1], options[:input_2] ] + (options[:depends_on] || []))
|
169
159
|
)
|
170
160
|
end
|
171
161
|
|
172
|
-
def
|
173
|
-
name = "
|
162
|
+
def qt_import(options={})
|
163
|
+
name = "qt_import-#{uuid}.mov"
|
174
164
|
arguments = [
|
175
165
|
'qtimport',
|
176
166
|
'--basedir', options[:base_dir] || '.',
|
@@ -180,47 +170,38 @@ module Girdle
|
|
180
170
|
if options[:enable_auto_chaptering] == true
|
181
171
|
arguments << '--enable_auto_chaptering'
|
182
172
|
end
|
183
|
-
|
173
|
+
new(
|
184
174
|
name: name,
|
175
|
+
command: '/usr/bin/pcastaction',
|
185
176
|
arguments: arguments,
|
186
|
-
depends_on: [
|
177
|
+
depends_on: select_tasks([ options[:input] ] + (options[:depends_on] || []))
|
187
178
|
)
|
188
179
|
end
|
189
180
|
|
190
|
-
def
|
181
|
+
def qt_info(options={})
|
191
182
|
arguments = [
|
192
183
|
'qtinfo',
|
193
184
|
'--basedir', options[:base_dir] || '.',
|
194
|
-
'--input', options[:input]
|
185
|
+
'--input', options[:input],
|
195
186
|
]
|
196
187
|
arguments += ['--key', options[:key] ] if options[:key]
|
197
|
-
|
198
|
-
name: "
|
188
|
+
new(
|
189
|
+
name: "qt_info-#{uuid}",
|
190
|
+
command: '/usr/bin/pcastaction',
|
199
191
|
arguments: arguments,
|
200
|
-
depends_on: [ options[:input] ]
|
192
|
+
depends_on: select_tasks([ options[:input] ] + (options[:depends_on] || []))
|
201
193
|
)
|
202
194
|
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
195
|
|
219
196
|
private
|
220
197
|
|
221
|
-
def
|
198
|
+
def uuid
|
222
199
|
`uuidgen`.strip
|
223
200
|
end
|
201
|
+
|
202
|
+
def select_tasks(dependencies)
|
203
|
+
dependencies.select {|d| d.respond_to?(:name) }
|
204
|
+
end
|
224
205
|
end
|
225
206
|
end
|
226
207
|
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module Girdle
|
2
|
+
module Podcast
|
3
|
+
module Composition
|
4
|
+
|
5
|
+
def qc_composition(options={})
|
6
|
+
name = "qc_composition_#{uuid}.mov"
|
7
|
+
base_dir = options[:base_dir] || '.'
|
8
|
+
arguments = [
|
9
|
+
options[:composition],
|
10
|
+
File.join(base_dir, name),
|
11
|
+
options[:width],
|
12
|
+
options[:height],
|
13
|
+
options[:duration]
|
14
|
+
] + (options[:parameters] || {}).map {|k,v| ["--#{k}", v] }.flatten
|
15
|
+
new(
|
16
|
+
name: name,
|
17
|
+
command: '/usr/bin/qc2movie',
|
18
|
+
arguments: arguments,
|
19
|
+
depends_on: options[:depends_on] || []
|
20
|
+
)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/lib/girdle/podcast.rb
CHANGED
@@ -2,4 +2,8 @@ require 'bundler/setup'
|
|
2
2
|
require 'girdle'
|
3
3
|
|
4
4
|
require_relative 'podcast/version'
|
5
|
-
require_relative 'podcast/
|
5
|
+
require_relative 'podcast/action'
|
6
|
+
require_relative 'podcast/composition'
|
7
|
+
|
8
|
+
Girdle::Task.extend(Girdle::Podcast::Action)
|
9
|
+
Girdle::Task.extend(Girdle::Podcast::Composition)
|
@@ -10,25 +10,24 @@ def must_set_argument(argument, value)
|
|
10
10
|
].must_equal value
|
11
11
|
end
|
12
12
|
|
13
|
-
describe
|
13
|
+
describe Girdle::Podcast::Action do
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
Task.command.must_equal '/usr/bin/pcastaction'
|
15
|
+
before do
|
16
|
+
@input = Girdle::Task.new(name: 'input')
|
18
17
|
end
|
19
18
|
|
20
|
-
describe '
|
19
|
+
describe '::add_chapter' do
|
21
20
|
|
22
21
|
before do
|
23
|
-
@task = Girdle::
|
24
|
-
input:
|
22
|
+
@task = Girdle::Task.add_chapter(
|
23
|
+
input: @input,
|
25
24
|
time: 'time',
|
26
25
|
title: 'title'
|
27
26
|
)
|
28
27
|
end
|
29
28
|
|
30
29
|
it 'must set name' do
|
31
|
-
@task.name.must_match '
|
30
|
+
@task.name.must_match 'add_chapter'
|
32
31
|
end
|
33
32
|
|
34
33
|
it 'must set subcommand argument' do
|
@@ -56,21 +55,21 @@ describe 'Girdle::Podcast::Task' do
|
|
56
55
|
end
|
57
56
|
|
58
57
|
it 'must set depends_on' do
|
59
|
-
@task.depends_on.must_equal ['input']
|
58
|
+
@task.depends_on.must_equal [ 'input' ]
|
60
59
|
end
|
61
60
|
end
|
62
61
|
|
63
|
-
describe '
|
62
|
+
describe '::add_tracks' do
|
64
63
|
|
65
64
|
before do
|
66
|
-
@task = Girdle::
|
65
|
+
@task = Girdle::Task.add_tracks(
|
67
66
|
tracks: 'tracks',
|
68
|
-
input:
|
67
|
+
input: @input
|
69
68
|
)
|
70
69
|
end
|
71
70
|
|
72
71
|
it 'must set name' do
|
73
|
-
@task.name.must_match '
|
72
|
+
@task.name.must_match 'add_tracks'
|
74
73
|
end
|
75
74
|
|
76
75
|
it 'must set subcommand argument' do
|
@@ -94,15 +93,15 @@ describe 'Girdle::Podcast::Task' do
|
|
94
93
|
end
|
95
94
|
|
96
95
|
it 'must set depends_on' do
|
97
|
-
@task.depends_on.must_equal ['input']
|
96
|
+
@task.depends_on.must_equal [ 'input' ]
|
98
97
|
end
|
99
98
|
end
|
100
99
|
|
101
|
-
describe '
|
100
|
+
describe '::annotate' do
|
102
101
|
|
103
102
|
before do
|
104
|
-
@task = Girdle::
|
105
|
-
input:
|
103
|
+
@task = Girdle::Task.annotate(
|
104
|
+
input: @input,
|
106
105
|
title: 'title',
|
107
106
|
comment: 'comment',
|
108
107
|
description: 'description',
|
@@ -113,7 +112,7 @@ describe 'Girdle::Podcast::Task' do
|
|
113
112
|
end
|
114
113
|
|
115
114
|
it 'must set name' do
|
116
|
-
@task.name.must_match '
|
115
|
+
@task.name.must_match 'annotate'
|
117
116
|
end
|
118
117
|
|
119
118
|
it 'must set subcommand argument' do
|
@@ -149,20 +148,20 @@ describe 'Girdle::Podcast::Task' do
|
|
149
148
|
end
|
150
149
|
|
151
150
|
it 'must set depends_on' do
|
152
|
-
@task.depends_on.must_equal ['input']
|
151
|
+
@task.depends_on.must_equal [ 'input' ]
|
153
152
|
end
|
154
153
|
end
|
155
154
|
|
156
|
-
describe '
|
155
|
+
describe '::chapterize' do
|
157
156
|
|
158
157
|
before do
|
159
|
-
@task = Girdle::
|
160
|
-
input:
|
158
|
+
@task = Girdle::Task.chapterize(
|
159
|
+
input: @input
|
161
160
|
)
|
162
161
|
end
|
163
162
|
|
164
163
|
it 'must set name' do
|
165
|
-
@task.name.must_match '
|
164
|
+
@task.name.must_match 'chapterize'
|
166
165
|
end
|
167
166
|
|
168
167
|
it 'must set subcommand argument' do
|
@@ -182,21 +181,21 @@ describe 'Girdle::Podcast::Task' do
|
|
182
181
|
end
|
183
182
|
|
184
183
|
it 'must set depends_on' do
|
185
|
-
@task.depends_on.must_equal ['input']
|
184
|
+
@task.depends_on.must_equal [ 'input' ]
|
186
185
|
end
|
187
186
|
end
|
188
187
|
|
189
|
-
describe '
|
188
|
+
describe '::delete_tracks' do
|
190
189
|
|
191
190
|
before do
|
192
|
-
@task = Girdle::
|
193
|
-
input:
|
191
|
+
@task = Girdle::Task.delete_tracks(
|
192
|
+
input: @input,
|
194
193
|
type: 'type'
|
195
194
|
)
|
196
195
|
end
|
197
196
|
|
198
197
|
it 'must set name' do
|
199
|
-
@task.name.must_match '
|
198
|
+
@task.name.must_match 'delete_tracks'
|
200
199
|
end
|
201
200
|
|
202
201
|
it 'must set subcommand argument' do
|
@@ -220,21 +219,21 @@ describe 'Girdle::Podcast::Task' do
|
|
220
219
|
end
|
221
220
|
|
222
221
|
it 'must set depends_on' do
|
223
|
-
@task.depends_on.must_equal ['input']
|
222
|
+
@task.depends_on.must_equal [ 'input' ]
|
224
223
|
end
|
225
224
|
end
|
226
225
|
|
227
|
-
describe '
|
226
|
+
describe '::encode' do
|
228
227
|
|
229
228
|
before do
|
230
|
-
@task = Girdle::
|
231
|
-
input:
|
229
|
+
@task = Girdle::Task.encode(
|
230
|
+
input: @input,
|
232
231
|
encoder: 'encoder'
|
233
232
|
)
|
234
233
|
end
|
235
234
|
|
236
235
|
it 'must set name' do
|
237
|
-
@task.name.must_match '
|
236
|
+
@task.name.must_match 'encode'
|
238
237
|
end
|
239
238
|
|
240
239
|
it 'must set subcommand argument' do
|
@@ -258,21 +257,21 @@ describe 'Girdle::Podcast::Task' do
|
|
258
257
|
end
|
259
258
|
|
260
259
|
it 'must set depends_on' do
|
261
|
-
@task.depends_on.must_equal ['input']
|
260
|
+
@task.depends_on.must_equal [ 'input' ]
|
262
261
|
end
|
263
262
|
end
|
264
263
|
|
265
|
-
describe '
|
264
|
+
describe '::extract_tracks' do
|
266
265
|
|
267
266
|
before do
|
268
|
-
@task = Girdle::
|
269
|
-
input:
|
267
|
+
@task = Girdle::Task.extract_tracks(
|
268
|
+
input: @input,
|
270
269
|
type: 'type'
|
271
270
|
)
|
272
271
|
end
|
273
272
|
|
274
273
|
it 'must set name' do
|
275
|
-
@task.name.must_match '
|
274
|
+
@task.name.must_match 'extract_tracks'
|
276
275
|
end
|
277
276
|
|
278
277
|
it 'must set subcommand argument' do
|
@@ -296,21 +295,21 @@ describe 'Girdle::Podcast::Task' do
|
|
296
295
|
end
|
297
296
|
|
298
297
|
it 'must set depends_on' do
|
299
|
-
@task.depends_on.must_equal ['input']
|
298
|
+
@task.depends_on.must_equal [ 'input' ]
|
300
299
|
end
|
301
300
|
end
|
302
301
|
|
303
|
-
describe '
|
302
|
+
describe '::get_poster_image' do
|
304
303
|
|
305
304
|
before do
|
306
|
-
@task = Girdle::
|
307
|
-
input:
|
305
|
+
@task = Girdle::Task.get_poster_image(
|
306
|
+
input: @input,
|
308
307
|
time: 'time'
|
309
308
|
)
|
310
309
|
end
|
311
310
|
|
312
311
|
it 'must set name' do
|
313
|
-
@task.name.must_match '
|
312
|
+
@task.name.must_match 'get_poster_image'
|
314
313
|
end
|
315
314
|
|
316
315
|
it 'must set subcommand' do
|
@@ -331,19 +330,19 @@ describe 'Girdle::Podcast::Task' do
|
|
331
330
|
|
332
331
|
end
|
333
332
|
|
334
|
-
describe '
|
333
|
+
describe '::get_preview_movie' do; end
|
335
334
|
|
336
|
-
describe '
|
335
|
+
describe '::join' do
|
337
336
|
|
338
337
|
before do
|
339
|
-
@task = Girdle::
|
338
|
+
@task = Girdle::Task.join(
|
340
339
|
input_1: 'input 1',
|
341
|
-
input_2:
|
340
|
+
input_2: @input
|
342
341
|
)
|
343
342
|
end
|
344
343
|
|
345
344
|
it 'must set name' do
|
346
|
-
@task.name.must_match '
|
345
|
+
@task.name.must_match 'join'
|
347
346
|
end
|
348
347
|
|
349
348
|
it 'must set subcommand argument' do
|
@@ -359,7 +358,7 @@ describe 'Girdle::Podcast::Task' do
|
|
359
358
|
end
|
360
359
|
|
361
360
|
it 'must set input_2 argument' do
|
362
|
-
must_set_argument 'input2', 'input
|
361
|
+
must_set_argument 'input2', 'input'
|
363
362
|
end
|
364
363
|
|
365
364
|
it 'must set output argument' do
|
@@ -367,28 +366,28 @@ describe 'Girdle::Podcast::Task' do
|
|
367
366
|
end
|
368
367
|
|
369
368
|
it 'must set depends_on' do
|
370
|
-
@task.depends_on.must_equal ['input
|
369
|
+
@task.depends_on.must_equal [ 'input' ]
|
371
370
|
end
|
372
371
|
end
|
373
372
|
|
374
|
-
describe '
|
373
|
+
describe '::merge' do; end
|
375
374
|
|
376
|
-
describe '
|
375
|
+
describe '::picture_in_picture' do; end
|
377
376
|
|
378
|
-
describe '
|
377
|
+
describe '::qceffect' do; end
|
379
378
|
|
380
|
-
describe '
|
379
|
+
describe '::qtimport' do
|
381
380
|
|
382
381
|
before do
|
383
|
-
@task = Girdle::
|
384
|
-
input:
|
382
|
+
@task = Girdle::Task.qt_import(
|
383
|
+
input: @input,
|
385
384
|
output: 'output',
|
386
385
|
enable_auto_chaptering: true
|
387
386
|
)
|
388
387
|
end
|
389
388
|
|
390
389
|
it 'must set name' do
|
391
|
-
@task.name.must_match '
|
390
|
+
@task.name.must_match 'qt_import'
|
392
391
|
end
|
393
392
|
|
394
393
|
it 'must set subcommand argument' do
|
@@ -412,29 +411,29 @@ describe 'Girdle::Podcast::Task' do
|
|
412
411
|
end
|
413
412
|
|
414
413
|
it 'must not set auto chaptering argument' do
|
415
|
-
Girdle::
|
416
|
-
input:
|
414
|
+
Girdle::Task.qt_import(
|
415
|
+
input: @input,
|
417
416
|
output: 'output',
|
418
417
|
enable_auto_chaptering: false
|
419
418
|
).arguments.wont_include('--enable_auto_chaptering')
|
420
419
|
end
|
421
420
|
|
422
421
|
it 'must set depends_on' do
|
423
|
-
@task.depends_on.must_equal ['
|
422
|
+
@task.depends_on.must_equal [ 'input' ]
|
424
423
|
end
|
425
424
|
end
|
426
425
|
|
427
|
-
describe '
|
426
|
+
describe '::qtinfo' do
|
428
427
|
|
429
428
|
before do
|
430
|
-
@task = Girdle::
|
431
|
-
input:
|
429
|
+
@task = Girdle::Task.qt_info(
|
430
|
+
input: @input,
|
432
431
|
key: 'key'
|
433
432
|
)
|
434
433
|
end
|
435
434
|
|
436
435
|
it 'must set name' do
|
437
|
-
@task.name.must_match '
|
436
|
+
@task.name.must_match 'qt_info'
|
438
437
|
end
|
439
438
|
|
440
439
|
it 'must set subcommand' do
|
@@ -454,8 +453,8 @@ describe 'Girdle::Podcast::Task' do
|
|
454
453
|
end
|
455
454
|
|
456
455
|
it 'must not set key argument' do
|
457
|
-
Girdle::
|
458
|
-
input:
|
456
|
+
Girdle::Task.qt_info(
|
457
|
+
input: @input
|
459
458
|
).arguments.wont_include '--key'
|
460
459
|
end
|
461
460
|
|
@@ -464,58 +463,9 @@ describe 'Girdle::Podcast::Task' do
|
|
464
463
|
end
|
465
464
|
end
|
466
465
|
|
467
|
-
describe '
|
466
|
+
describe '::split' do; end
|
468
467
|
|
469
|
-
describe '
|
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
|
468
|
+
describe '::trim' do; end
|
520
469
|
|
470
|
+
describe '::watermark' do; end
|
521
471
|
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
require_relative 'spec_helper'
|
2
|
+
|
3
|
+
describe Girdle::Podcast::Composition do
|
4
|
+
|
5
|
+
describe '::qc_composition' do
|
6
|
+
|
7
|
+
before do
|
8
|
+
@task = Girdle::Task.qc_composition(
|
9
|
+
composition: 'composition',
|
10
|
+
width: 'width',
|
11
|
+
height: 'height',
|
12
|
+
duration: 'duration',
|
13
|
+
parameters: { a_param: 'a_value', another_param: 'another_value' }
|
14
|
+
)
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'must set name' do
|
18
|
+
@task.name.must_match 'qc_composition'
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'must set command' do
|
22
|
+
@task.command.must_equal '/usr/bin/qc2movie'
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'must set composition argument' do
|
26
|
+
@task.arguments[0].must_equal 'composition'
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'must set output argument' do
|
30
|
+
@task.arguments[1].must_equal "./#{@task.name}"
|
31
|
+
end
|
32
|
+
|
33
|
+
it 'must set width argument' do
|
34
|
+
@task.arguments[2].must_equal 'width'
|
35
|
+
end
|
36
|
+
|
37
|
+
it 'must set height argument' do
|
38
|
+
@task.arguments[3].must_equal 'height'
|
39
|
+
end
|
40
|
+
|
41
|
+
it 'must set duration argument' do
|
42
|
+
@task.arguments[4].must_equal 'duration'
|
43
|
+
end
|
44
|
+
|
45
|
+
it 'must set parameters' do
|
46
|
+
@task.arguments[5].must_equal '--a_param'
|
47
|
+
@task.arguments[6].must_equal 'a_value'
|
48
|
+
@task.arguments[7].must_equal '--another_param'
|
49
|
+
@task.arguments[8].must_equal 'another_value'
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: girdle-podcast
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-10-
|
12
|
+
date: 2011-10-06 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: girdle
|
16
|
-
requirement: &
|
16
|
+
requirement: &70335617884220 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,51 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70335617884220
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: guard
|
27
|
+
requirement: &70335617878900 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
type: :development
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *70335617878900
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: guard-minitest
|
38
|
+
requirement: &70335617876760 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
44
|
+
type: :development
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *70335617876760
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: rb-fsevent
|
49
|
+
requirement: &70335617875220 !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
type: :development
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: *70335617875220
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: growl_notify
|
60
|
+
requirement: &70335617872600 !ruby/object:Gem::Requirement
|
61
|
+
none: false
|
62
|
+
requirements:
|
63
|
+
- - ! '>='
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '0'
|
66
|
+
type: :development
|
67
|
+
prerelease: false
|
68
|
+
version_requirements: *70335617872600
|
25
69
|
description: Girdle Podcast Producer actions
|
26
70
|
email:
|
27
71
|
- jamiehodge@me.com
|
@@ -31,14 +75,17 @@ extra_rdoc_files: []
|
|
31
75
|
files:
|
32
76
|
- .gitignore
|
33
77
|
- Gemfile
|
78
|
+
- Guardfile
|
34
79
|
- README.markdown
|
35
80
|
- Rakefile
|
36
81
|
- girdle-podcast.gemspec
|
37
82
|
- lib/girdle/podcast.rb
|
38
|
-
- lib/girdle/podcast/
|
83
|
+
- lib/girdle/podcast/action.rb
|
84
|
+
- lib/girdle/podcast/composition.rb
|
39
85
|
- lib/girdle/podcast/version.rb
|
86
|
+
- spec/action_spec.rb
|
87
|
+
- spec/composition_spec.rb
|
40
88
|
- spec/spec_helper.rb
|
41
|
-
- spec/task_spec.rb
|
42
89
|
homepage: ''
|
43
90
|
licenses: []
|
44
91
|
post_install_message:
|
@@ -64,5 +111,6 @@ signing_key:
|
|
64
111
|
specification_version: 3
|
65
112
|
summary: Create Xgrid tasks for Podcast Producer actions
|
66
113
|
test_files:
|
114
|
+
- spec/action_spec.rb
|
115
|
+
- spec/composition_spec.rb
|
67
116
|
- spec/spec_helper.rb
|
68
|
-
- spec/task_spec.rb
|