bin/tap in tap-0.10.1 vs bin/tap in tap-0.11.0

- old
+ new

@@ -1,26 +1,26 @@ -#!/usr/local/bin/ruby +#!/usr/bin/env ruby # usage: tap <command> {options} [args] # # examples: # tap generate root . # generates a root dir # tap run taskname --option input # runs the 'taskname' task # # help: -# tap help # prints this help +# tap --help # prints this help # tap command --help # prints help for 'command' # require "#{File.dirname(__FILE__)}/../lib/tap.rb" -require 'tap/exe' # setup the environment begin + # handle super options $DEBUG = true if ARGV.delete('-d-') env = Tap::Exe.instantiate - + rescue(Tap::Env::ConfigError) # catch errors and exit gracefully # (errors usu from gem loading errors) puts $!.message exit(1) @@ -56,14 +56,11 @@ # run tap # begin env.activate - env.run do - # give some help - require 'tap/support/command_line' - - puts Tap::Support::CommandLine.usage(__FILE__) + env.execute(ARGV) do + puts Tap::Support::Lazydoc.usage(__FILE__) puts puts "available commands:" puts env.summarize(:commands) puts puts "version #{Tap::VERSION} -- #{Tap::WEBSITE}" \ No newline at end of file