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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
5cce0645
Commit
5cce0645
authored
Mar 22, 2015
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix OAuth2 issue importing a new project from GitHub and GitLab
Closes #1268
parent
fb300396
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
54 additions
and
4 deletions
+54
-4
CHANGELOG
CHANGELOG
+1
-0
lib/gitlab/bitbucket_import/client.rb
lib/gitlab/bitbucket_import/client.rb
+2
-2
lib/gitlab/github_import/client.rb
lib/gitlab/github_import/client.rb
+1
-1
lib/gitlab/gitlab_import/client.rb
lib/gitlab/gitlab_import/client.rb
+1
-1
spec/lib/gitlab/bitbucket_import/client_spec.rb
spec/lib/gitlab/bitbucket_import/client_spec.rb
+17
-0
spec/lib/gitlab/github_import/client_spec.rb
spec/lib/gitlab/github_import/client_spec.rb
+16
-0
spec/lib/gitlab/gitlab_import/client_spec.rb
spec/lib/gitlab/gitlab_import/client_spec.rb
+16
-0
No files found.
CHANGELOG
View file @
5cce0645
...
@@ -3,6 +3,7 @@ Please view this file on the master branch, on stable branches it's out of date.
...
@@ -3,6 +3,7 @@ Please view this file on the master branch, on stable branches it's out of date.
v 7.10.0 (unreleased)
v 7.10.0 (unreleased)
- Fix "Import projects from" button to show the correct instructions (Stan Hu)
- Fix "Import projects from" button to show the correct instructions (Stan Hu)
- Fix dots in Wiki slugs causing errors (Stan Hu)
- Fix dots in Wiki slugs causing errors (Stan Hu)
- Fix OAuth2 issue importing a new project from GitHub and GitLab (Stan Hu)
- Update poltergeist to version 1.6.0 to support PhantomJS 2.0 (Zeger-Jan van de Weg)
- Update poltergeist to version 1.6.0 to support PhantomJS 2.0 (Zeger-Jan van de Weg)
- Fix cross references when usernames, milestones, or project names contain underscores (Stan Hu)
- Fix cross references when usernames, milestones, or project names contain underscores (Stan Hu)
- Disable reference creation for comments surrounded by code/preformatted blocks (Stan Hu)
- Disable reference creation for comments surrounded by code/preformatted blocks (Stan Hu)
...
...
lib/gitlab/bitbucket_import/client.rb
View file @
5cce0645
...
@@ -92,7 +92,7 @@ module Gitlab
...
@@ -92,7 +92,7 @@ module Gitlab
end
end
def
bitbucket_options
def
bitbucket_options
OmniAuth
::
Strategies
::
Bitbucket
.
default_options
[
:client_options
].
dup
OmniAuth
::
Strategies
::
Bitbucket
.
default_options
[
:client_options
].
symbolize_keys
end
end
end
end
end
end
...
...
lib/gitlab/github_import/client.rb
View file @
5cce0645
...
@@ -46,7 +46,7 @@ module Gitlab
...
@@ -46,7 +46,7 @@ module Gitlab
end
end
def
github_options
def
github_options
OmniAuth
::
Strategies
::
GitHub
.
default_options
[
:client_options
].
dup
OmniAuth
::
Strategies
::
GitHub
.
default_options
[
:client_options
].
symbolize_keys
end
end
end
end
end
end
...
...
lib/gitlab/gitlab_import/client.rb
View file @
5cce0645
...
@@ -71,7 +71,7 @@ module Gitlab
...
@@ -71,7 +71,7 @@ module Gitlab
end
end
def
gitlab_options
def
gitlab_options
OmniAuth
::
Strategies
::
GitLab
.
default_options
[
:client_options
].
dup
OmniAuth
::
Strategies
::
GitLab
.
default_options
[
:client_options
].
symbolize_keys
end
end
end
end
end
end
...
...
spec/lib/gitlab/bitbucket_import/client_spec.rb
0 → 100644
View file @
5cce0645
require
'spec_helper'
describe
Gitlab
::
BitbucketImport
::
Client
do
let
(
:token
)
{
'123456'
}
let
(
:secret
)
{
'secret'
}
let
(
:client
)
{
Gitlab
::
BitbucketImport
::
Client
.
new
(
token
,
secret
)
}
before
do
Gitlab
.
config
.
omniauth
.
providers
<<
OpenStruct
.
new
(
app_id:
"asd123"
,
app_secret:
"asd123"
,
name:
"bitbucket"
)
end
it
'all OAuth client options are symbols'
do
client
.
consumer
.
options
.
keys
.
each
do
|
key
|
expect
(
key
).
to
be_kind_of
(
Symbol
)
end
end
end
spec/lib/gitlab/github_import/client_spec.rb
0 → 100644
View file @
5cce0645
require
'spec_helper'
describe
Gitlab
::
GithubImport
::
Client
do
let
(
:token
)
{
'123456'
}
let
(
:client
)
{
Gitlab
::
GithubImport
::
Client
.
new
(
token
)
}
before
do
Gitlab
.
config
.
omniauth
.
providers
<<
OpenStruct
.
new
(
app_id:
"asd123"
,
app_secret:
"asd123"
,
name:
"github"
)
end
it
'all OAuth2 client options are symbols'
do
client
.
client
.
options
.
keys
.
each
do
|
key
|
expect
(
key
).
to
be_kind_of
(
Symbol
)
end
end
end
spec/lib/gitlab/gitlab_import/client_spec.rb
0 → 100644
View file @
5cce0645
require
'spec_helper'
describe
Gitlab
::
GitlabImport
::
Client
do
let
(
:token
)
{
'123456'
}
let
(
:client
)
{
Gitlab
::
GitlabImport
::
Client
.
new
(
token
)
}
before
do
Gitlab
.
config
.
omniauth
.
providers
<<
OpenStruct
.
new
(
app_id:
"asd123"
,
app_secret:
"asd123"
,
name:
"gitlab"
)
end
it
'all OAuth2 client options are symbols'
do
client
.
client
.
options
.
keys
.
each
do
|
key
|
expect
(
key
).
to
be_kind_of
(
Symbol
)
end
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