carrierwave-video-thumbnailer 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/.travis.yml +12 -0
- data/README.md +22 -15
- data/lib/carrierwave/video/thumbnailer/ffmpegthumbnailer.rb +1 -0
- data/lib/carrierwave/video/thumbnailer/version.rb +1 -1
- metadata +4 -3
data/.gitignore
CHANGED
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# carrierwave-video-thumbnailer
|
2
2
|
|
3
|
+
[![Build Status](https://travis-ci.org/evrone/carrierwave-video-thumbnailer.png)](https://travis-ci.org/evrone/carrierwave-video-thumbnailer) [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/evrone/carrierwave-video-thumbnailer)
|
4
|
+
|
3
5
|
* [Homepage](https://github.com/evrone/carrierwave-video-thumbnailer#readme)
|
4
6
|
* [Issues](https://github.com/evrone/carrierwave-video-thumbnailer/issues)
|
5
7
|
* [Documentation](http://rubydoc.info/gems/carrierwave-video-thumbnailer/frames)
|
@@ -23,22 +25,23 @@ Here's a working example:
|
|
23
25
|
|
24
26
|
In your Rails `app/uploaders/reel_uploader.rb`:
|
25
27
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
version :thumb do
|
31
|
-
process thumbnail: [{format: 'png', quality: 10, size: 192, strip: true, logger: Rails.logger}]
|
32
|
-
def full_filename for_file
|
33
|
-
png_name for_file, version_name
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
def png_name for_file, version_name
|
38
|
-
%Q{#{version_name}_#{for_file.chomp(File.extname(for_file))}.png}
|
39
|
-
end
|
28
|
+
```ruby
|
29
|
+
class ReelUploader < CarrierWave::Uploader::Base
|
30
|
+
include CarrierWave::Video # for your video processing
|
31
|
+
include CarrierWave::Video::Thumbnailer
|
40
32
|
|
33
|
+
version :thumb do
|
34
|
+
process thumbnail: [{format: 'png', quality: 10, size: 192, strip: true, logger: Rails.logger}]
|
35
|
+
def full_filename for_file
|
36
|
+
png_name for_file, version_name
|
41
37
|
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def png_name for_file, version_name
|
41
|
+
%Q{#{version_name}_#{for_file.chomp(File.extname(for_file))}.png}
|
42
|
+
end
|
43
|
+
end
|
44
|
+
```
|
42
45
|
|
43
46
|
## Thumbnailer Options
|
44
47
|
|
@@ -66,7 +69,11 @@ manual:
|
|
66
69
|
|
67
70
|
$ gem install carrierwave-video-thumbnailer
|
68
71
|
|
69
|
-
Or
|
72
|
+
Or
|
73
|
+
```ruby
|
74
|
+
gem 'carrierwave-video-thumbnailer'
|
75
|
+
```
|
76
|
+
in your Gemfile.
|
70
77
|
|
71
78
|
## Acknowledgements
|
72
79
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: carrierwave-video-thumbnailer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
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:
|
12
|
+
date: 2013-01-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: carrierwave
|
@@ -152,6 +152,7 @@ files:
|
|
152
152
|
- .gitignore
|
153
153
|
- .rspec
|
154
154
|
- .rvmrc.sample
|
155
|
+
- .travis.yml
|
155
156
|
- .yardopts
|
156
157
|
- ChangeLog.md
|
157
158
|
- Gemfile
|
@@ -188,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
188
189
|
version: '0'
|
189
190
|
requirements: []
|
190
191
|
rubyforge_project:
|
191
|
-
rubygems_version: 1.8.
|
192
|
+
rubygems_version: 1.8.23
|
192
193
|
signing_key:
|
193
194
|
specification_version: 3
|
194
195
|
summary: Video thumbnailer plugin for CarrierWave
|