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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
f767dd4a
Commit
f767dd4a
authored
Nov 17, 2017
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix go-import meta data when enabled_git_access_protocol is a blank string
parent
4d555032
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
lib/gitlab/middleware/go.rb
lib/gitlab/middleware/go.rb
+2
-3
spec/lib/gitlab/middleware/go_spec.rb
spec/lib/gitlab/middleware/go_spec.rb
+8
-0
No files found.
lib/gitlab/middleware/go.rb
View file @
f767dd4a
...
...
@@ -42,12 +42,11 @@ module Gitlab
project_url
=
URI
.
join
(
config
.
gitlab
.
url
,
path
)
import_prefix
=
strip_url
(
project_url
.
to_s
)
repository_url
=
case
current_application_settings
.
enabled_git_access_protocol
when
'ssh'
repository_url
=
if
current_application_settings
.
enabled_git_access_protocol
==
'ssh'
shell
=
config
.
gitlab_shell
port
=
":
#{
shell
.
ssh_port
}
"
unless
shell
.
ssh_port
==
22
"ssh://
#{
shell
.
ssh_user
}
@
#{
shell
.
ssh_host
}#{
port
}
/
#{
path
}
.git"
when
'http'
,
nil
else
"
#{
project_url
}
.git"
end
...
...
spec/lib/gitlab/middleware/go_spec.rb
View file @
f767dd4a
...
...
@@ -127,6 +127,14 @@ describe Gitlab::Middleware::Go do
include_examples
'go-get=1'
,
enabled_protocol:
nil
end
context
'with nothing disabled (blank string)'
do
before
do
stub_application_setting
(
enabled_git_access_protocol:
''
)
end
include_examples
'go-get=1'
,
enabled_protocol:
nil
end
end
def
go
...
...
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