lib/capistrano/template/helpers/dsl.rb in capistrano-template-0.0.2 vs lib/capistrano/template/helpers/dsl.rb in capistrano-template-0.0.3
- old
+ new
@@ -45,16 +45,24 @@
if includes_filename
filename = File.basename(path)
path = File.dirname(path)
end
- remote_path = capture("(cd #{path} && pwd -P) || readlink -sf #{path}").chomp
+ remote_path = capture("/bin/bash -c '(cd #{path} && pwd -P) || readlink -sf #{path}'").chomp
includes_filename ? File.join(remote_path, filename) : remote_path
end
def _template_factory
->(from, context, digester) {TemplateDigester.new(Renderer.new(from, context), digester) }
+ end
+
+ def method_missing(method_name, *args)
+ if self.class.respond_to? method_name
+ self.class.send(method_name, *args)
+ else
+ super
+ end
end
end
end
end
end