Skip to content

Instantly share code, notes, and snippets.

@adamwiggins
Created January 17, 2009 23:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamwiggins/48487 to your computer and use it in GitHub Desktop.
Save adamwiggins/48487 to your computer and use it in GitHub Desktop.
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