Sha256: 722f0708c12efba83aa730d116a5aaf813798dcd11a3b14a04ea6461d08b31b5

Contents?: true

Size: 343 Bytes

Versions: 6

Compression:

Stored size: 343 Bytes

Contents

require "tempfile"

module MiniMagick
  class ImageTempFile < Tempfile
    def make_tmpname(basename, n)
      # force tempfile to use basename's extension if provided
      ext = File.extname(basename)
    
      # force hyphens instead of periods in name
      sprintf('%s%d-%d%s', File.basename(basename, ext), $$, n, ext)
    end
  end
end

Version data entries

6 entries across 6 versions & 3 rubygems

Version Path
GUI-mini_magick-1.2.3 lib/image_temp_file.rb
bmo-mini_magick-1.2.5 lib/image_temp_file.rb
bmo-mini_magick-1.2.6 lib/image_temp_file.rb
mini_magick-1.2.2 lib/image_temp_file.rb
mini_magick-1.2.1 lib/image_temp_file.rb
mini_magick-1.2.3 lib/image_temp_file.rb