crafterm / attachment_fu forked from technoweenie/attachment_fu

Updated Attachment Fu plugin including support for Core Image under Mac OSX

This URL has Read+Write access

attachment_fu / init.rb
c3b5889f » technoweenie 2006-12-22 move processors and backend... 1 require 'tempfile'
2
43d1298a » technoweenie 2006-12-23 add image science support 3 Tempfile.class_eval do
d89bfe43 » technoweenie 2006-12-23 comments comments comments 4 # overwrite so tempfiles use the extension of the basename. important for rmagick and image science
c3b5889f » technoweenie 2006-12-22 move processors and backend... 5 def make_tmpname(basename, n)
43d1298a » technoweenie 2006-12-23 add image science support 6 ext = nil
4b762988 » technoweenie 2007-01-11 dont break tempfile with my... 7 sprintf("%s%d-%d%s", basename.to_s.gsub(/\.\w+$/) { |s| ext = s; '' }, $$, n, ext)
c3b5889f » technoweenie 2006-12-22 move processors and backend... 8 end
9 end
10
d35205c9 » technoweenie 2007-01-09 add image science resizing ... 11 require 'geometry'
96c98afd » technoweenie 2006-12-29 create tempfile dir automat... 12 ActiveRecord::Base.send(:extend, Technoweenie::AttachmentFu::ActMethods)
8e8f0779 » technoweenie 2006-12-29 Object.const_defined? that is 13 Technoweenie::AttachmentFu.tempfile_path = ATTACHMENT_FU_TEMPFILE_PATH if Object.const_defined?(:ATTACHMENT_FU_TEMPFILE_PATH)
d9718591 » crafterm 2008-02-21 Add support for Core Image ... 14 FileUtils.mkdir_p Technoweenie::AttachmentFu.tempfile_path
15
16 $:.unshift(File.dirname(__FILE__) + '/vendor')