lib/snapa.rb in snapa-0.0.5 vs lib/snapa.rb in snapa-0.0.7
- old
+ new
@@ -1,8 +1,8 @@
require 'snapa/version'
require 'rack/file'
-require 'digest'
+require 'digest/md5'
module Snapa
class File < Rack::File
def cmd
@@ -20,10 +20,10 @@
def build(request)
system [cmd, script, "'#{url(request)}'", "'#{@path}'"].join(' ')
end
def path(request)
- @path ||= F.join('/tmp/snapa', ::Digest.hexencode(request.query_string) + '.png')
+ @path ||= F.join('/tmp/snapa', ::Digest::MD5.hexdigest(request.query_string) + '.png')
end
def _call(env)
request = ::Rack::Request.new(env)