Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
def push_notify(lane_name, success)
require 'uri'
uri = URI.parse("https://api.parse.com/")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new("/1/classes/LaneResult")
request.add_field('Content-Type', 'application/json')
request.add_field('X-Parse-Application-Id', 'my_parse_id')
request.add_field('X-Parse-Master-Key', 'my_parse_key')
request.body = {"EventType"=> "Deploy #{lane_name} - #{success}",
"App"=> "MyIndieApp"}.to_json
response = http.request(request)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.