lib/kumogata/client.rb in kumogata-0.2.4 vs lib/kumogata/client.rb in kumogata-0.2.5
- old
+ new
@@ -147,10 +147,12 @@
Dslh.deval(template, :key_conv => key_conv, :value_conv => value_conv, :exclude_key => exclude_key)
end
def define_template_func(scope, path_or_url)
scope.instance_eval(<<-EOS)
- def require(path)
+ def require(file)
+ path = file.dup
+
unless path =~ %r|\\A/| or path =~ %r|\\A\\w+://|
path = File.expand_path(File.join(File.dirname(#{path_or_url.inspect}), path))
end
begin