Sha256: d01c60d2824100077014a384367b2b49039236617fe6436682cdadbd7f1ae44c

Contents?: true

Size: 566 Bytes

Versions: 7

Compression:

Stored size: 566 Bytes

Contents

require 'tempfile'

Tempfile.class_eval do
  # overwrite so tempfiles use the extension of the basename.  important for rmagick and image science
  def make_tmpname(basename, n)
    ext = nil
    sprintf("%s%d-%d%s", basename.to_s.gsub(/\.\w+$/) { |s| ext = s; '' }, $$, n, ext)
  end
end

require 'geometry'
ActiveRecord::Base.send(:extend, Technoweenie::AttachmentFu::ActMethods)
Technoweenie::AttachmentFu.tempfile_path = ATTACHMENT_FU_TEMPFILE_PATH if Object.const_defined?(:ATTACHMENT_FU_TEMPFILE_PATH)
FileUtils.mkdir_p Technoweenie::AttachmentFu.tempfile_path

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
railscart-0.0.4 starter_app/vendor/plugins/attachment_fu/init.rb
spree-0.0.5 starter-app/vendor/plugins/attachment_fu/init.rb
spree-0.0.6 starter-app/vendor/plugins/attachment_fu/init.rb
spree-0.0.9 vendor/plugins/attachment_fu/init.rb
spree-0.0.7 starter-app/vendor/plugins/attachment_fu/init.rb
spree-0.0.8 starter-app/vendor/plugins/attachment_fu/init.rb
spree-0.2.0 vendor/plugins/attachment_fu/init.rb