Sha256: ff7e14cea69744b25f4ade5ec58723a42e382589e5d9fd11f63f5fa8555582ee

Contents?: true

Size: 896 Bytes

Versions: 3

Compression:

Stored size: 896 Bytes

Contents

#!/usr/bin/env ruby
require 'gocdss'

gocd_addr = ARGV[0]
slack_hook = ARGV[1]
bot_name = ARGV[2]
user_pass = ARGV[3]

def usage
  puts "-------------------------------------------------------------------------------------------"
  puts "usage:"
  puts "\t(sh)>gocdss 'http://localhost:5832' 'https://hooks.slack.com/services/abo3ot' my_bot_name"
  puts "\t(sh)>gocdss 'http://localhost:5832' 'https://hooks.slack.com/services/abo3ot' my_bot_name user:pass"
  puts "-------------------------------------------------------------------------------------------"
end
usage unless gocd_addr and slack_hook and bot_name

server = Gocdss::Server.new gocd_addr: gocd_addr, slack_hook: slack_hook, bot_name: bot_name, user_pass:user_pass
#server.start

require 'json'
events = JSON.parse(File.read "./spec/assets/cancelled_first")

loop do
  server.process_event events.shift
  break if events.empty?
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gocd-slack-server-0.0.18 bin/gocdss
gocd-slack-server-0.0.17 bin/gocdss
gocd-slack-server-0.0.16 bin/gocdss