dragonfly 1.0.11 → 1.0.12

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of dragonfly might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 685e6116346b2a5b8853e643a5441cbcc7bce93d
4
- data.tar.gz: 92c44ab44a26bab0e3423d6a3e5cade8b040d4d9
3
+ metadata.gz: 3ba96d8739fae1bd6383eefdca4c8b9ac0d92adb
4
+ data.tar.gz: 729dce87ad0b0af4625c5e346d824fab9da722e2
5
5
  SHA512:
6
- metadata.gz: ce6ef849c48cbacf4468019988dc99fd10781f52b5689d5550ec55a21c7c6fdc2f560024cf0908eefbcc529b5d194f411a812e48522c3ec7e6a81e8dfb26ac07
7
- data.tar.gz: 256a355a616ad042a832d00e8e99407953f4afe1b2f769071aa9cc1e8b7582d465fa1e53f60bf538ce21b30b6643d540878f786a66316ebdc85b38877d0edc9b
6
+ metadata.gz: f02d90058a7576744d706e56df923b306645505196e896b30c2eac19a5e833ddf2f803ffebc3e34640a01231e6fd4557677e7a5aec2f2d811288e768fac3d077
7
+ data.tar.gz: 2f916377721b7b7c2316c5da4a23ddd697cdedc49a5e2f2e3cb1119c33a935704dd6c03c0534e574b3ca52a565cc91c88114ac43da327ec737155b7a3b699ba7
data/History.md CHANGED
@@ -1,3 +1,9 @@
1
+ 1.0.12 (2015-09-16)
2
+ ===================
3
+ Features
4
+ --------
5
+ - Made thumb processor args for a specific geometry publicly accesible
6
+
1
7
  1.0.11 (2015-09-04)
2
8
  ===================
3
9
  Fixes
data/README.md CHANGED
@@ -10,7 +10,7 @@ class User < ActiveRecord::Base # model
10
10
  end
11
11
  ```
12
12
  ```erb
13
- <%= image_tag @user.photo.thumb('300x200#') # view %>
13
+ <%= image_tag @user.photo.thumb('300x200#').url # view %>
14
14
  ```
15
15
 
16
16
  ... or generate text images on-demand in Sinatra ...
@@ -44,7 +44,7 @@ Installation
44
44
 
45
45
  or in your Gemfile
46
46
  ```ruby
47
- gem 'dragonfly', '~> 1.0.11'
47
+ gem 'dragonfly', '~> 1.0.12'
48
48
  ```
49
49
 
50
50
  Require with
@@ -26,7 +26,11 @@ module Dragonfly
26
26
  end
27
27
 
28
28
  def call(content, geometry, opts={})
29
- args = case geometry
29
+ content.process!(:convert, args_for_geometry(geometry), opts)
30
+ end
31
+
32
+ def args_for_geometry(geometry)
33
+ case geometry
30
34
  when RESIZE_GEOMETRY
31
35
  resize_args(geometry)
32
36
  when CROPPED_RESIZE_GEOMETRY
@@ -41,7 +45,6 @@ module Dragonfly
41
45
  )
42
46
  else raise ArgumentError, "Didn't recognise the geometry string #{geometry}"
43
47
  end
44
- content.process!(:convert, args, opts)
45
48
  end
46
49
 
47
50
  private
@@ -1,3 +1,3 @@
1
1
  module Dragonfly
2
- VERSION = '1.0.11'
2
+ VERSION = '1.0.12'
3
3
  end
@@ -170,4 +170,10 @@ describe Dragonfly::ImageMagick::Processors::Thumb do
170
170
  end
171
171
  end
172
172
 
173
+ describe "args_for_geometry" do
174
+ it "returns the convert arguments used for a given geometry" do
175
+ expect(processor.args_for_geometry('30x40')).to eq('-resize 30x40')
176
+ end
177
+ end
178
+
173
179
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dragonfly
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.11
4
+ version: 1.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Evans
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-04 00:00:00.000000000 Z
11
+ date: 2015-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack