bin/inch in inch-0.1.4 vs bin/inch in inch-0.2.0

- old
+ new

@@ -4,14 +4,19 @@ Signal.trap("INT") do warn " cancelled by user (INT)" exit 1 end -path = __FILE__ -while File.symlink?(path) - path = File.expand_path(File.readlink(path), File.dirname(path)) +# @return [String] the path to the 'lib' directory of Inch +def find_lib_path + path = __FILE__ + while File.symlink?(path) + path = File.expand_path(File.readlink(path), File.dirname(path)) + end + File.join(File.dirname(File.expand_path(path)), '..', 'lib') end -$:.unshift(File.join(File.dirname(File.expand_path(path)), '..', 'lib')) + +$LOAD_PATH.unshift(find_lib_path) require 'inch' Inch::CLI::CommandParser.run(*ARGV)