Class: Github::Hooker::CLI
- Inherits:
-
Thor
- Object
- Thor
- Github::Hooker::CLI
- Defined in:
- lib/github-hooker/cli.rb
Instance Method Summary collapse
- #campfire(repo, events) ⇒ Object
- #delete(repo, hook) ⇒ Object
- #list(repo) ⇒ Object
- #web(repo, events) ⇒ Object
Instance Method Details
#campfire(repo, events) ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/github-hooker/cli.rb', line 22 def campfire(repo, events) handle_404 do check_config! events = split_events(events) Github::Hooker.add_hook(repo, :name => "campfire", :events => events, :config => ) end end |
#delete(repo, hook) ⇒ Object
41 42 43 44 45 46 |
# File 'lib/github-hooker/cli.rb', line 41 def delete(repo, hook) handle_404 do check_config! Github::Hooker.delete_hook(repo, hook) end end |
#list(repo) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/github-hooker/cli.rb', line 5 def list(repo) handle_404 do check_config! hooks = Github::Hooker.hooks(repo) hooks.each do |hook| puts "#{hook['url']}" puts "> name: #{hook['name']}" puts "> events: #{hook['events'].join(", ")}" puts "> config: #{hook['config']}" puts end unless hooks.nil? end end |