Sha256: 94c8247233dfbeadc4a29266a4921296ab4693f42bfe76e751ca18fd5f2a35a6
Contents?: true
Size: 624 Bytes
Versions: 3
Compression:
Stored size: 624 Bytes
Contents
require 'tempfile' require 'digest/sha1' require 'rails' require 'active_record' require File.join(File.dirname(__FILE__), 'binary_storage/active_record_extensions') require File.join(File.dirname(__FILE__), 'binary_storage/blob') module BinaryStorage class << self def storage_dir @@storage_dir ||= Rails.root.join('db/binary_storage', Rails.env) end def storage_dir=(new_storage_dir) @@storage_dir = new_storage_dir end def hexdigest_file(path) Digest::SHA1.file(path).hexdigest end def hexdigest(string) Digest::SHA1.hexdigest(string) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
dynamic_image-0.9.8 | lib/binary_storage.rb |
dynamic_image-0.9.7 | lib/binary_storage.rb |
dynamic_image-0.9.6 | lib/binary_storage.rb |