From 4b30306691c2c4c623871aa663a0e8083b4b11fc Mon Sep 17 00:00:00 2001 From: elijah Date: Sat, 23 Feb 2013 20:51:41 -0800 Subject: added `rake doc` command. --- lib/leap_cli/app.rb | 57 ----------------------------------------------------- 1 file changed, 57 deletions(-) delete mode 100644 lib/leap_cli/app.rb (limited to 'lib/leap_cli/app.rb') diff --git a/lib/leap_cli/app.rb b/lib/leap_cli/app.rb deleted file mode 100644 index 90c4ae9..0000000 --- a/lib/leap_cli/app.rb +++ /dev/null @@ -1,57 +0,0 @@ -require 'gli' -require 'highline' -require 'forwardable' -require 'lib_ext/gli' # our custom extensions to gli - -# -# Typically, GLI and Highline methods are loaded into the global namespace. -# Instead, here we load these into the module LeapCli::Commands in order to -# ensure that the cli logic and code is kept isolated to leap_cli/commands/*.rb -# -# no cheating! -# -module LeapCli::Commands - extend GLI::App - extend Forwardable - - # - # delegate highline methods to make them available to sub-commands - # - @terminal = HighLine.new - def_delegator :@terminal, :ask, 'self.ask' - def_delegator :@terminal, :agree, 'self.agree' - def_delegator :@terminal, :choose, 'self.choose' - def_delegator :@terminal, :say, 'self.say' - def_delegator :@terminal, :color, 'self.color' - def_delegator :@terminal, :list, 'self.list' - - # - # make config manager available as 'manager' - # - def self.manager - @manager ||= begin - manager = LeapCli::Config::Manager.new - manager.load - manager - end - end - - # - # info about leap command line suite - # - program_desc LeapCli::SUMMARY - program_long_desc LeapCli::DESCRIPTION - - # - # handle --version ourselves - # - if ARGV.grep(/--version/).any? - puts "leap #{LeapCli::VERSION}, ruby #{RUBY_VERSION}" - exit(0) - end - - # - # load commands and run - # - commands_from('leap_cli/commands') -end -- cgit v1.2.3