Skip to content

Commit

Permalink
Remove Tempfile name hack
Browse files Browse the repository at this point in the history
ImageMagick does not rely on extensions so there's no need to hack Ruby's
crappy tempfile lib
  • Loading branch information
akdubya committed Nov 30, 2010
1 parent f8e2681 commit c38c389
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions lib/rack/thumb.rb
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
require 'rack'
require 'mapel'
require 'digest/sha1'

require 'tempfile'

Tempfile.class_eval do
def make_tmpname(basename, n)
ext = nil
sprintf("%s%d-%d%s", basename.to_s.gsub(/\.\w+$/) { |s| ext = s; '' }, $$ || 0, n || 0, ext)
end
end

module Rack

# The Rack::Thumb middleware intercepts requests for images that have urls of
Expand Down

0 comments on commit c38c389

Please sign in to comment.