Fix in validation of extensions source info.
authorJan Vrany <jan.vrany@fit.cvut.cz>
Mon, 09 Mar 2015 16:57:10 +0100
changeset 274b13db8438e4a
parent 273 31ab0665a9dc
child 275 d5c88fece400
Fix in validation of extensions source info.

Check if there are any extensions at all, if not then check there's no extension.st file.
reports/Builder__ReportExtensionsSourceInfo.st
     1.1 --- a/reports/Builder__ReportExtensionsSourceInfo.st	Tue Feb 17 16:31:02 2015 +0100
     1.2 +++ b/reports/Builder__ReportExtensionsSourceInfo.st	Mon Mar 09 16:57:10 2015 +0100
     1.3 @@ -1,3 +1,5 @@
     1.4 +"{ Encoding: utf8 }"
     1.5 +
     1.6  "{ Package: 'stx:goodies/builder/reports' }"
     1.7  
     1.8  "{ NameSpace: Builder }"
     1.9 @@ -52,6 +54,7 @@
    1.10      | extensions wide stream s methodsSortedByName defClass scmManagerOrNil |
    1.11  
    1.12      extensions := ProjectDefinition searchForExtensionsWithProject: package.     
    1.13 +    extensions isEmptyOrNil ifTrue:[ ^ self ].
    1.14      wide := false.
    1.15      stream := streamArg.
    1.16      extensions do:[:method|
    1.17 @@ -91,7 +94,7 @@
    1.18                                  ]
    1.19                                ].
    1.20      methodsSortedByName do:[:aMethod |
    1.21 -        |cat source privacy aStream|
    1.22 +        |cat privacy aStream|
    1.23  
    1.24          aStream := s.
    1.25  
    1.26 @@ -133,16 +136,22 @@
    1.27          ].
    1.28      ].
    1.29  
    1.30 -    "Modified (comment): / 29-07-2013 / 17:44:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    1.31 +    "Modified: / 09-03-2015 / 15:55:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    1.32  !
    1.33  
    1.34  validate
    1.35 -    | file |
    1.36 +    | extensions file |
    1.37  
    1.38 +    extensions := ProjectDefinition searchForExtensionsWithProject: package.     
    1.39      file := (Smalltalk getPackageDirectoryForPackage: package) / 'extensions.st'.                       
    1.40 -    ^ self validateAgainstReference: file.
    1.41  
    1.42 -    "Modified: / 29-07-2013 / 14:55:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    1.43 +    extensions isEmptyOrNil ifTrue:[
    1.44 +        self assert: file exists not.
    1.45 +    ] ifFalse:[
    1.46 +        self validateAgainstReference: file.
    1.47 +    ]
    1.48 +
    1.49 +    "Modified: / 09-03-2015 / 15:58:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    1.50  ! !
    1.51  
    1.52  !ReportExtensionsSourceInfo class methodsFor:'documentation'!