lib/pg_dumper.rb in pg_dumper-0.1.6 vs lib/pg_dumper.rb in pg_dumper-0.1.7

- old
+ new

@@ -27,11 +27,11 @@ execute command, options end def command - Escape.shell_command([binary, *args, database]).to_s + Escape.shell_command([binary, args, database].flatten).to_s end def schema_only! add_args "-s" end @@ -86,10 +86,16 @@ def output? !!@output end def output - File.path(@output) + if File.respond_to?(:path) + File.path(@output) + elsif @output.respond_to?(:to_path) + @output.to_path + else + @output + end end def tempfile @tempfile ||= new_tempfile end