From 0ce56f03c96a079545c5bada069524b173a69c06 Mon Sep 17 00:00:00 2001 From: "quentin.moutte.etu" Date: Fri, 5 Jul 2024 14:59:11 +0200 Subject: [PATCH 1/2] change name of monthBlog --- src/Microdown-Blog-Tests/MicBlogCreatorTest.class.st | 2 +- .../MicMonthListCreatorTest.class.st | 12 ++++++------ src/Microdown-Blog/MicBlogCreator.class.st | 3 +-- src/Microdown-Blog/MicMonthListCreator.class.st | 2 +- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/Microdown-Blog-Tests/MicBlogCreatorTest.class.st b/src/Microdown-Blog-Tests/MicBlogCreatorTest.class.st index 4be24f06..cb0a69a8 100644 --- a/src/Microdown-Blog-Tests/MicBlogCreatorTest.class.st +++ b/src/Microdown-Blog-Tests/MicBlogCreatorTest.class.st @@ -170,7 +170,7 @@ MicBlogCreatorTest >> testCreateHtmlGroupFileAt [ at: (Month year: 2019 month: 'January'). self assert: - (fileSystem / 'html' / '_monthBlog' / 'January_2019.html') exists + (fileSystem / 'html' / 'monthBlog' / 'January_2019.html') exists ] { #category : 'tests' } diff --git a/src/Microdown-Blog-Tests/MicMonthListCreatorTest.class.st b/src/Microdown-Blog-Tests/MicMonthListCreatorTest.class.st index 7d8dcc95..6d618138 100644 --- a/src/Microdown-Blog-Tests/MicMonthListCreatorTest.class.st +++ b/src/Microdown-Blog-Tests/MicMonthListCreatorTest.class.st @@ -59,9 +59,9 @@ MicMonthListCreatorTest >> testGenerateMicListBlockOfLinkDate [ self assert: dateList children size equals: self numberOfMonthSince2014; assert: dateList children first children first plainText - equals: '[January 2014](/_monthBlog/January_2014.html)'; + equals: '[January 2014](/monthBlog/January_2014.html)'; assert: dateList children last children first plainText - equals: '[' , Date today month asString , '](/_monthBlog/' + equals: '[' , Date today month asString , '](/monthBlog/' , Date today month name , '_' , Date today year asString , '.html)' ] @@ -84,9 +84,9 @@ MicMonthListCreatorTest >> testGenerateMicListBlockOfLinkDateWith [ self assert: dateList children size equals: self numberOfMonthSince2014; assert: dateList children first children first plainText - equals: '[January 2014](/_monthBlog/January_2014.html)'; + equals: '[January 2014](/monthBlog/January_2014.html)'; assert: dateList children last children first plainText - equals: '[' , Date today month asString , '](/_monthBlog/' + equals: '[' , Date today month asString , '](/monthBlog/' , Date today month name , '_' , Date today year asString , '.html)' ] @@ -111,8 +111,8 @@ MicMonthListCreatorTest >> testGenerateMicListBlockOfLinkDateWithRootPath [ self assert: dateList children size equals: self numberOfMonthSince2014; assert: dateList children first children first plainText - equals: '[January 2014](', ressources genericNonEmptyRootPath ,'/_monthBlog/January_2014.html)'; + equals: '[January 2014](', ressources genericNonEmptyRootPath ,'/monthBlog/January_2014.html)'; assert: dateList children last children first plainText - equals: '[' , Date today month asString , '](', ressources genericNonEmptyRootPath ,'/_monthBlog/' + equals: '[' , Date today month asString , '](', ressources genericNonEmptyRootPath ,'/monthBlog/' , Date today month name , '_' , Date today year asString , '.html)' ] diff --git a/src/Microdown-Blog/MicBlogCreator.class.st b/src/Microdown-Blog/MicBlogCreator.class.st index 549be00d..70426fc6 100644 --- a/src/Microdown-Blog/MicBlogCreator.class.st +++ b/src/Microdown-Blog/MicBlogCreator.class.st @@ -136,8 +136,7 @@ MicBlogCreator >> createHtmlGroupFile: aMicRoot at: aMonth [ visitor := (MicHTMLVisitor new visit: aMicRoot) first. self write: visitor - to: '_monthBlog' asFileReference / (aMonth name , '_' - , aMonth year asString , '.html') + to: 'monthBlog' asFileReference / (aMonth name, '_', aMonth year asString , '.html') ] { #category : 'rendering' } diff --git a/src/Microdown-Blog/MicMonthListCreator.class.st b/src/Microdown-Blog/MicMonthListCreator.class.st index 34bb69d9..52564e50 100644 --- a/src/Microdown-Blog/MicMonthListCreator.class.st +++ b/src/Microdown-Blog/MicMonthListCreator.class.st @@ -47,7 +47,7 @@ MicMonthListCreator >> generateMicListBlockOfLinkDateWith: aMonthList [ listElement := MicListItemBlock new. link := self makeALink: each asString - to: FileReference / '_monthBlog' + to: FileReference / 'monthBlog' / (each name , '_' , each year asString , '.html'). link parent: listElement. listElement parent: unorderedList ]. From c404941a624b60336f6d8e6eecbd4d45ca4591ef Mon Sep 17 00:00:00 2001 From: "quentin.moutte.etu" Date: Fri, 5 Jul 2024 15:03:00 +0200 Subject: [PATCH 2/2] fix test for monthBlog --- src/Microdown-Blog-Tests/MicBlogCreatorTest.class.st | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microdown-Blog-Tests/MicBlogCreatorTest.class.st b/src/Microdown-Blog-Tests/MicBlogCreatorTest.class.st index cb0a69a8..68fde968 100644 --- a/src/Microdown-Blog-Tests/MicBlogCreatorTest.class.st +++ b/src/Microdown-Blog-Tests/MicBlogCreatorTest.class.st @@ -215,7 +215,7 @@ MicBlogCreatorTest >> testInitializeMonthList [ blog initializeMonthList: listSingleSummarizer. - self assert: (fileSystem / 'html' / '_monthBlog') allFiles size equals: 2 + self assert: (fileSystem / 'html' / 'monthBlog') allFiles size equals: 2 ] { #category : 'tests' }