alchemy_cms 2.5.2 → 2.5.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -75,6 +75,11 @@ module Alchemy
75
75
 
76
76
  # Return the processed image dependent of size and cropping parameters
77
77
  def processed_image
78
+ if params[:upsample] == 'true'
79
+ resize_string = @size.to_s
80
+ else
81
+ resize_string = "#{@size}>"
82
+ end
78
83
  image_file = @picture.image_file
79
84
  if image_file.nil?
80
85
  raise MissingImageFileError, "Missing image file for #{@picture.inspect}"
@@ -82,7 +87,7 @@ module Alchemy
82
87
  if params[:crop_size].present? && params[:crop_from].present?
83
88
  crop_from = params[:crop_from].split('x')
84
89
  image_file = image_file.process(:thumb, "#{params[:crop_size]}+#{crop_from[0]}+#{crop_from[1]}")
85
- image_file.process(:resize, @size + '>')
90
+ image_file.process(:resize, resize_string)
86
91
  elsif params[:crop] == 'crop' && @size.present?
87
92
  width, height = @size.split('x').collect(&:to_i)
88
93
  # prevent upscaling unless :upsample param is true
@@ -97,7 +102,7 @@ module Alchemy
97
102
  end
98
103
  image_file.process(:resize_and_crop, :width => width, :height => height, :gravity => 'c')
99
104
  elsif @size.present?
100
- image_file.process(:resize, "#{@size}>")
105
+ image_file.process(:resize, resize_string)
101
106
  else
102
107
  image_file
103
108
  end
@@ -1,6 +1,6 @@
1
1
  module Alchemy
2
2
 
3
- VERSION = "2.5.2"
3
+ VERSION = "2.5.2.1"
4
4
 
5
5
  def self.version
6
6
  VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alchemy_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.2
4
+ version: 2.5.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2013-03-12 00:00:00.000000000 Z
16
+ date: 2013-03-14 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: rails
@@ -1131,7 +1131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1131
1131
  version: '0'
1132
1132
  segments:
1133
1133
  - 0
1134
- hash: -107875823720288269
1134
+ hash: 4224220803658243436
1135
1135
  requirements:
1136
1136
  - ImageMagick (libmagick), v6.6 or greater.
1137
1137
  rubyforge_project: