lib/shrine/plugins/content_addressable.rb in shrine-content_addressable-0.3.1 vs lib/shrine/plugins/content_addressable.rb in shrine-content_addressable-0.4.0
- old
+ new
@@ -4,10 +4,12 @@
require 'shrine/plugins/signature'
require 'multihashes'
require 'digest'
+require 'shrine/plugins/content_addressable/file_methods'
+
class Shrine
module Plugins
##
# plugin :signature
# plugin :content_addressable
@@ -73,10 +75,12 @@
.unpack('H*')
.first
end
def generate_location(io, _)
- [opts[:content_addressable_prefix], content_addressable_hex(io)].compact.join('/')
+ [opts[:content_addressable_prefix], content_addressable_hex(io)]
+ .compact
+ .join('/')
end
end
end
register_plugin(:content_addressable, ContentAddressable)