Class: BuildTool::Commands::Info
- Defined in:
- lib/build-tool/commands/info.rb
Overview
BuildCommand
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Standard
#complete_module, #complete_modules, #initialize, #log_directory, #while_logging_to
Methods inherited from Base
#<=>, #cleanup_after_vcs_access, #complete_arguments, #complete_readline, #configuration, #debug, #debug2, #do_complete, #each_option, #error, #execute, #fullname, #info, #initialize, #log?, #quiet, #setup_command, #setup_options, #show_help, #skip_command, #summarize, #teardown_command, #trace, #usage, #verbose, #warn
Methods included from HelpText
#cmdalias, #description, included, #long_description, #name
Constructor Details
This class inherits a constructor from BuildTool::Commands::Standard
Instance Method Details
#applicable? ⇒ Boolean
23 24 25 |
# File 'lib/build-tool/commands/info.rb', line 23 def applicable? BuildTool::Application.instance.has_recipe? end |
#do_execute(args) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/build-tool/commands/info.rb', line 27 def do_execute( args ) if args.length != 0 # *TODO* print better message warn( "Arguments ignored." ) end recipe = configuration.recipe info( "Recipe" ) info( "------" ) info( "Name: #{recipe.name}" ) info( "Short: #{recipe.short_description}" ) info( "Long: #{recipe.long_description}" ) info( "Full Path: #{recipe.global_config_file_path('recipe')}" ) info( "" ) info( "Configuration" ) info( "-------------" ) info( "Overrides: #{ recipe.local_config_file_path( 'recipe' ) }" ) return 0 end |
#initialize_options ⇒ Object
16 17 18 19 20 21 |
# File 'lib/build-tool/commands/info.rb', line 16 def . = "Usage: #{self.fullname} [OPTIONS]..." .separator( "" ) .separator( "Options" ) super end |