paperclip-av-chainer 0.6.0 → 0.6.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0de95c74ad0f71dffd469b7fa641523798f7c18a
4
- data.tar.gz: e10ee9dfd05afb89314d6ef5382ee4f08003eb0a
3
+ metadata.gz: e9d00edaf97df9ffc8998c779decc2976346ee9a
4
+ data.tar.gz: 9c8be29a063c9e064d3d14c5373bed383091d422
5
5
  SHA512:
6
- metadata.gz: 535cb2d77fa1b3dab5964976e071f70ce08491600769f264dc82bb30897f084f5f0f086aa00a2af55b024d691b742038757e7cc87b8f00388c96f88f56fabc2e
7
- data.tar.gz: 8c5ef0653e0bec86f4b9a30a53c3800e9a42cee6c21ca8516c08828bba6218f6de912d333613ffed55ad33d7111ed9664a5cde836e2c4bc699426da5f2e1b2a8
6
+ metadata.gz: ae9f20d2ef9d83adadaed387221155c95c8091dcc2c0f1cccbd54289a0e3b51b5118c65bbbc8724143bbbafd03cc3acb3568e42bf9c9eb555000bee88f44770a
7
+ data.tar.gz: 232bb396ffe477ca86416f89a5ee292beb662b85e18976cecb7cea1f5210eee585f1d2670b4d67da3587aa679d1eea3853389e2e40b5b5588c6dd5993cbc5181
@@ -1,7 +1,7 @@
1
1
  module Paperclip
2
2
  module Av
3
3
  module Chainer
4
- VERSION = "0.6.0"
4
+ VERSION = "0.6.1"
5
5
  end
6
6
  end
7
7
  end
@@ -16,27 +16,27 @@ module Paperclip
16
16
 
17
17
  def make
18
18
  if @supported_formats.include?(@extension)
19
- Paperclip.log "[chainer] Received supported file #{@file.path}"
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
- Paperclip.log "[chainer] Successfully concatenated source into #{result.path}"
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
- Paperclip.log "[chainer] Skipping file with unsupported format: #{@file.path}"
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
- Paperclip.log "[chainer] Extracting contents to #{@destination}"
37
+ log "Extracting contents to #{@destination}"
38
38
  Zip::File.open(File.expand_path(@file.path)) do |zip_file|
39
- Paperclip.log "[chainer] Creating #{@destination}"
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
- Paperclip.log "[chainer] Concatentating #{list.inspect} from #{@destination} into #{target.path}"
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
@@ -27,5 +27,5 @@ Gem::Specification.new do |spec|
27
27
 
28
28
  spec.add_dependency "paperclip", ">=2.5.2"
29
29
  spec.add_dependency "rubyzip", "~> 1.1.0"
30
- spec.add_dependency "av", ">= 0.4.0"
30
+ spec.add_dependency "av", ">= 0.7.0"
31
31
  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.0
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-09-13 00:00:00.000000000 Z
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.4.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.4.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