Skip to content

Commit

Permalink
Merge pull request #1101 from jecisc/1099-Gitlab-integration-should-m…
Browse files Browse the repository at this point in the history
…anage-non-default-port

1099-Gitlab-integration-should-manage-non-default-port
  • Loading branch information
guillep authored Dec 26, 2018
2 parents 5e41499 + 788d33a commit 0e98cbc
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*Iceberg-Pharo6
sshPort
"In pharo 6 we do not have the code to be able to load gitlab with non default ssh port projects. So we return nil so that #scpUrl does not break."

^ nil

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
running
testScpUrlForSelfHostedGitlabWithNonDefaultSSHPort
| repository |
SystemVersion current major <= 6 ifTrue: [ self skip ].

repository := MCGitlabRepository location: 'gitlab://git.pharo.org:1234:pharo-project/pharo'.
self assert: repository scpUrl equals: 'ssh://[email protected]:1234/pharo-project/pharo.git'
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
*Iceberg
scpUrl
^ 'git@<1s>:<2s>.git' expandMacrosWith: self hostname with: projectPath
"If the sshPort is not nil it means that we have a non default ssh port. Thus we need to add `ssh://` and th port number to the scheme"

^ self sshPort
ifNil: [ 'git@<1s>:<2s>.git' expandMacrosWith: self hostname with: projectPath ]
ifNotNil: [ :port | 'ssh://git@<1s>:<2s>/<3s>.git' expandMacrosWith: self hostname with: port with: projectPath ]

0 comments on commit 0e98cbc

Please sign in to comment.