bin/ldp in ldp-1.0.0 vs bin/ldp in ldp-1.0.1

- old
+ new

@@ -15,28 +15,26 @@ rescue Ldp::NotFound exit 1 end do_help = lambda do |x| - x.command 'help' do run do |opts, args| puts opts.help end end - end Slop.parse do banner "Usage: ldp [command] --host [HOST] [options]" on '-v', 'Print the version' do puts "ldp #{Ldp::VERSION}" end on :host=, "Host" - + do_help.call(self) command 'get' do banner "Usage: ldp get --host [HOST] [PATH]" @@ -90,11 +88,11 @@ banner "Usage: ldp replace --host [HOST] [PATH] [SOURCE]" on :host=, "Host" do_help.call(self) - run do |opts, (path,file)| + run do |opts, (path, file)| with_error_handling do host = opts[:host] || ENV['LDP_HOST'] if file.nil? Ldp::Client.new(url: host).put path elsif file == "-" @@ -110,10 +108,10 @@ banner "Usage: ldp patch --host [HOST] [PATH] [SOURCE]" on :host=, "Host" do_help.call(self) - run do |opts, (path,file)| + run do |opts, (path, file)| with_error_handling do host = opts[:host] || ENV['LDP_HOST'] if file.nil? Ldp::Client.new(url: host).patch path elsif file == "-"