Created
January 17, 2009 23:20
-
-
Save adamwiggins/48487 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'rest_client' | |
require 'yaml' | |
params = { | |
'api_key' => '...', | |
'project' => 'myproj', | |
'error_message' => "Testing sendalone notify", | |
'backtrace' => "", | |
'request' => {}, | |
'environment' => {} | |
} | |
headers = { :content_type => 'application/x-yaml' } | |
payload = YAML.dump('notice' => params) | |
begin | |
RestClient.post('http://hoptoadapp.com/notices', payload, headers) | |
rescue => e | |
puts e.response.body if e.respond_to? :response | |
raise | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment