Class: Adhearsion::CLI::PluginCommand

Inherits:
Thor
  • Object
show all
Defined in:
lib/adhearsion/cli_commands/plugin_command.rb

Instance Method Summary collapse

Instance Method Details

#create_ahnhub_hooksObject


28
29
30
31
# File 'lib/adhearsion/cli_commands/plugin_command.rb', line 28

def create_ahnhub_hooks
  create_github_hook
  create_rubygem_hook
end

#create_github_hookObject


12
13
14
15
# File 'lib/adhearsion/cli_commands/plugin_command.rb', line 12

def create_github_hook
  get_github_vals
  generate_github_webhook
end

#create_rubygem_hookObject


18
19
20
21
22
23
24
25
# File 'lib/adhearsion/cli_commands/plugin_command.rb', line 18

def create_rubygem_hook
  get_rubygem_vals

  puts `curl -H 'Authorization:#{ENV['RUBYGEM_AUTH']}' \
  -F 'gem_name=#{ENV['RUBYGEM_NAME']}' \
  -F 'url=http://www.ahnhub.com/gem' \
  https://rubygems.org/api/v1/web_hooks/fire`
end