Class: BuildTool::Commands::Ctags
- Inherits:
-
ModuleBasedCommand
- Object
- Base
- Standard
- ModuleBasedCommand
- BuildTool::Commands::Ctags
- Includes:
- MJ::Tools::SubProcess
- Defined in:
- lib/build-tool/commands/ctags.rb
Overview
BuildCommand
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #applicable? ⇒ Boolean
- #ctags(source, tagsfile) ⇒ Object
- #do_execute_module(mod) ⇒ Object
- #initialize_options ⇒ Object
Methods inherited from 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
#<=>, #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
#applicable? ⇒ Boolean
28 29 30 |
# File 'lib/build-tool/commands/ctags.rb', line 28 def applicable? BuildTool::Application.instance.has_recipe? end |
#ctags(source, tagsfile) ⇒ Object
46 47 48 49 50 51 52 |
# File 'lib/build-tool/commands/ctags.rb', line 46 def ( source, ) rc = self.class.execute "ctags -R -f #{tagsfile} #{source}" if rc != 0 raise , "ctags failed with error #{rc}!" end rc end |
#do_execute_module(mod) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/build-tool/commands/ctags.rb', line 32 def do_execute_module( mod ) if mod.checkedout? FileUtils.mkdir_p mod.build_prefix_required.join("tags").to_s (mod.source_directory, mod.build_prefix_required.join( "tags", mod.name.gsub( '/', '-' ) + ".tags" )) else warn( "Module is not checked out! Use -u to check it out." ) warn( "skipped!" ) end end |
#initialize_options ⇒ Object
21 22 23 24 25 26 |
# File 'lib/build-tool/commands/ctags.rb', line 21 def . = "Usage: #{self.fullname} [OPTIONS]... MODULES..." .separator( "" ) .separator( "Options" ) super end |