attachment_magick 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- attachment_magick (0.2.0)
4
+ attachment_magick (0.2.1)
5
5
  dragonfly (>= 0.8.1)
6
6
  jquery-rails (>= 0.2.7)
7
7
  marcosinger-auto_html (>= 1.3.4)
@@ -54,7 +54,8 @@ module AttachmentMagick
54
54
  if value.is_a?(String)
55
55
  width, height = value.split("x")
56
56
  option = {:width => width.to_i}
57
- option.merge!({:height => height.to_i}) if height
57
+ option.merge!({:height => height.to_i}) if height
58
+ option.merge!({:ajust => height.match(/\W/).to_s}) unless height.match(/\W/).to_s.blank? if height
58
59
  end
59
60
 
60
61
  hash.merge!({key.to_sym => option})
@@ -1,3 +1,3 @@
1
1
  module AttachmentMagick
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
@@ -7,5 +7,6 @@ class ArtistTest < ActiveSupport::TestCase
7
7
  assert_equal "150x", Artist.style_grid_10
8
8
  assert_equal "200x300", Artist.style_grid_15
9
9
  assert_equal "909x230#", Artist.style_grid_16
10
+ assert_equal "x700>", Artist.style_portrait
10
11
  end
11
12
  end
@@ -16,5 +16,6 @@ class Artist
16
16
  thumb
17
17
  fullscreen
18
18
  publisher
19
+ portrait
19
20
  end
20
21
  end
@@ -4,8 +4,9 @@ AttachmentMagick.setup do |config|
4
4
  config.gutter = 3
5
5
 
6
6
  config.custom_styles do
7
- thumb "36x36"
8
- fullscreen :width => 1024
9
- publisher "54x"
7
+ thumb "36x36"
8
+ portrait "x700>"
9
+ fullscreen :width => 1024
10
+ publisher "54x"
10
11
  end
11
12
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: attachment_magick
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.1
5
+ version: 0.2.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - "Marco Ant\xC3\xB4nio Singer"