paperclip-ffmpeg 0.2.3 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -40,8 +40,10 @@ In your model:
40
40
 
41
41
  This will produce:
42
42
 
43
- 1. A transcoded +:medium+ FLV file with the requested dimensions if they will match the aspect ratio of the original file, otherwise, width will be maintained and height will be recalculated to keep the original aspect ration.
44
- 2. A screenshot +:thumb+ with the requested dimensions regardless of the aspect ratio.
43
+ 1. A transcoded `:medium` FLV file with the requested dimensions if they will match the aspect ratio of the original file, otherwise, width will be maintained and height will be recalculated to keep the original aspect ration.
44
+ 2. A screenshot `:thumb` with the requested dimensions regardless of the aspect ratio.
45
+
46
+ You may optionally add `<attachment>_meta` to your model and paperclip-ffmpeg will add information about the processed video.
45
47
 
46
48
 
47
49
  License
@@ -30,6 +30,7 @@ module Paperclip
30
30
  @current_format = File.extname(@file.path)
31
31
  @basename = File.basename(@file.path, @current_format)
32
32
  @meta = identify
33
+ attachment.instance_write(:meta, @meta)
33
34
  end
34
35
  # Performs the transcoding of the +file+ into a thumbnail/video. Returns the Tempfile
35
36
  # that contains the new image/video.
@@ -112,4 +113,10 @@ module Paperclip
112
113
  meta
113
114
  end
114
115
  end
116
+
117
+ class Attachment
118
+ def meta
119
+ instance_read(:meta)
120
+ end
121
+ end
115
122
  end
@@ -1,5 +1,5 @@
1
1
  module Paperclip
2
2
  module Ffmpeg
3
- VERSION = "0.2.3"
3
+ VERSION = "0.3.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: paperclip-ffmpeg
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.3
5
+ version: 0.3.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Omar Abdel-Wahab
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-06-05 00:00:00 +02:00
13
+ date: 2011-06-09 00:00:00 +02:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency