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:
Offray Vladimir Luna Cárdenas 2017-07-06 22:04:55 +00:00
parent aa2bbdf295
commit dc6c0d8229

View File

@ -17,13 +17,10 @@ Class {
{ #category : #updating } { #category : #updating }
GrafoscopioDocumentation class >> listOutdatedDocs [ GrafoscopioDocumentation class >> listOutdatedDocs [
"I return the list of all documentent where the local copy and the remote copy doesn't match" ^ self newDefault listOutdatedDocs
| docsRepo |
docsRepo := self newDefault.
^ docsRepo documents reject: [ :doc | (docsRepo isFileUpdatedFor: doc) ]
] ]
{ #category : #'as yet unclassified' } { #category : #'instance creation' }
GrafoscopioDocumentation class >> newDefault [ GrafoscopioDocumentation class >> newDefault [
^ self new ^ self new
] ]
@ -35,7 +32,7 @@ GrafoscopioDocumentation class >> update [
{ #category : #updating } { #category : #updating }
GrafoscopioDocumentation class >> updateAll [ GrafoscopioDocumentation class >> updateAll [
self allInstancesDo: [ :docs | docs update ] {GrafoscopioDocs . DatavizDocs . OffshoreLeaksDocs} do: [ :docs | docs update ]
] ]
{ #category : #updating } { #category : #updating }
@ -88,6 +85,12 @@ GrafoscopioDocumentation >> isFileUpdatedFor: relativeFilePath [
with: (self repository lastHashNumberFor: 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 } { #category : #accessing }
GrafoscopioDocumentation >> localPlace [ GrafoscopioDocumentation >> localPlace [
^ localPlace ifNil: [ ^ localPlace ifNil: [
@ -136,7 +139,7 @@ GrafoscopioDocumentation >> repository: anObject [
{ #category : #updating } { #category : #updating }
GrafoscopioDocumentation >> update [ GrafoscopioDocumentation >> update [
(self class listOutdatedDocs) (self listOutdatedDocs)
ifEmpty: [ ifEmpty: [
self inform: 'All documents in the ', self name,' collection are already updated'. self inform: 'All documents in the ', self name,' collection are already updated'.
^ self ] ^ self ]