pothoven-attachment_fu 3.2.3 → 3.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/CHANGELOG +0 -1
  2. data/lib/pothoven-attachment_fu.rb +10 -0
  3. metadata +1 -1
data/CHANGELOG CHANGED
@@ -1,7 +1,6 @@
1
1
  * Nov 15, 2012 *
2
2
  * Removed 'crop:' option as already included when prefixing geometry with a 'c'. Add note to docs.
3
3
  * Added option to sharpen resized images ':sharpen_on_resize'
4
- * Removed old init code that causes a asset:precompile error for sprockets (per https://github.com/rails/rails/issues/6989)
5
4
 
6
5
  * Oct 26, 2012 *
7
6
  * Merged with https://github.com/tdd/attachment_fu fork to include GEM support for use in Rails 3.2, and bumped version to 3.2.x to indicate Rails 3.2 support.
@@ -9,5 +9,15 @@ class Engine < Rails::Engine
9
9
  ActiveRecord::Base.send(:extend, Technoweenie::AttachmentFu::ActMethods)
10
10
  Technoweenie::AttachmentFu.tempfile_path = ATTACHMENT_FU_TEMPFILE_PATH if Object.const_defined?(:ATTACHMENT_FU_TEMPFILE_PATH)
11
11
  FileUtils.mkdir_p Technoweenie::AttachmentFu.tempfile_path
12
+
13
+ # overwrite so tempfiles use the extension of the basename.
14
+ # important for rmagick and image science
15
+ Tempfile.class_eval do
16
+ def make_tmpname(basename, n)
17
+ ext = nil
18
+ sprintf("%s%d-%d%s", basename.to_s.gsub(/\.\w+$/) { |s| ext = s; '' }, $$, n.to_i, ext)
19
+ end
20
+ end
21
+
12
22
  end
13
23
  end
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.3
4
+ version: 3.2.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: