After the support for private jenkins here we add the support for privates urls and http listing.
Fixes
MODIFY
src/PharoLauncher-Core/PhLHTTPListingTemplateGroup.class.st
src/PharoLauncher-Core/PhLHTTPListingTemplateGroup.class.st
@@ -11,7 +11,7 @@ Class {
#classVars : [
'RegexCache'
],
- #category : 'PharoLauncher-Core-Model'
+ #category : #'PharoLauncher-Core-Model'
}
{ #category : #defaults }
@@ -34,6 +34,22 @@ PhLHTTPListingTemplateGroup class >> name: aString url: anUrl filterPattern: aPa
yourself
]
+{ #category : #'instance creation' }
+PhLHTTPListingTemplateGroup class >> name: aString url: anUrl filterPattern: aPatternString username: anotherString password: yetAnotherString [
+ ^ (self name: aString url: anUrl filterPattern: aPatternString)
+ username: anotherString;
+ password: yetAnotherString;
+ yourself
+]
+
+{ #category : #'instance creation' }
+PhLHTTPListingTemplateGroup class >> name: aString url: anUrl username: anotherString password: yetAnotherString [
+ ^ (self name: aString url: anUrl)
+ username: anotherString;
+ password: yetAnotherString;
+ yourself
+]
+
{ #category : #accessing }
PhLHTTPListingTemplateGroup class >> regexCache [
"Cache the regex per version so that we don't recompute it all the time"
@@ -63,6 +79,16 @@ PhLHTTPListingTemplateGroup >> name [
^ name
]
+{ #category : #accessing }
+PhLHTTPListingTemplateGroup >> password [
+ ^ url password
+]
+
+{ #category : #accessing }
+PhLHTTPListingTemplateGroup >> password: aString [
+ ^ url password: aString
+]
+
{ #category : #accessing }
PhLHTTPListingTemplateGroup >> regex [
^ self class regexCache at: self name asSymbol
@@ -98,3 +124,13 @@ PhLHTTPListingTemplateGroup >> templatesAndGroups [
^ templates
]
+
+{ #category : #accessing }
+PhLHTTPListingTemplateGroup >> username [
+ ^ url username
+]
+
+{ #category : #accessing }
+PhLHTTPListingTemplateGroup >> username: aString [
+ url username: aString
+]

MODIFY
src/PharoLauncher-Core/PhLRemoteTemplate.class.st
src/PharoLauncher-Core/PhLRemoteTemplate.class.st
@@ -10,7 +10,7 @@ Class {
#category : #'PharoLauncher-Core-Model'
}
-{ #category : #'as yet unclassified' }
+{ #category : #example }
PhLRemoteTemplate class >> example [
^ self name: 'Pharo Mooc' url: 'https://mooc.pharo.org/image/PharoWeb.zip'
]
@@ -22,6 +22,14 @@ PhLRemoteTemplate class >> name: aString url: anUrl [
yourself
]
+{ #category : #'instance creation' }
+PhLRemoteTemplate class >> name: aString url: anUrl username: anotherString password: yetAnotherString [
+ ^ (self name: aString url: anUrl)
+ username: anotherString;
+ password: yetAnotherString;
+ yourself
+]
+
{ #category : #comparing }
PhLRemoteTemplate >> = anObject [
self == anObject ifTrue: [ ^ true ].
@@ -35,6 +43,16 @@ PhLRemoteTemplate >> hash [
^ name hash bitXor: url hash
]
+{ #category : #accessing }
+PhLRemoteTemplate >> password [
+ ^ url password
+]
+
+{ #category : #accessing }
+PhLRemoteTemplate >> password: aString [
+ url password: aString
+]
+
{ #category : #'initialize-release' }
PhLRemoteTemplate >> setName: aName url: anUrl [
name := aName.
@@ -55,6 +73,16 @@ PhLRemoteTemplate >> url [
^ url
]
+{ #category : #accessing }
+PhLRemoteTemplate >> username [
+ ^ url username
+]
+
+{ #category : #accessing }
+PhLRemoteTemplate >> username: aString [
+ url username: aString
+]
+
{ #category : #accessing }
PhLRemoteTemplate >> zipArchive [
"The local template group takes care of cashing downloaded templates."

MODIFY
src/PharoLauncher-Core/PhLTemplateSource.class.st
src/PharoLauncher-Core/PhLTemplateSource.class.st
@@ -274,7 +274,7 @@ PhLTemplateSource >> asBasicTemplateGroup [
^ PhLHTTPListingTemplateGroup
name: name
url: url asZnUrl
- filterPattern: pattern ].
+ filterPattern: pattern username: username password: password].
type == self class jenkinsServerType
ifTrue: [ ^ PhLJenkins2Server name: name url: url asZnUrl username: username password: password ].
type == self class urlGroupType
@@ -289,12 +289,13 @@ PhLTemplateSource >> asBasicTemplateGroup [
{ #category : #converting }
PhLTemplateSource >> asTemplate [
- type == self class urlType
- ifTrue: [ ^ PhLRemoteTemplate
+ type == self class urlType ifTrue: [
+ ^ PhLRemoteTemplate
name: name
- url: url asUrl ].
+ url: url asUrl
+ username: username
+ password: password ].
self error: 'Template type not supported!'
-
]
{ #category : #converting }

After the support for private jenkins (#415), here we add the support for privates urls and http listing.

Fixes #331