Module: GitTracker::Runner
- Defined in:
- lib/git_tracker/runner.rb
Class Method Summary collapse
- .execute(cmd_arg = 'help', *args) ⇒ Object
- .help ⇒ Object
- .init ⇒ Object
- .install ⇒ Object
- .prepare_commit_msg(*args) ⇒ Object
Class Method Details
.execute(cmd_arg = 'help', *args) ⇒ Object
8 9 10 11 12 |
# File 'lib/git_tracker/runner.rb', line 8 def self.execute(cmd_arg = 'help', *args) command = cmd_arg.gsub(/-/, '_') abort("[git_tracker] command: '#{cmd_arg}' does not exist.") unless respond_to?(command) send(command, *args) end |
.help ⇒ Object
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/git_tracker/runner.rb', line 27 def self.help puts "git-tracker \#{VERSION} is installed.\n\nRemember, git-tracker is a hook which Git interacts with during its normal\nlifecycle of committing, rebasing, merging, etc. You need to initialize this\nhook by running `git-tracker init` from each repository in which you wish to\nuse it. Cheers!\n HELP\nend\n" |
.init ⇒ Object
18 19 20 |
# File 'lib/git_tracker/runner.rb', line 18 def self.init Hook.init end |
.install ⇒ Object
22 23 24 25 |
# File 'lib/git_tracker/runner.rb', line 22 def self.install puts '`git-tracker install` is deprecated. Please use `git-tracker init`' self.init end |
.prepare_commit_msg(*args) ⇒ Object
14 15 16 |
# File 'lib/git_tracker/runner.rb', line 14 def self.prepare_commit_msg(*args) PrepareCommitMessage.run(*args) end |