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
@@ -10,7 +10,7 @@ GIT
10
10
  PATH
11
11
  remote: .
12
12
  specs:
13
- thumbkit (0.1.1)
13
+ thumbkit (0.1.2)
14
14
 
15
15
  GEM
16
16
  remote: https://rubygems.org/
@@ -20,8 +20,20 @@
20
20
  # end
21
21
  #
22
22
  module Thumbkit::Adapters::CarrierWave
23
- def thumbkit(width, height, options = {})
24
- options.merge!(width: width, height: height)
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)
@@ -1,3 +1,3 @@
1
1
  module Thumbkit::Adapters
2
- autoload :CarrierWave, 'thumbkit/adapters/carrierwave'
2
+ autoload :CarrierWave, 'thumbkit/adapters/carrier_wave'
3
3
  end
@@ -1,3 +1,3 @@
1
1
  class Thumbkit
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
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.2
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-07 00:00:00.000000000 Z
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/carrierwave.rb
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