Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 20 lines (13 sloc) 543 Bytes
#!/usr/bin/env ruby
$LOAD_PATH.unshift *Dir["#{File.dirname(__FILE__)}/../vendor/**/lib"]
require "json"
unless ARGV[0]
puts "Usage: ./script/deliver_payload [service-name]"
exit 1
end
payload_file = File.new("docs/github_payload")
hash = eval(payload_file.read)
data_json = JSON.generate(hash["data"])
payload_json = JSON.generate(hash["payload"])
File.open( "docs/payload_data", 'w' ) { |f| f.write( "data=#{data_json}&payload=#{payload_json}" ) }
exec "curl --data-binary @docs/payload_data http://localhost:8080/#{ARGV[0]}/push"
Something went wrong with that request. Please try again.