Commit 88bf3c0f authored by Valery Sizov's avatar Valery Sizov

GHE importer: tests fix

parent 1be5291a
...@@ -94,18 +94,20 @@ Settings.omniauth['providers'] ||= [] ...@@ -94,18 +94,20 @@ Settings.omniauth['providers'] ||= []
# Fill out omniauth-gitlab settings. It is needed for easy set up GHE or GH by just specifying url. # Fill out omniauth-gitlab settings. It is needed for easy set up GHE or GH by just specifying url.
github_settings = Settings.omniauth['providers'].find{|provider| provider["name"] == "github"} github_settings = Settings.omniauth['providers'].find{|provider| provider["name"] == "github"}
if github_settings["url"].include?("https://github.com") if github_settings
github_settings["args"]["client_options"] = { if github_settings["url"].include?("https://github.com")
"site" => 'https://api.github.com/', github_settings["args"]["client_options"] = {
"authorize_url" => 'https://github.com/login/oauth/authorize', "site" => 'https://api.github.com/',
"token_url" => 'https://github.com/login/oauth/access_token' "authorize_url" => 'https://github.com/login/oauth/authorize',
} "token_url" => 'https://github.com/login/oauth/access_token'
else }
github_settings["args"]["client_options"] = { else
"site" => File.join(github_settings["url"], "api/v3"), github_settings["args"]["client_options"] = {
"authorize_url" => File.join(github_settings["url"], "login/oauth/authorize"), "site" => File.join(github_settings["url"], "api/v3"),
"token_url" => File.join(github_settings["url"], "login/oauth/access_token") "authorize_url" => File.join(github_settings["url"], "login/oauth/authorize"),
} "token_url" => File.join(github_settings["url"], "login/oauth/access_token")
}
end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment