lib/kanoko.rb in kanoko-0.0.2 vs lib/kanoko.rb in kanoko-0.0.3
- old
+ new
@@ -5,10 +5,15 @@
# example:
# Kanoko.configure.kanoko_host = "http://example.com"
# p Kanoko.configure #=> #<Kanoko::Configure ...>
def configure
@configure ||= Configure.new
+ if block_given?
+ yield @configure
+ else
+ @configure
+ end
end
module_function :configure
def configure=(value)
@configure = value
@@ -29,9 +34,9 @@
private
def make_path(func, args, src)
hash = make_hash(func, args, src)
- "/#{hash}/#{[func, args, src].map{|i| URI.encode_www_form_component(i)}.join('/')}"
+ "/#{hash}/#{[func, args].map{|i| URI.encode_www_form_component(i)}.join('/')}/#{src}"
end
module_function :make_path
end