Class: BuildTool::Commands::Modules::Status
- Inherits:
-
BuildTool::Commands::ModuleBasedCommand
- Object
- Base
- Standard
- BuildTool::Commands::ModuleBasedCommand
- BuildTool::Commands::Modules::Status
- Defined in:
- lib/build-tool/commands/modules/status.rb
Overview
BuildCommand
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from BuildTool::Commands::ModuleBasedCommand
#clean, #clone, #configure, #do_execute, #fetch, #initialize, #install, #is_module_ready?, #make, #prepare_module, #rebase, #reconfigure, #remove_build_directory, #remove_source_directory, #summarize
Methods inherited from Standard
#complete_module, #complete_modules, #initialize, #log_directory, #while_logging_to
Methods inherited from Base
#<=>, #applicable?, #cleanup_after_vcs_access, #complete_arguments, #complete_readline, #configuration, #debug, #debug2, #do_complete, #do_execute, #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::ModuleBasedCommand
Instance Method Details
#do_execute_module(mod) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/build-tool/commands/modules/status.rb', line 16 def do_execute_module( mod ) info( "Active: #{mod.active?}" ) info( "Status: #{mod.state}" ) dirty = mod.dirty? if dirty quiet( "Modified: #{dirty}" ) else info( "Modified: #{dirty}" ) end info( "VCS: #{mod.vcs_configuration ? mod.vcs_configuration.name : 'not configured' }" ) if mod.vcs_configuration c = mod.vcs.remote_changes() if c.nil? verbose( "Remote Changes: Not supported." ) elsif c.empty? verbose( "Remote Changes: None" ) else quiet( "Remote Changes" ) c.each do |line| quiet( " " + line ) end end if not @local_only c = mod.vcs.local_changes() if c.nil? verbose( "Local Changes: Not supported." ) elsif c.empty? verbose( "Local Changes: None" ) else quiet( "Local Changes:" ) c.each do |line| quiet( " " + line ) end end end end # if mod.vcs_configuration return 0 end |
#initialize_options ⇒ Object
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/build-tool/commands/modules/status.rb', line 63 def . = "Usage: #{self.fullname} [OPTIONS]... MODULES..." .separator( "" ) .separator( "Options" ) @all = false .on( "--all", "Include inactive modules." ) { @all = true } @local_only = false .on( "--local-only", "Only show local unpushed changes." ) { @local_only = true } super end |