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
path: root/lib
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-04-06 11:36:30 +0300
committerJames Lopez <james@jameslopez.es>2016-04-06 11:36:30 +0300
commitb97654393e326095c7d95ccc1eb9f583a3b23da9 (patch)
tree0e16ecfa3baaafc65593921fdbe09b8a96f940c3 /lib
parent5e51fce4dcd62997f372aed44badc844f98851e9 (diff)
fix some issues with credentials
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/bitbucket_import/client.rb12
-rw-r--r--lib/gitlab/fogbugz_import/importer.rb2
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/gitlab/bitbucket_import/client.rb b/lib/gitlab/bitbucket_import/client.rb
index 49f86ab5edf..9bb507b5edd 100644
--- a/lib/gitlab/bitbucket_import/client.rb
+++ b/lib/gitlab/bitbucket_import/client.rb
@@ -6,10 +6,10 @@ module Gitlab
attr_reader :consumer, :api
def self.from_project(project)
- credentials = project.import_data if project.import_data
- if credentials && credentials[:bb_session]
- token = credentials[:bb_session][:bitbucket_access_token]
- token_secret = credentials[:bb_session][:bitbucket_access_token_secret]
+ import_data_credentials = project.import_data.credentials if project.import_data
+ if import_data_credentials && import_data_credentials[:bb_session]
+ token = import_data_credentials[:bb_session][:bitbucket_access_token]
+ token_secret = import_data_credentials[:bb_session][:bitbucket_access_token_secret]
new(token, token_secret)
else
raise Projects::ImportService::Error, "Unable to find project import data credentials for project ID: #{@project.id}"
@@ -65,7 +65,7 @@ module Gitlab
def issues(project_identifier)
all_issues = []
offset = 0
- per_page = 50 # Maximum number allowed by Bitbucket
+ per_page = 50 # Maximum number allowed by Bitbucket
index = 0
begin
@@ -131,7 +131,7 @@ module Gitlab
end
def config
- Gitlab.config.omniauth.providers.find { |provider| provider.name == "bitbucket"}
+ Gitlab.config.omniauth.providers.find { |provider| provider.name == "bitbucket" }
end
def bitbucket_options
diff --git a/lib/gitlab/fogbugz_import/importer.rb b/lib/gitlab/fogbugz_import/importer.rb
index 249c5b48b1c..42f9b6eab84 100644
--- a/lib/gitlab/fogbugz_import/importer.rb
+++ b/lib/gitlab/fogbugz_import/importer.rb
@@ -31,7 +31,7 @@ module Gitlab
private
def import_data_credentials
- @import_data_credentials ||= project.import_data if project.import_data
+ @import_data_credentials ||= project.import_data.credentials if project.import_data
end
def user_map