lib/kanoko.rb in kanoko-0.0.4 vs lib/kanoko.rb in kanoko-0.1.0
- old
+ new
@@ -1,7 +1,9 @@
require 'uri'
require 'kanoko/configure'
+require 'kanoko/errors'
+require 'kanoko/version'
module Kanoko
# example:
# Kanoko.configure.digest_func = "sha1"
# p Kanoko.configure #=> #<Kanoko::Configure ...>
@@ -17,12 +19,12 @@
def configure=(value)
@configure = value
end
- def path_for(func, args, src)
- hash = make_hash(func, args, src)
- "/#{hash}/#{[func, args].map{|i| URI.encode_www_form_component(i)}.join('/')}/#{src}"
+ def path_for(*function, src)
+ hash = make_hash(*function, src)
+ "/#{hash}/#{function.map{ |i| URI.encode_www_form_component(i) }.join('/')}/#{src}"
end
module_function :path_for
def make_hash(*args)
configure.hash_proc.call(*args)