lib/sinatra/toadhopper.rb in toadhopper-sinatra-1.0.0 vs lib/sinatra/toadhopper.rb in toadhopper-sinatra-1.0.2
- old
+ new
@@ -1,19 +1,19 @@
require 'sinatra/base'
require 'toadhopper'
module Sinatra
# The Toadhopper helper methods
- module ToadHopper
- VERSION = "1.0.0"
+ module Toadhopper
+ VERSION = "1.0.2"
# Reports the current sinatra error to Hoptoad
def post_error_to_hoptoad!
unless options.toadhopper && options.toadhopper[:api_key]
- STDERR.puts "ToadHopper api key not set, e.g. set :toadhopper, :api_key => 'my api key'"
+ STDERR.puts "Toadhopper api key not set, e.g. set :toadhopper, :api_key => 'my api key'"
return
end
- toadhopper = ToadHopper(options.toadhopper[:api_key])
+ toadhopper = Toadhopper(options.toadhopper[:api_key])
toadhopper.filters = options.toadhopper[:filters] if options.toadhopper[:filters]
toadhopper.post!(
env['sinatra.error'],
{
:url => request.url,
@@ -28,7 +28,7 @@
},
{'X-Hoptoad-Client-Name' => notifier_name}
)
end
end
- helpers ToadHopper
+ helpers Toadhopper
end
\ No newline at end of file