* VRFS-699 bugsnag added to javascript

This commit is contained in:
Seth Call 2013-09-22 01:25:20 +00:00
parent ba0e600293
commit 022085c8c8
8 changed files with 30 additions and 3 deletions

View File

@ -14,7 +14,7 @@
var userPhotoUrls = [];
var MAX_GENRES = 1;
var selectedFriendIds = {};
var sessionSettings = {};
var sessionSettings = {};
function beforeShow(data) {
userNames = [];

View File

@ -1,4 +1,21 @@
class ApplicationController < ActionController::Base
protect_from_forgery
include SessionsHelper
# inject username/email into bugsnag data
before_bugsnag_notify :add_user_info_to_bugsnag
private
def add_user_info_to_bugsnag(notif)
# Add some app-specific data which will be displayed on a custom
# "User Info" tab on each error page on bugsnag.com
unless current_user.nil?
notif.add_tab(:user_info, {
name: current_user.name,
email: current_user.email
})
end
end
end

View File

@ -23,6 +23,8 @@
<%= stylesheet_link_tag "client/search", media: "all" %>
<%= stylesheet_link_tag "client/ftue", media: "all" %>
<%= stylesheet_link_tag "client/createSession", media: "all" %>
<!-- THIS NEEDS TO BE IN FRONT OF ANY OTHER JAVASCRIPT INCLUDES ACCORDING TO BUGSNAG -->
<script src="//d2wy8f7a9ursnm.cloudfront.net/bugsnag-1.0.9.min.js" data-apikey="<%= Rails.application.config.bugsnag_key %>"></script>
<%= include_gon %>
<%= csrf_meta_tags %>
</head>

View File

@ -7,6 +7,8 @@
<![endif]-->
<link href='http://fonts.googleapis.com/css?family=Raleway:100,200,300,400,500,600,700' rel='stylesheet' type='text/css'>
<%= stylesheet_link_tag "client/client", media: "all" %>
<!-- THIS NEEDS TO BE IN FRONT OF ANY OTHER JAVASCRIPT INCLUDES ACCORDING TO BUGSNAG -->
<script src="//d2wy8f7a9ursnm.cloudfront.net/bugsnag-1.0.9.min.js" data-apikey="<%= Rails.application.config.bugsnag_key %>"></script>
<%= include_gon %>
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>

View File

@ -5,6 +5,8 @@
<link href='http://fonts.googleapis.com/css?family=Raleway:100,200,300,400,500,600,700' rel='stylesheet' type='text/css'>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<%= stylesheet_link_tag "corp/corporate", :media => "all" %>
<!-- THIS NEEDS TO BE IN FRONT OF ANY OTHER JAVASCRIPT INCLUDES ACCORDING TO BUGSNAG -->
<script src="//d2wy8f7a9ursnm.cloudfront.net/bugsnag-1.0.9.min.js" data-apikey="<%= Rails.application.config.bugsnag_key %>"></script>
<%= javascript_include_tag "corp/corporate" %>
<%= csrf_meta_tags %>
</head>

View File

@ -8,6 +8,8 @@
<![endif]-->
<link href='http://fonts.googleapis.com/css?family=Raleway:100,200,300,400,500,600,700' rel='stylesheet' type='text/css'>
<%= stylesheet_link_tag "landing/landing", media: "all" %>
<!-- THIS NEEDS TO BE IN FRONT OF ANY OTHER JAVASCRIPT INCLUDES ACCORDING TO BUGSNAG -->
<script src="//d2wy8f7a9ursnm.cloudfront.net/bugsnag-1.0.9.min.js" data-apikey="<%= Rails.application.config.bugsnag_key %>"></script>
<%= include_gon %>
<%= csrf_meta_tags %>
</head>

View File

@ -148,5 +148,7 @@ if defined?(Bundler)
# allow hot-key to switch between native and normal client
config.allow_force_native_client = true
config.bugsnag_key = "4289fc981c8ce3eb0969003c4f498b01"
end
end

View File

@ -1,7 +1,7 @@
Bugsnag.configure do |config|
config.api_key = "4289fc981c8ce3eb0969003c4f498b01"
config.api_key = Rails.application.config.bugsnag_key
config.use_ssl = false
config.notify_release_stages = ["production"]
config.notify_release_stages = ["production"] # add 'development' if you want to test a feature locally
config.auto_notify = true
config.app_version = JamWeb::VERSION
end