crafterm / attachment_fu forked from technoweenie/attachment_fu
- Source
- Commits
- Network (182)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Tree:
834553a
attachment_fu / init.rb
| c3b5889f » | technoweenie | 2006-12-22 | 1 | require 'tempfile' | |
| 2 | |||||
| 43d1298a » | technoweenie | 2006-12-23 | 3 | Tempfile.class_eval do | |
| d89bfe43 » | technoweenie | 2006-12-23 | 4 | # overwrite so tempfiles use the extension of the basename. important for rmagick and image science | |
| c3b5889f » | technoweenie | 2006-12-22 | 5 | def make_tmpname(basename, n) | |
| 43d1298a » | technoweenie | 2006-12-23 | 6 | ext = nil | |
| 4b762988 » | technoweenie | 2007-01-11 | 7 | sprintf("%s%d-%d%s", basename.to_s.gsub(/\.\w+$/) { |s| ext = s; '' }, $$, n, ext) | |
| c3b5889f » | technoweenie | 2006-12-22 | 8 | end | |
| 9 | end | ||||
| 10 | |||||
| d35205c9 » | technoweenie | 2007-01-09 | 11 | require 'geometry' | |
| 96c98afd » | technoweenie | 2006-12-29 | 12 | ActiveRecord::Base.send(:extend, Technoweenie::AttachmentFu::ActMethods) | |
| 8e8f0779 » | technoweenie | 2006-12-29 | 13 | Technoweenie::AttachmentFu.tempfile_path = ATTACHMENT_FU_TEMPFILE_PATH if Object.const_defined?(:ATTACHMENT_FU_TEMPFILE_PATH) | |
| d9718591 » | crafterm | 2008-02-21 | 14 | FileUtils.mkdir_p Technoweenie::AttachmentFu.tempfile_path | |
| 15 | |||||
| 16 | $:.unshift(File.dirname(__FILE__) + '/vendor') | ||||
