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
ea7f5a05
Commit
ea7f5a05
authored
Sep 08, 2017
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve conflict in lib/gitlab/url_sanitizer.rb
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
47c09cfd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
19 deletions
+0
-19
lib/gitlab/url_sanitizer.rb
lib/gitlab/url_sanitizer.rb
+0
-10
spec/lib/gitlab/url_sanitizer_spec.rb
spec/lib/gitlab/url_sanitizer_spec.rb
+0
-9
No files found.
lib/gitlab/url_sanitizer.rb
View file @
ea7f5a05
...
...
@@ -19,15 +19,10 @@ module Gitlab
end
def
initialize
(
url
,
credentials:
nil
)
<<<<<<<
HEAD
=======
@url
=
Addressable
::
URI
.
parse
(
url
.
to_s
.
strip
)
%i[user password]
.
each
do
|
symbol
|
credentials
[
symbol
]
=
credentials
[
symbol
].
presence
if
credentials
&
.
key?
(
symbol
)
end
>>>>>>>
upstream
/
master
@credentials
=
credentials
@url
=
parse_url
(
url
)
end
...
...
@@ -38,13 +33,8 @@ module Gitlab
def
masked_url
url
=
@url
.
dup
<<<<<<<
HEAD
url
.
password
=
"*****"
if
url
.
password
url
.
user
=
"*****"
if
url
.
user
=======
url
.
password
=
"*****"
if
url
.
password
.
present?
url
.
user
=
"*****"
if
url
.
user
.
present?
>>>>>>>
upstream
/
master
url
.
to_s
end
...
...
spec/lib/gitlab/url_sanitizer_spec.rb
View file @
ea7f5a05
...
...
@@ -74,17 +74,8 @@ describe Gitlab::UrlSanitizer do
with_them
do
subject
{
described_class
.
new
(
"http://
#{
userinfo
}
example.com"
).
sanitized_url
}
<<<<<<<
HEAD
describe
'.valid?'
do
it
'validates url strings'
do
expect
(
described_class
.
valid?
(
nil
)).
to
be
(
false
)
expect
(
described_class
.
valid?
(
''
)).
to
be
(
false
)
expect
(
described_class
.
valid?
(
'valid@project:url.git'
)).
to
be
(
true
)
expect
(
described_class
.
valid?
(
'123://invalid:url'
)).
to
be
(
false
)
=======
it
{
is_expected
.
to
eq
(
'http://example.com'
)
}
end
>>>>>>>
upstream
/
master
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