Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add hoptoad notifier to taps server

  • Loading branch information...
commit 1ac27074512cf2559feab008de0d2819a80458e7 1 parent 0b993fd
@ddollar ddollar authored
Showing with 13 additions and 0 deletions.
  1. +1 −0  Gemfile
  2. +6 −0 Gemfile.lock
  3. +6 −0 lib/taps/server.rb
View
1  Gemfile
@@ -22,6 +22,7 @@ end
# server-specific dependencies
group :server do
+ gem "hoptoad_notifier"
gem "extlib", "0.9.15"
gem "mysql", "2.8.1"
gem "mysql2", "0.2.6"
View
6 Gemfile.lock
@@ -1,10 +1,15 @@
GEM
remote: http://rubygems.org/
specs:
+ activesupport (3.0.5)
bacon (1.1.0)
+ builder (3.0.0)
daemons (1.1.0)
eventmachine (0.12.10)
extlib (0.9.15)
+ hoptoad_notifier (2.4.7)
+ activesupport
+ builder
json (1.5.1)
mime-types (1.16)
mocha (0.9.8)
@@ -34,6 +39,7 @@ PLATFORMS
DEPENDENCIES
bacon
extlib (= 0.9.15)
+ hoptoad_notifier
json (~> 1.5.1)
mocha
mysql (= 2.8.1)
View
6 lib/taps/server.rb
@@ -1,9 +1,14 @@
+require 'hoptoad_notifier'
require 'sinatra/base'
require 'taps/config'
require 'taps/utils'
require 'taps/db_session'
require 'taps/data_stream'
+HoptoadNotifier.configure do |config|
+ config.api_key = ENV["HOPTOAD_API_KEY"]
+end
+
module Taps
class Server < Sinatra::Base
use Rack::Auth::Basic do |login, password|
@@ -13,6 +18,7 @@ class Server < Sinatra::Base
use Rack::Deflater unless ENV['NO_DEFLATE']
error do
+ HoptoadNotifier.notify(e)
e = request.env['sinatra.error']
if e.kind_of?(Taps::BaseError)
content_type "application/json"
Please sign in to comment.
Something went wrong with that request. Please try again.