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:
Diffstat (limited to 'lib/mattermost/session.rb')
-rw-r--r--lib/mattermost/session.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/mattermost/session.rb b/lib/mattermost/session.rb
index 523d82f9161..9374c5c8f8f 100644
--- a/lib/mattermost/session.rb
+++ b/lib/mattermost/session.rb
@@ -1,13 +1,13 @@
# frozen_string_literal: true
module Mattermost
- class NoSessionError < Mattermost::Error
+ class NoSessionError < ::Mattermost::Error
def message
'No session could be set up, is Mattermost configured with Single Sign On?'
end
end
- ConnectionError = Class.new(Mattermost::Error)
+ ConnectionError = Class.new(::Mattermost::Error)
# This class' prime objective is to obtain a session token on a Mattermost
# instance with SSO configured where this GitLab instance is the provider.
@@ -42,7 +42,7 @@ module Mattermost
yield self
rescue Errno::ECONNREFUSED => e
Gitlab::AppLogger.error(e.message + "\n" + e.backtrace.join("\n"))
- raise Mattermost::NoSessionError
+ raise ::Mattermost::NoSessionError
ensure
destroy
end
@@ -100,11 +100,11 @@ module Mattermost
end
def create
- raise Mattermost::NoSessionError unless oauth_uri
- raise Mattermost::NoSessionError unless token_uri
+ raise ::Mattermost::NoSessionError unless oauth_uri
+ raise ::Mattermost::NoSessionError unless token_uri
@token = request_token
- raise Mattermost::NoSessionError unless @token
+ raise ::Mattermost::NoSessionError unless @token
@headers = {
Authorization: "Bearer #{@token}"
@@ -174,9 +174,9 @@ module Mattermost
def handle_exceptions
yield
rescue Gitlab::HTTP::Error => e
- raise Mattermost::ConnectionError, e.message
+ raise ::Mattermost::ConnectionError, e.message
rescue Errno::ECONNREFUSED => e
- raise Mattermost::ConnectionError, e.message
+ raise ::Mattermost::ConnectionError, e.message
end
def parse_cookie(response)