paperclip-av-chainer 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9d00edaf97df9ffc8998c779decc2976346ee9a
|
4
|
+
data.tar.gz: 9c8be29a063c9e064d3d14c5373bed383091d422
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae9f20d2ef9d83adadaed387221155c95c8091dcc2c0f1cccbd54289a0e3b51b5118c65bbbc8724143bbbafd03cc3acb3568e42bf9c9eb555000bee88f44770a
|
7
|
+
data.tar.gz: 232bb396ffe477ca86416f89a5ee292beb662b85e18976cecb7cea1f5210eee585f1d2670b4d67da3587aa679d1eea3853389e2e40b5b5588c6dd5993cbc5181
|
@@ -16,27 +16,27 @@ module Paperclip
|
|
16
16
|
|
17
17
|
def make
|
18
18
|
if @supported_formats.include?(@extension)
|
19
|
-
|
19
|
+
log "Received supported file #{@file.path}"
|
20
20
|
case @extension
|
21
21
|
when '.zip'
|
22
22
|
unzip
|
23
23
|
end
|
24
24
|
result = concatenate
|
25
|
-
|
25
|
+
log "Successfully concatenated source into #{result.path}"
|
26
26
|
# Explicitly return in order to allow the next processor in the chain to work
|
27
27
|
# on the new file
|
28
28
|
return result
|
29
29
|
end
|
30
|
-
|
30
|
+
log "Skipping file with unsupported format: #{@file.path}"
|
31
31
|
# If the file is not supported, just return it
|
32
32
|
@file
|
33
33
|
end
|
34
34
|
|
35
35
|
def unzip
|
36
36
|
if @supported_formats.include?(@extension)
|
37
|
-
|
37
|
+
log "Extracting contents to #{@destination}"
|
38
38
|
Zip::File.open(File.expand_path(@file.path)) do |zip_file|
|
39
|
-
|
39
|
+
log "Creating #{@destination}"
|
40
40
|
FileUtils.mkdir_p(@destination)
|
41
41
|
zip_file.each do |source|
|
42
42
|
# Extract to file/directory/symlink
|
@@ -52,9 +52,9 @@ module Paperclip
|
|
52
52
|
def concatenate
|
53
53
|
list = Dir["#{@destination}/*"]
|
54
54
|
target = Tempfile.new(['chainer-', @target_format])
|
55
|
-
|
55
|
+
log "Concatentating #{list.inspect} from #{@destination} into #{target.path}"
|
56
56
|
begin
|
57
|
-
cli = ::Av.cli
|
57
|
+
cli = ::Av.cli(log: true)
|
58
58
|
cli.reset_input_filters
|
59
59
|
cli.filter_concat(list)
|
60
60
|
cli.add_destination(target.path)
|
@@ -64,5 +64,9 @@ module Paperclip
|
|
64
64
|
raise Paperclip::Error, "error while concatenating video for #{@file.path}: #{e}" if @whiny
|
65
65
|
end
|
66
66
|
end
|
67
|
+
|
68
|
+
def log message
|
69
|
+
Paperclip.log "[chainer] #{message}"
|
70
|
+
end
|
67
71
|
end
|
68
72
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paperclip-av-chainer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Omar Abdel-Wahab
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -128,14 +128,14 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - '>='
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 0.
|
131
|
+
version: 0.7.0
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - '>='
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 0.
|
138
|
+
version: 0.7.0
|
139
139
|
description: Audio/Video Chainer for Paperclip using FFMPEG/Avconv
|
140
140
|
email:
|
141
141
|
- owahab@gmail.com
|