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
28df200c
Commit
28df200c
authored
Mar 29, 2016
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed failing specs
parent
459ad344
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
lib/gitlab/import_url.rb
lib/gitlab/import_url.rb
+5
-1
spec/factories/project_import_data.rb
spec/factories/project_import_data.rb
+1
-0
No files found.
lib/gitlab/import_url.rb
View file @
28df200c
...
@@ -20,7 +20,7 @@ module Gitlab
...
@@ -20,7 +20,7 @@ module Gitlab
private
private
def
generate_full_url
def
generate_full_url
return
@url
unless
credentials
return
@url
unless
valid_credentials?
@full_url
=
@url
.
dup
@full_url
=
@url
.
dup
@full_url
.
user
=
credentials
[
:user
]
@full_url
.
user
=
credentials
[
:user
]
@full_url
.
password
=
credentials
[
:password
]
@full_url
.
password
=
credentials
[
:password
]
...
@@ -33,5 +33,9 @@ module Gitlab
...
@@ -33,5 +33,9 @@ module Gitlab
safe_url
.
user
=
nil
safe_url
.
user
=
nil
safe_url
safe_url
end
end
def
valid_credentials?
credentials
&&
credentials
.
is_a?
(
Hash
)
&&
credentials
.
any?
end
end
end
end
end
spec/factories/project_import_data.rb
View file @
28df200c
FactoryGirl
.
define
do
FactoryGirl
.
define
do
factory
:project_import_data
,
class:
ProjectImportData
do
factory
:project_import_data
,
class:
ProjectImportData
do
data
"test"
data
"test"
project
end
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