diff options
author | Stan Hu <stanhu@gmail.com> | 2015-03-23 04:07:33 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-03-23 04:16:48 +0300 |
commit | 5cce0645b07265e3c2b991bcbff351a9acbc90d6 (patch) | |
tree | d6159107f168a25bb737903c214e106321cf7cab /lib | |
parent | fb30039668f68834d9951746181201423fa8b269 (diff) |
Fix OAuth2 issue importing a new project from GitHub and GitLab
Closes #1268
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/bitbucket_import/client.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/github_import/client.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/gitlab_import/client.rb | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/gitlab/bitbucket_import/client.rb b/lib/gitlab/bitbucket_import/client.rb index 1e4906c9e31..5b1952b9675 100644 --- a/lib/gitlab/bitbucket_import/client.rb +++ b/lib/gitlab/bitbucket_import/client.rb @@ -62,7 +62,7 @@ module Gitlab end def find_deploy_key(project_identifier, key) - JSON.parse(api.get("/api/1.0/repositories/#{project_identifier}/deploy-keys").body).find do |deploy_key| + JSON.parse(api.get("/api/1.0/repositories/#{project_identifier}/deploy-keys").body).find do |deploy_key| deploy_key["key"].chomp == key.chomp end end @@ -92,7 +92,7 @@ module Gitlab end def bitbucket_options - OmniAuth::Strategies::Bitbucket.default_options[:client_options].dup + OmniAuth::Strategies::Bitbucket.default_options[:client_options].symbolize_keys end end end diff --git a/lib/gitlab/github_import/client.rb b/lib/gitlab/github_import/client.rb index 7fe076b333b..270cbcd9ccd 100644 --- a/lib/gitlab/github_import/client.rb +++ b/lib/gitlab/github_import/client.rb @@ -46,7 +46,7 @@ module Gitlab end def github_options - OmniAuth::Strategies::GitHub.default_options[:client_options].dup + OmniAuth::Strategies::GitHub.default_options[:client_options].symbolize_keys end end end diff --git a/lib/gitlab/gitlab_import/client.rb b/lib/gitlab/gitlab_import/client.rb index 2236439c6ce..f48ede9d067 100644 --- a/lib/gitlab/gitlab_import/client.rb +++ b/lib/gitlab/gitlab_import/client.rb @@ -71,7 +71,7 @@ module Gitlab end def gitlab_options - OmniAuth::Strategies::GitLab.default_options[:client_options].dup + OmniAuth::Strategies::GitLab.default_options[:client_options].symbolize_keys end end end |