Class: BuildTool::Commands::Modules::Info
- Inherits:
-
BuildTool::Commands::ModuleBasedCommand
- Object
- Base
- Standard
- BuildTool::Commands::ModuleBasedCommand
- BuildTool::Commands::Modules::Info
- Defined in:
- lib/build-tool/commands/modules/info.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
15 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 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/build-tool/commands/modules/info.rb', line 15 def do_execute_module( mod ) if mod.description info( mod.description ) info( "" ) else info( "No description specified to the module" ) info( "" ) end if mod.long_description info( mod.long_description ) info( "" ) end info( "Active: #{mod.active?}" ) info( "Status: #{mod.state}" ) # if mod.repository # info( "Repository: #{mod.repository.url}/#{mod.remote_path}" ) # if mod.repository.sshkey # info( " SSH Key: '#{mod.repository.sshkey.name}' (#{mod.repository.sshkey.file})" ) # end # info( "Apply Patches: #{mod.patches.join(", ")}" ) # else # info( "Repository: not configured" ) # end if mod.build_prefix info( "Local Checkout: #{mod.vcs.local_path} #{mod.checkedout? ? '(EXISTS)' : '(TODO)' }" ) info( "Build Directory #{mod.build_directory} #{mod.configured? ? '(CONFIGURED)' : '(TODO)' }" ) else info( "Local Checkout: build-prefix not configured" ) end info( "Prefix: #{mod.install_prefix.to_s}" ) if mod.environment info( "Environment: %s (%s)" % [ mod.environment.name, mod.environment.active? ? 'A' : 'I' ] ) mod.environment.vars.sort.each do |var| info( " %-20s %s" % [ var + ":", mod.environment[var] ] ) end else info( "Environment: Not configured" ) end info( "VCS: #{mod.vcs_configuration ? mod.vcs_configuration.name : 'not configured' }" ) if mod.vcs_configuration case mod.vcs_configuration.name when 'svn' info( " Repository: %s/%s" % [ mod.vcs_configuration.repository.url, mod.vcs_configuration.remote_path ] ) if mod.vcs_configuration.repository and mod.vcs_configuration.repository.sshkey info( " SSH Key: '#{mod.vcs_configuration.repository.sshkey.name}' (#{mod.vcs_configuration.repository.sshkey.file})" ) end when 'bazar' info( " Branch: %s" % [ mod.vcs_configuration.url ] ) when 'mercurial' info( " URL: %s" % [ mod.vcs_configuration.url ] ) info( " Track: %s" % [ mod.vcs_configuration.track ] ) when 'archive' info( " URL: %s" % [ mod.vcs.archive_url ] ) when 'git' mod.vcs_configuration.merged_remote.each do |key, val| if val.push_url info( " Remote: %s -> %s (push to %s)" % [ key, val.url, val.push_url ] ) else info( " Remote: %s -> %s" % [ key, val.url ] ) end end info( " Track branch: #{mod.vcs_configuration.track_remote}/#{mod.vcs_configuration.track_branch}" ) when 'git-svn' info( " Repository: %s/%s" % [ mod.vcs_configuration.repository.url, mod.vcs_configuration.remote_path ] ) mod.vcs_configuration.merged_remote.each do |key, val| info( " Remote: %s -> %s" % [ key, val.url ] ) end mod.vcs_configuration.merged_externals.each do |key, val| info( " External: #{key} -> #{val}" ) end else warn( "Unknown vcs #{mod.vcs_configuration.name}" ) end end # if mod.vcs_configuration bs = mod.build_system if bs info( "Build System: #{bs.name}" ) info( " Out Of Source Build #{bs.out_of_source}" ) bs.option_names.sort.each do |var| info( " %-28s %s" % [ var + ":", bs[var] ] ) end else info( "Build System: Not configured" ) end return 0 end |
#initialize_options ⇒ Object
118 119 120 121 122 123 124 125 126 127 |
# File 'lib/build-tool/commands/modules/info.rb', line 118 def . = "Usage: #{self.fullname} [OPTIONS]... MODULES..." .separator( "" ) .separator( "Options" ) .on( "--all", "Include inactive modules." ) { @all = true } super end |