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
fc5df829
Commit
fc5df829
authored
Jul 31, 2018
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use URI.join to avoid slash headaches
parent
dbef9f21
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
lib/bitbucket_server/connection.rb
lib/bitbucket_server/connection.rb
+3
-3
No files found.
lib/bitbucket_server/connection.rb
View file @
fc5df829
...
...
@@ -87,16 +87,16 @@ module BitbucketServer
def
build_url
(
path
)
return
path
if
path
.
starts_with?
(
root_url
)
"
#{
root_url
}#{
path
}
"
URI
.
join
(
root_url
,
path
).
to_s
end
def
root_url
"
#{
base_uri
}
/rest/api/
#{
api_version
}
"
URI
.
join
(
base_uri
,
"/rest/api/
#{
api_version
}
"
).
to_s
end
def
delete_url
(
resource
,
path
)
if
resource
==
:branches
"
#{
base_uri
}
/rest/branch-utils/
#{
api_version
}#{
path
}
"
URI
.
join
(
base_uri
,
"/rest/branch-utils/
#{
api_version
}#{
path
}
"
).
to_s
else
build_url
(
path
)
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