Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Log production errors to Airbrake.

  • Loading branch information...
commit 2b9404754df363d83a66b7ab88aa30e704d8f166 1 parent eff3d13
@bamnet bamnet authored
View
3  Gemfile
@@ -3,6 +3,9 @@ source 'http://rubygems.org'
gem "rails", "3.2.8"
+# Load the gems used for remote reporting.
+eval File.read('Gemfile-reporting')
+
group :concerto_plugins do
eval File.read('Gemfile-plugins')
end
View
2  Gemfile-reporting
@@ -0,0 +1,2 @@
+# Airbrake is used to remotely log exceptions.
+gem 'airbrake'
View
7 Gemfile.lock
@@ -28,6 +28,9 @@ GEM
activesupport (3.2.8)
i18n (~> 0.6)
multi_json (~> 1.0)
+ airbrake (3.1.5)
+ builder
+ girl_friday
arel (3.0.2)
attachable (0.0.5)
bcrypt-ruby (3.0.1)
@@ -40,6 +43,7 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.3.3)
+ connection_pool (0.9.2)
delayed_job (3.0.3)
activesupport (~> 3.0)
delayed_job_active_record (0.3.3)
@@ -53,6 +57,8 @@ GEM
erubis (2.7.0)
execjs (1.4.0)
multi_json (~> 1.0)
+ girl_friday (0.10.0)
+ connection_pool (~> 0.9.0)
hike (1.2.1)
i18n (0.6.1)
journey (1.0.4)
@@ -126,6 +132,7 @@ PLATFORMS
ruby
DEPENDENCIES
+ airbrake
attachable (>= 0.0.5)
cancan
coffee-rails (~> 3.2.1)
View
21 config/initializers/13-airbrake.rb
@@ -0,0 +1,21 @@
+if ActiveRecord::Base.connection.table_exists? 'concerto_configs'
+ if ConcertoConfig.columns_hash.has_key?("plugin_id")
+ ConcertoConfig.make_concerto_config("allow_remote_error_reporting", "true", :value_type => "boolean")
+ end
+end
+
+Airbrake.configure do |config|
+ def config.api_key
+ if ConcertoConfig[:allow_remote_error_reporting] == "true"
+ return '52adf2979c2ab87c634612bef9deaaf2'
+ else
+ return nil
+ end
+ end
+ config.async = (RUBY_VERSION.to_f > 1.8)
+ config.user_attributes = []
+ config.secure = true
+
+ # Uncomment the following to start reporting development mode errors.
+ #config.development_environments = []
+end
Please sign in to comment.
Something went wrong with that request. Please try again.