pothoven-attachment_fu 3.2.4 → 3.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
* Feb 19, 2013 *
|
|
2
|
+
* Pull in changes from https://github.com/itkin/attachment_fu fork to fix mini magick
|
|
3
|
+
|
|
1
4
|
* Nov 15, 2012 *
|
|
2
5
|
* Removed 'crop:' option as already included when prefixing geometry with a 'c'. Add note to docs.
|
|
3
6
|
* Added option to sharpen resized images ':sharpen_on_resize'
|
|
@@ -194,9 +194,9 @@ module Technoweenie # :nodoc:
|
|
|
194
194
|
base.class_attribute :attachment_options
|
|
195
195
|
base.before_destroy :destroy_thumbnails
|
|
196
196
|
base.before_validation :set_size_from_temp_path
|
|
197
|
-
base.after_save :after_process_attachment
|
|
198
197
|
base.after_destroy :destroy_file
|
|
199
198
|
base.after_validation :process_attachment
|
|
199
|
+
base.after_save :after_process_attachment
|
|
200
200
|
#if defined?(::ActiveSupport::Callbacks)
|
|
201
201
|
# base.define_callbacks :after_resize, :after_attachment_saved, :before_thumbnail_saved
|
|
202
202
|
#end
|
|
@@ -12,7 +12,7 @@ module Technoweenie # :nodoc:
|
|
|
12
12
|
# Yields a block containing an MiniMagick Image for the given binary data.
|
|
13
13
|
def with_image(file, &block)
|
|
14
14
|
begin
|
|
15
|
-
binary_data = file.is_a?(MiniMagick::Image) ? file : MiniMagick::Image.
|
|
15
|
+
binary_data = file.is_a?(MiniMagick::Image) ? file : MiniMagick::Image.open(file) unless !Object.const_defined?(:MiniMagick)
|
|
16
16
|
rescue
|
|
17
17
|
# Log the failure to load the image.
|
|
18
18
|
logger.debug("Exception working with image: #{$!}")
|
|
@@ -44,7 +44,7 @@ module Technoweenie # :nodoc:
|
|
|
44
44
|
|
|
45
45
|
# GIF is not handled correctly, so we move to PNG, as in other processors…
|
|
46
46
|
if format == 'GIF'
|
|
47
|
-
|
|
47
|
+
img.format('PNG')
|
|
48
48
|
end
|
|
49
49
|
|
|
50
50
|
if size.is_a?(Fixnum) || (size.is_a?(Array) && size.first.is_a?(Fixnum))
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pothoven-attachment_fu
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.2.
|
|
4
|
+
version: 3.2.5
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date:
|
|
13
|
+
date: 2013-02-19 00:00:00.000000000 Z
|
|
14
14
|
dependencies: []
|
|
15
15
|
description: This is a fork of Rick Olson’s attachment_fu adding Ruby 1.9 and Rails
|
|
16
16
|
3.2 support as well as some other enhancements.
|