bin/oddb2xml in oddb2xml-2.7.1 vs bin/oddb2xml in oddb2xml-2.7.2

- old
+ new

@@ -1,43 +1,44 @@ #!/usr/bin/env ruby -require 'pathname' +require "pathname" root = Pathname.new(__FILE__).realpath.parent.parent -$:.unshift root.join('lib') if $0 == __FILE__ +$:.unshift root.join("lib") if $0 == __FILE__ -require 'mechanize' -require 'oddb2xml' -require 'oddb2xml/options' +require "mechanize" +require "oddb2xml" +require "oddb2xml/options" $stdout.sync = true opts = Oddb2xml::Options.parse(ARGV) args = ARGV if args.size > 0 puts "Please remove unused parameters #{args}" exit 2 end # TEMP -if path = args.first +if (path = args.first) opts[:transfer_dat] = path end -startTime = Time.now +start_time = Time.now ui = Oddb2xml::Cli.new(opts) begin if opts[:format] == :xml opts[:ean14] = true # force end - #puts opts if opts[:debug] + # puts opts if opts[:debug] if RUBY_VERSION.to_f < 1.9 - message = <<-MES -Once you find some time, please upgrade your Ruby to 1.9.3 ;) -then you will not see anymore warnings + message = <<~MES + Once you find some time, please upgrade your Ruby to 1.9.3 ;) + then you will not see anymore warnings MES warn message end ui.run rescue Interrupt exit end -diff = (Time.now-startTime).to_i -puts "#{Time.now}: #{__LINE__} done. Took #{diff} seconds"; $stdout.sync +diff = (Time.now - start_time).to_i +puts "#{Time.now}: #{__LINE__} done. Took #{diff} seconds" +$stdout.sync