thumbkit 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock
CHANGED
@@ -20,8 +20,20 @@
|
|
20
20
|
# end
|
21
21
|
#
|
22
22
|
module Thumbkit::Adapters::CarrierWave
|
23
|
-
def
|
24
|
-
|
23
|
+
def thumbkit_options(args)
|
24
|
+
{}.tap do |options|
|
25
|
+
if args.size > 1
|
26
|
+
width = args.shift
|
27
|
+
height = args.shift
|
28
|
+
options.merge!(width: width, height: height)
|
29
|
+
end
|
30
|
+
|
31
|
+
options.merge! args.fetch(0, {})
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def thumbkit(*args)
|
36
|
+
options = thumbkit_options(args)
|
25
37
|
cache_stored_file! if !cached?
|
26
38
|
thumbkit = Thumbkit.new(current_path)
|
27
39
|
result = thumbkit.write_thumbnail(nil, options)
|
data/lib/thumbkit/adapters.rb
CHANGED
data/lib/thumbkit/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thumbkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
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: 2012-06-
|
12
|
+
date: 2012-06-08 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Thumbkit makes thumbnails!
|
15
15
|
email:
|
@@ -18,7 +18,7 @@ executables: []
|
|
18
18
|
extensions: []
|
19
19
|
extra_rdoc_files: []
|
20
20
|
files:
|
21
|
-
- lib/thumbkit/adapters/
|
21
|
+
- lib/thumbkit/adapters/carrier_wave.rb
|
22
22
|
- lib/thumbkit/adapters.rb
|
23
23
|
- lib/thumbkit/options.rb
|
24
24
|
- lib/thumbkit/processor/audio.rb
|