paperclip-ffmpeg 0.12.0 → 0.12.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.
@@ -169,17 +169,17 @@ module Paperclip
169
169
  Paperclip.log("[ffmpeg] #{command}")
170
170
  ffmpeg = IO.popen(command)
171
171
  ffmpeg.each("\r") do |line|
172
- if line =~ /((\d*)\s.?)fps,/
172
+ if line =~ /(([\d\.]*)\s.?)fps,/
173
173
  meta[:fps] = $1.to_i
174
174
  end
175
175
  # Matching lines like:
176
176
  # Video: h264, yuvj420p, 640x480 [PAR 72:72 DAR 4:3], 10301 kb/s, 30 fps, 30 tbr, 600 tbn, 600 tbc
177
177
  if line =~ /Video:(.*)/
178
- v = $1.to_s.split(',')
179
- size = v[2].strip!.split(' ').first
180
- meta[:size] = size.to_s
181
- meta[:aspect] = size.split('x').first.to_f / size.split('x').last.to_f
182
- end
178
+ v = $1.to_s
179
+ size = v.match(/\d{3,5}x\d{3,5}/).to_s
180
+ meta[:size] = size
181
+ meta[:aspect] = size.split('x').first.to_f / size.split('x').last.to_f
182
+ end
183
183
  # Matching Duration: 00:01:31.66, start: 0.000000, bitrate: 10404 kb/s
184
184
  if line =~ /Duration:(\s.?(\d*):(\d*):(\d*\.\d*))/
185
185
  meta[:length] = $2.to_s + ":" + $3.to_s + ":" + $4.to_s
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "paperclip-ffmpeg"
6
- s.version = '0.12.0'
6
+ s.version = '0.12.1'
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ["Omar Abdel-Wahab"]
9
9
  s.email = ["owahab@gmail.com"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paperclip-ffmpeg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.12.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-08 00:00:00.000000000 Z
12
+ date: 2013-09-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: paperclip
@@ -54,18 +54,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
54
54
  - - ! '>='
55
55
  - !ruby/object:Gem::Version
56
56
  version: '0'
57
- segments:
58
- - 0
59
- hash: -2200789204440075154
60
57
  required_rubygems_version: !ruby/object:Gem::Requirement
61
58
  none: false
62
59
  requirements:
63
60
  - - ! '>='
64
61
  - !ruby/object:Gem::Version
65
62
  version: '0'
66
- segments:
67
- - 0
68
- hash: -2200789204440075154
69
63
  requirements: []
70
64
  rubyforge_project: paperclip-ffmpeg
71
65
  rubygems_version: 1.8.23
@@ -73,3 +67,4 @@ signing_key:
73
67
  specification_version: 3
74
68
  summary: Process your attachments with FFMPEG
75
69
  test_files: []
70
+ has_rdoc: