From 30630a6febf90766fd39eba03d89152ed6a25da1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hern=C3=A1n=20Morales=20Durand?= Date: Wed, 31 Jan 2024 17:44:57 +0100 Subject: [PATCH 1/3] Update regex filter pattern to match href with Pharo-12 optionally followed by a dot and minor version numbers --- sources.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources.list b/sources.list index 2f87b591..fc5274cd 100644 --- a/sources.list +++ b/sources.list @@ -147,7 +147,7 @@ OrderedCollection [ #type : #HttpListing, #name : 'Pharo 12.0 (development version)', #url : 'https://files.pharo.org/image/120/', - #filterPattern : 'href="(Pharo-?12-SNAPSHOT.build.[^"]*.zip)"' + #filterPattern : 'href="(Pharo-?12[.]?[0-9]*-SNAPSHOT.build.[^"]*.zip)"' }, PhLTemplateSource { #type : #HttpListing, From f7366654c431ef44234e65cc5cd6b2422bc24cfa Mon Sep 17 00:00:00 2001 From: DEMAREY Christophe Date: Thu, 1 Feb 2024 14:50:47 +0100 Subject: [PATCH 2/3] test new regex for Pharo 12 --- .../PhLHTTPListingTemplateGroupTest.class.st | 53 ++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/src/PharoLauncher-Tests-Functional/PhLHTTPListingTemplateGroupTest.class.st b/src/PharoLauncher-Tests-Functional/PhLHTTPListingTemplateGroupTest.class.st index 09d719ac..bda9b24a 100644 --- a/src/PharoLauncher-Tests-Functional/PhLHTTPListingTemplateGroupTest.class.st +++ b/src/PharoLauncher-Tests-Functional/PhLHTTPListingTemplateGroupTest.class.st @@ -32,10 +32,61 @@ PhLHTTPListingTemplateGroupTest >> newGroup [ ^ PhLHTTPListingTemplateGroup name: 'Test' url: self exampleUrl ] +{ #category : #'instance creation' } +PhLHTTPListingTemplateGroupTest >> newPharo12Group [ + + ^ PhLHTTPListingTemplateGroup + name: 'TestPharo12' + url: self pharo12ExampleUrl + filterPattern: 'href="(Pharo-?12(.[0-9]+)?-SNAPSHOT.build.[^"]*.zip)"' +] + +{ #category : #helpers } +PhLHTTPListingTemplateGroupTest >> pharo12ExampleContent [ + ^ 'index · styled with h5ai 0.22.1 (http://larsjung.de/h5ai/)
h5ai 0.22.1⚡ JavaScript is disabled! ⚡⚡ Some features disabled! Works best in modern browsers. ⚡
' +] + +{ #category : #helpers } +PhLHTTPListingTemplateGroupTest >> pharo12ExampleUrl [ + ^ 'https://files.pharo.org/image/120/' asZnUrl +] + { #category : #running } PhLHTTPListingTemplateGroupTest >> setUp [ super setUp. - self downloadManager atUrl: self exampleUrl answer: self exampleContent + self downloadManager atUrl: self exampleUrl answer: self exampleContent. + self downloadManager atUrl: self pharo12ExampleUrl answer: self pharo12ExampleContent +] + +{ #category : #tests } +PhLHTTPListingTemplateGroupTest >> testCanMatchPharo12Templates [ + | group templatesAndGroups | + group := self newPharo12Group. + + templatesAndGroups := group templatesAndGroups. + + self assert: (templatesAndGroups noneSatisfy: [ :template | template isTemplateGroup ]). + self + assertCollection: (templatesAndGroups collect: #name) + hasSameElements: #('Pharo12.0-SNAPSHOT.build.1329.sha.25a911c.arch.64bit' + 'Pharo12.0-SNAPSHOT.build.1328.sha.10f5de5.arch.64bit' + 'Pharo12-SNAPSHOT.build.1229.sha.ed99075.arch.64bit' + 'Pharo12-SNAPSHOT.build.1228.sha.826d9bb.arch.64bit') ] { #category : #tests } From 7e47b2ff3d161410966e6fd5d254fa52b2759a05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hern=C3=A1n=20Morales=20Durand?= <4825959+hernanmd@users.noreply.github.com> Date: Thu, 1 Feb 2024 22:11:15 +0100 Subject: [PATCH 3/3] Update sources.list Co-authored-by: demarey --- sources.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources.list b/sources.list index fc5274cd..d0b40a64 100644 --- a/sources.list +++ b/sources.list @@ -147,7 +147,7 @@ OrderedCollection [ #type : #HttpListing, #name : 'Pharo 12.0 (development version)', #url : 'https://files.pharo.org/image/120/', - #filterPattern : 'href="(Pharo-?12[.]?[0-9]*-SNAPSHOT.build.[^"]*.zip)"' + #filterPattern : 'href="(Pharo-?12(.[0-9]+)?-SNAPSHOT.build.[^"]*.zip)"' }, PhLTemplateSource { #type : #HttpListing,