Class: VCLog::CLI::Autotag

Inherits:
Abstract show all
Defined in:
lib/vclog/cli/autotag.rb

Instance Attribute Summary

Attributes inherited from Abstract

#arguments

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Abstract

inherited, #initialize, #options, #repo, run, #run

Constructor Details

This class inherits a constructor from VCLog::CLI::Abstract

Class Method Details

.termsObject



9
10
11
# File 'lib/vclog/cli/autotag.rb', line 9

def self.terms
  ['autotag']
end

Instance Method Details

#executeObject



30
31
32
# File 'lib/vclog/cli/autotag.rb', line 30

def execute
  repo.autotag(options[:prefix])
end

#parserObject



14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/vclog/cli/autotag.rb', line 14

def parser
  super do |opt|
    opt.banner = "Usage: vclog autotag"
    opt.separator(" ")
    opt.separator("DESCRIPTION:")
    opt.separator("  Ensure each entry in History has been tagged.")
    opt.separator(" ")
    opt.separator("SPECIAL OPTIONS:")
    opt.on('--prefix', '-p', 'tag label prefix'){ options[:prefix] = true }
    opt.on('--file'  , '-f FILE', 'specify history file'){ options[:history_file] = file }
    opt.on('--force' , '-y', 'perform tagging without confirmation'){ options[:force] = true }
    opt.on('--dryrun', '-n', 'run in dryrun mode'){ $DRYRUN = true }
  end
end