Class: BuildTool::Commands::Rebase
- Inherits:
-
ModuleBasedCommand
- Object
- Base
- Standard
- ModuleBasedCommand
- BuildTool::Commands::Rebase
- Includes:
- MJ::Tools::SubProcess
- Defined in:
- lib/build-tool/commands/rebase.rb
Overview
BuildCommand
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #applicable? ⇒ Boolean
- #do_execute_module(mod) ⇒ Object
- #initialize_options ⇒ Object
- #is_module_ready?(mod) ⇒ Boolean
-
#log? ⇒ Boolean
Log this command if $noop is not active.
Methods inherited from ModuleBasedCommand
#clean, #clone, #configure, #do_execute, #fetch, #initialize, #install, #make, #prepare_module, #rebase, #reconfigure, #remove_build_directory, #summarize
Methods inherited from Standard
#complete_module, #complete_modules, #initialize, #log_directory, #while_logging_to
Methods inherited from Base
#<=>, #cleanup_after_vcs_access, #complete, #complete_arguments, #complete_readline_1_8, #complete_readline_1_9, #configuration, #do_complete_1_8, #do_complete_1_9, #do_execute, #each_option, #execute, #fullname, #initialize, #say, #setup_command, #show_help, #skip_command, #summarize, #teardown_command, #usage
Methods included from HelpText
#cmdalias, #description, included, #long_description, #name
Constructor Details
This class inherits a constructor from BuildTool::Commands::ModuleBasedCommand
Instance Method Details
#applicable? ⇒ Boolean
23 24 25 |
# File 'lib/build-tool/commands/rebase.rb', line 23 def applicable? BuildTool::Application.instance.has_recipe? end |
#do_execute_module(mod) ⇒ Object
46 47 48 49 50 51 52 53 |
# File 'lib/build-tool/commands/rebase.rb', line 46 def do_execute_module( mod ) if mod.checkedout? and mod.vcs.fetching_supported? logger.info "Skipping: Rebasing not support by #{vcs.name}" rebase( mod ) else logger.info "Skipping: Not checked out." end end |
#initialize_options ⇒ Object
27 28 29 30 |
# File 'lib/build-tool/commands/rebase.rb', line 27 def @options. = "Usage: #{Pathname.new($0).basename} #{self.fullname} MODULES..." super end |
#is_module_ready?(mod) ⇒ Boolean
32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/build-tool/commands/rebase.rb', line 32 def is_module_ready?( mod ) isready = true if !mod.checkedout? logger.info "#{mod.name}: Skipping: Not checked out." else isready &= mod.ready_for_rebase if !mod.vcs.fetching_supported? logger.info "#{mod.name}: Skipping: Rebasing not support by #{vcs.name}" end end return isready end |
#log? ⇒ Boolean
Log this command if $noop is not active
19 20 21 |
# File 'lib/build-tool/commands/rebase.rb', line 19 def log? ! $noop end |