lib/tori.rb in tori-0.0.2 vs lib/tori.rb in tori-0.0.3
- old
+ new
@@ -1,11 +1,12 @@
require 'tori/backend/filesystem'
require 'tori/config'
require 'tori/define'
+require 'tori/file'
require 'tori/version'
require 'pathname'
-require 'digest/md5'
+require 'digest/sha1'
require "fileutils"
module Tori
class << self
def config
@@ -19,10 +20,10 @@
# Filename hashing method
# It's call when decide filename hash.
# `filename_callback` must be have `call` method.
config.filename_callback = ->(model) do
- Digest::MD5.hexdigest "#{model.class.name}/#{model.id}"
+ Digest::SHA1.hexdigest "#{model.class.name}/#{model.id}"
end
end
end
end
end