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.
This commit is contained in:
parent
aa2bbdf295
commit
dc6c0d8229
@ -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 ]
|
||||
|
Loading…
Reference in New Issue
Block a user