summaryrefslogtreecommitdiff
path: root/lib/bitbucket/connection.rb
diff options
context:
space:
mode:
authorValery Sizov <valery@gitlab.com>2016-12-07 11:33:32 +0200
committerValery Sizov <valery@gitlab.com>2016-12-07 11:33:32 +0200
commit67b7637e5d7d3cf3e3f5cde6e7f984ece368c48c (patch)
tree2418c8d6c0c369023e75d89dec785a5d8f4c0dff /lib/bitbucket/connection.rb
parent43b7b0ce23d4de7055dc1cdd660b92ff03f4eb1e (diff)
downloadgitlab-ce-67b7637e5d7d3cf3e3f5cde6e7f984ece368c48c.tar.gz
Apply review comments. Iteration 1
Diffstat (limited to 'lib/bitbucket/connection.rb')
-rw-r--r--lib/bitbucket/connection.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/bitbucket/connection.rb b/lib/bitbucket/connection.rb
index e28285f119c..692a596c057 100644
--- a/lib/bitbucket/connection.rb
+++ b/lib/bitbucket/connection.rb
@@ -5,8 +5,8 @@ module Bitbucket
DEFAULT_QUERY = {}
def initialize(options = {})
- @api_version = options.fetch(:api_version, DEFAULT_API_VERSION)
- @base_uri = options.fetch(:base_uri, DEFAULT_BASE_URI)
+ @api_version = options.fetch(:api_version, DEFAULT_API_VERSION)
+ @base_uri = options.fetch(:base_uri, DEFAULT_BASE_URI)
@default_query = options.fetch(:query, DEFAULT_QUERY)
@token = options[:token]
@@ -23,7 +23,7 @@ module Bitbucket
@connection ||= OAuth2::AccessToken.new(client, @token, refresh_token: @refresh_token, expires_at: @expires_at, expires_in: @expires_in)
end
- def query(params = {})
+ def set_default_query_parameters(params = {})
@default_query.merge!(params)
end
@@ -63,7 +63,7 @@ module Bitbucket
end
def provider
- Gitlab.config.omniauth.providers.find { |provider| provider.name == 'bitbucket' }
+ Gitlab::OAuth::Provider.config_for('bitbucket')
end
def options