bin/review in review-5.0.0 vs bin/review in review-5.1.0
- old
+ new
@@ -11,13 +11,11 @@
# This program is free software.
# You can distribute or modify this program under the terms of
# the GNU LGPL, Lesser General Public License version 2.1.
# For details of the GNU LGPL, see the file "COPYING".
-require 'pathname'
-bindir = Pathname.new(__FILE__).realpath.dirname
-$LOAD_PATH.unshift((bindir + '../lib').realpath)
+$LOAD_PATH.unshift(File.realpath('../lib', __dir__))
require 'review'
def usage
message = <<-EOB
@@ -50,10 +48,10 @@
puts ReVIEW::VERSION
exit
end
command = "review-#{ARGV.shift}"
-bindir = Pathname.new(__FILE__).realpath.dirname
+bindir = File.realpath(__dir__)
command_path = File.join(bindir, command)
unless File.exist?(command_path)
print "cannot find command: #{command}\n\n"
usage