Skip to content
This repository has been archived by the owner on Sep 19, 2022. It is now read-only.

Commit

Permalink
Merged in feature/error_monitoring (pull request #8)
Browse files Browse the repository at this point in the history
Setup bugsnag
  • Loading branch information
sue445 committed Nov 5, 2014
2 parents 9949fb3 + 02ac0ba commit 95d35a9
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env.example
Expand Up @@ -3,3 +3,4 @@ TWITTER_CONSUMER_SECRET=
TWITTER_ACCESS_TOKEN=
TWITTER_ACCESS_TOKEN_SECRET=
REDIS_URL=redis://localhost:6379/1
BUGSNAG_APP_KEY=
1 change: 1 addition & 0 deletions Gemfile
Expand Up @@ -5,6 +5,7 @@ ruby '2.1.4'
gem 'padrino', '0.12.4'

gem 'activerecord', '>= 3.1', require: 'active_record'
gem 'bugsnag'
gem 'mechanize'
gem 'pdf-reader'
gem 'rake'
Expand Down
9 changes: 9 additions & 0 deletions Gemfile.lock
Expand Up @@ -22,6 +22,9 @@ GEM
rake (>= 0.8.7)
arel (5.0.1.20140414130214)
buftok (0.2.0)
bugsnag (2.5.1)
httparty (>= 0.6, < 1.0)
multi_json (~> 1.0)
builder (3.2.2)
celluloid (0.15.2)
timers (~> 1.1.0)
Expand Down Expand Up @@ -49,6 +52,9 @@ GEM
http_router (0.11.1)
rack (>= 1.0.0)
url_mount (~> 0.2.1)
httparty (0.13.2)
json (~> 1.8)
multi_xml (>= 0.5.2)
i18n (0.6.11)
json (1.8.1)
mail (2.5.4)
Expand All @@ -70,6 +76,8 @@ GEM
mini_portile (0.6.0)
minitest (5.4.2)
moneta (0.7.20)
multi_json (1.10.1)
multi_xml (0.5.5)
multipart-post (2.0.0)
naught (1.0.0)
net-http-digest_auth (1.4)
Expand Down Expand Up @@ -209,6 +217,7 @@ PLATFORMS
DEPENDENCIES
activerecord (>= 3.1)
annotate
bugsnag
database_rewinder
dotenv
factory_girl
Expand Down
10 changes: 10 additions & 0 deletions app/app.rb
Expand Up @@ -62,5 +62,15 @@ class App < Padrino::Application
# render 'errors/500'
# end
#

unless ENV["BUGSNAG_APP_KEY"].blank?
Bugsnag.configure do |config|
config.api_key = ENV["BUGSNAG_APP_KEY"]
config.notify_release_stages = %w(production)
end

use Bugsnag::Rack
enable :raise_errors
end
end
end
2 changes: 1 addition & 1 deletion config/boot.rb
Expand Up @@ -37,13 +37,13 @@
# Add your before (RE)load hooks here
#
Padrino.before_load do
Dotenv.load unless Padrino.env == :production
end

##
# Add your after (RE)load hooks here
#
Padrino.after_load do
Dotenv.load unless Padrino.env == :production
end

Padrino.load!

0 comments on commit 95d35a9

Please sign in to comment.