List for outdated documents.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2016-10-09 10:20:57 +00:00 committed by SantiagoBragagnolo
parent df1e446902
commit 9e473aa570
2 changed files with 12 additions and 3 deletions

View File

@ -30,9 +30,7 @@ GrafoscopioDocumentation class >> current [
{ #category : #updating }
GrafoscopioDocumentation class >> isUpdated [
"I compare the cryptografic signatures of the local copy of aDocumentType and the remote one to see if the're the same,
in which case I return true or false in any other cases."
^ ((self current documents collect: [ :doc | (self isUpdatedFor: doc) ]) includes: false) not
^ (self listOutdated size > 0) ifTrue: [ ^ false ] ifFalse: [ ^ true ]
]
{ #category : #updating }
@ -46,6 +44,12 @@ GrafoscopioDocumentation class >> isUpdatedFor: relativeFilePath [
ifTrue: [ ^ ExternalApp compareHashFor: localFile with: (self current repository lastHashNumberFor: relativeFilePath) ]
]
{ #category : #updating }
GrafoscopioDocumentation class >> listOutdated [
"I return the list of all documentent where the local copy and the remote copy doesn't match"
^ self current documents select: [ :doc | (self isUpdatedFor: doc) = false ]
]
{ #category : #accessing }
GrafoscopioDocumentation >> documents [
^ documents ifNil: [ documents := OrderedCollection new ]

View File

@ -12,6 +12,11 @@ ManifestGrafoscopio class >> ruleRBClassNameInSelectorRuleV1FalsePositive [
^ #(#(#(#RGMethodDefinition #(#'Documentation class' #current #true)) #'2016-10-07T19:39:23.013722-05:00') )
]
{ #category : #'code-critics' }
ManifestGrafoscopio class >> ruleRBEqualsTrueRuleV1FalsePositive [
^ #(#(#(#RGMethodDefinition #(#'GrafoscopioDocumentation class' #listOutdated #true)) #'2016-10-09T10:16:31.841951-05:00') )
]
{ #category : #'code-critics' }
ManifestGrafoscopio class >> ruleRBSentNotImplementedRuleV1FalsePositive [
^ #(#(#(#RGMetaclassDefinition #(#'GrafoscopioGUI class' #GrafoscopioGUI)) #'2015-12-23T10:38:16.706667-05:00') #(#(#RGClassDefinition #(#GrafoscopioGUI)) #'2016-01-06T18:53:45.844051-05:00') )