Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Bennett <lukeeeebennettplus@gmail.com>2016-10-10 01:40:58 +0300
committerLuke "Jared" Bennett <lbennett@gitlab.com>2017-01-23 11:23:57 +0300
commitc252c03401881fd7dbf7fab984285c402eb31d5f (patch)
treeeb7d75b8b6e55c6ce8ea82fb91ba023430b747ce /lib/gitlab/gon_helper.rb
parent8a6e415268c60074b8cd9508c106120107ce5731 (diff)
Added raven and raven-vue plugin, updated gon_helper with data needed for raven and created raven_config, required by application.js
Added is_production to define sentry environment Removed as much jQuery as possible Added public_sentry_dsn application_settings helper method Use URI module instead of regex for public dsn Removed raven-vue and load raven on if sentry is enabled Add load_script spec added raven_config spec added class_spec_helper and tests added sentry_helper spec added feature spec
Diffstat (limited to 'lib/gitlab/gon_helper.rb')
-rw-r--r--lib/gitlab/gon_helper.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/gitlab/gon_helper.rb b/lib/gitlab/gon_helper.rb
index b8a5ac907a4..70ffb68c9ab 100644
--- a/lib/gitlab/gon_helper.rb
+++ b/lib/gitlab/gon_helper.rb
@@ -1,3 +1,5 @@
+include SentryHelper
+
module Gitlab
module GonHelper
def add_gon_variables
@@ -10,6 +12,10 @@ module Gitlab
gon.award_menu_url = emojis_path
gon.katex_css_url = ActionController::Base.helpers.asset_path('katex.css')
gon.katex_js_url = ActionController::Base.helpers.asset_path('katex.js')
+ gon.sentry_dsn = sentry_dsn_public if sentry_enabled?
+ gon.raven_asset_url = ActionController::Base.helpers.asset_path('raven.js') if sentry_enabled?
+ gon.gitlab_url = Gitlab.config.gitlab.url
+ gon.is_production = Rails.env.production?
if current_user
gon.current_user_id = current_user.id