bin/earthquake in earthquake-0.8.5 vs bin/earthquake in earthquake-0.9.0
- old
+ new
@@ -5,11 +5,10 @@
slop = Slop.new(:strict => true, :help => true)
slop.banner "Usage: earthquake [options] [directory]"
slop.on :d, :debug, 'Enable debug mode'
slop.on :n, :'no-logo', 'No Logo'
slop.on :c, :command, "Invoke a command and exit", true
-slop.on :l, :lolize, 'enable lolize (see: https://github.com/miaout17/lolize)'
begin
slop.parse!(argv)
rescue => e
puts e
exit!
@@ -17,28 +16,25 @@
options = slop.to_hash
options.delete(:help)
options[:dir] = argv.shift unless argv.empty?
require 'pathname'
-eq_dir = Pathname.new(__FILE__).realpath.parent.parent
+$:.unshift Pathname.new(__FILE__).realpath.join('../../lib') if $0 == __FILE__
+require "earthquake/version"
-$:.unshift eq_dir.join('lib') if $0 == __FILE__
-
command = options.delete(:command)
no_logo = options.delete(:'no-logo')
-require 'lolize/auto' if options[:lolize]
-
if !no_logo && !command
print "\e[31m"
puts %q{
_ _ _
___ __ _ _ __| |_| |__ __ _ _ _ __ _| | _____
/ _ \/ _` | '__| __| '_ \ / _` | | | |/ _` | |/ / _ \
| __/ (_| | | | |_| | | | (_| | |_| | (_| | < __/
\___|\__,_|_| \__|_| |_|\__, |\__,_|\__,_|_|\_\___|
|_| }.
- gsub(/^\n/, '') + "v#{eq_dir.join('VERSION').read}".rjust(10) + "\n\n"
+ gsub(/^\n/, '') + "v#{Earthquake::VERSION}".rjust(10) + "\n\n"
print "\e[0m"
end
require 'earthquake'
if command