Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
88bf3c0f
Commit
88bf3c0f
authored
Feb 11, 2015
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GHE importer: tests fix
parent
1be5291a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
12 deletions
+14
-12
config/initializers/1_settings.rb
config/initializers/1_settings.rb
+14
-12
No files found.
config/initializers/1_settings.rb
View file @
88bf3c0f
...
...
@@ -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.
github_settings
=
Settings
.
omniauth
[
'providers'
].
find
{
|
provider
|
provider
[
"name"
]
==
"github"
}
if
github_settings
[
"url"
].
include?
(
"https://github.com"
)
github_settings
[
"args"
][
"client_options"
]
=
{
"site"
=>
'https://api.github.com/'
,
"authorize_url"
=>
'https://github.com/login/oauth/authorize'
,
"token_url"
=>
'https://github.com/login/oauth/access_token'
}
else
github_settings
[
"args"
][
"client_options"
]
=
{
"site"
=>
File
.
join
(
github_settings
[
"url"
],
"api/v3"
),
"authorize_url"
=>
File
.
join
(
github_settings
[
"url"
],
"login/oauth/authorize"
),
"token_url"
=>
File
.
join
(
github_settings
[
"url"
],
"login/oauth/access_token"
)
}
if
github_settings
if
github_settings
[
"url"
].
include?
(
"https://github.com"
)
github_settings
[
"args"
][
"client_options"
]
=
{
"site"
=>
'https://api.github.com/'
,
"authorize_url"
=>
'https://github.com/login/oauth/authorize'
,
"token_url"
=>
'https://github.com/login/oauth/access_token'
}
else
github_settings
[
"args"
][
"client_options"
]
=
{
"site"
=>
File
.
join
(
github_settings
[
"url"
],
"api/v3"
),
"authorize_url"
=>
File
.
join
(
github_settings
[
"url"
],
"login/oauth/authorize"
),
"token_url"
=>
File
.
join
(
github_settings
[
"url"
],
"login/oauth/access_token"
)
}
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment