From dc6c0d8229abae1d31020a4a3fd9499de105a866 Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Thu, 6 Jul 2017 22:04:55 +0000 Subject: [PATCH] Quick fix to make updating of all documentation possible. This should be changed for a programatic way of getting a collection of all declared classes that are a instance of GrafoscopioDocumentation. --- .../GrafoscopioDocumentation.class.st | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/repository/Grafoscopio-Utils/GrafoscopioDocumentation.class.st b/repository/Grafoscopio-Utils/GrafoscopioDocumentation.class.st index 1b1a88c..bef9351 100644 --- a/repository/Grafoscopio-Utils/GrafoscopioDocumentation.class.st +++ b/repository/Grafoscopio-Utils/GrafoscopioDocumentation.class.st @@ -17,13 +17,10 @@ Class { { #category : #updating } GrafoscopioDocumentation class >> listOutdatedDocs [ - "I return the list of all documentent where the local copy and the remote copy doesn't match" - | docsRepo | - docsRepo := self newDefault. - ^ docsRepo documents reject: [ :doc | (docsRepo isFileUpdatedFor: doc) ] + ^ self newDefault listOutdatedDocs ] -{ #category : #'as yet unclassified' } +{ #category : #'instance creation' } GrafoscopioDocumentation class >> newDefault [ ^ self new ] @@ -35,7 +32,7 @@ GrafoscopioDocumentation class >> update [ { #category : #updating } GrafoscopioDocumentation class >> updateAll [ - self allInstancesDo: [ :docs | docs update ] + {GrafoscopioDocs . DatavizDocs . OffshoreLeaksDocs} do: [ :docs | docs update ] ] { #category : #updating } @@ -88,6 +85,12 @@ GrafoscopioDocumentation >> isFileUpdatedFor: relativeFilePath [ with: (self repository lastHashNumberFor: relativeFilePath) ] ] +{ #category : #updating } +GrafoscopioDocumentation >> listOutdatedDocs [ + "I return the list of all documentent where the local copy and the remote copy doesn't match" + ^ self documents reject: [ :doc | (self isFileUpdatedFor: doc) ] +] + { #category : #accessing } GrafoscopioDocumentation >> localPlace [ ^ localPlace ifNil: [ @@ -136,7 +139,7 @@ GrafoscopioDocumentation >> repository: anObject [ { #category : #updating } GrafoscopioDocumentation >> update [ - (self class listOutdatedDocs) + (self listOutdatedDocs) ifEmpty: [ self inform: 'All documents in the ', self name,' collection are already updated'. ^ self ]