Module: GitHooks

Defined in:
lib/git_hooks.rb,
lib/git_hooks/utils.rb,
lib/git_hooks/logger.rb,
lib/git_hooks/git_adapter.rb,
lib/git_hooks/utils/config.rb,
lib/git_hooks/post_receive_hook.rb,
lib/git_hooks/notifier/jabber_client.rb,
lib/git_hooks/notifier/tracker_client.rb

Defined Under Namespace

Modules: Notifier, Utils Classes: GitAdapter, Logger, PostReceiveHook

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.config_fileObject



20
21
22
# File 'lib/git_hooks.rb', line 20

def config_file
  @config_file || "~/.git_hooks_config"
end

Class Method Details

.configObject



16
17
18
# File 'lib/git_hooks.rb', line 16

def config
  @config_instance ||= Utils::Config.new(config_file)
end

.run_hook(name_of_hook, *args) ⇒ Object



24
25
26
27
# File 'lib/git_hooks.rb', line 24

def run_hook(name_of_hook, *args)
  hook = "GitHooks::#{name_of_hook.to_s.camelize}Hook".constantize.new
  hook.run(*args)
end