[Pkg] Installer: Installer-Core-kph.278.mcz
squeak-dev-noreply at lists.squeakfoundation.org
squeak-dev-noreply at lists.squeakfoundation.org
Wed Dec 17 14:21:03 UTC 2008
A new version of Installer-Core was added to project Installer:
http://www.squeaksource.com/Installer/Installer-Core-kph.278.mcz
==================== Summary ====================
Name: Installer-Core-kph.278
Author: kph
Time: 17 December 2008, 2:20:59 pm
UUID: 80153c10-9192-4bf9-b4fe-d4a317efc857
Ancestors: Installer-Core-kph.277
remove html markup when reading mantis pages
=============== Diff against Installer-Core-kph.277 ===============
Item was changed:
----- Method: InstallerMantis>>maReadNotes: (in category 'mantis') -----
maReadNotes: page
| notes note |
notes := OrderedCollection new.
[ page upToAll: 'tr class="bugnote"'; upTo: $>.
page atEnd ]
whileFalse: [
note := (self removeHtmlMarkupFrom: (page upToAll: '</tr>') readStream) contents.
note := note withBlanksCondensed.
- "note replaceAll: Character cr with: $ ."
note replaceAll: Character lf with: Character cr.
notes add: note
].
^notes!
Item was changed:
----- Method: InstallerMantis>>report (in category 'public interface') -----
report
"Installer mantis viewBug: 5639."
| page text |
page := self maPage.
text := String streamContents: [ :str |
#('Bug ID' 'Category' 'Severity' 'Reproducibility' 'Date Submitted'
'Date Updated' 'Reporter' 'View Status' 'Handler'
'Priority' 'Resolution' 'Status' 'Product Version' 'Summary' 'Description' 'Additional Information' )
do: [ :field |
| f |
f := self maRead: page field: field.
str nextPutAll: f key; nextPutAll: ': '; nextPutAll: f value; cr.
].
str nextPutAll: 'Notes: '; cr.
(self maReadNotes: page) do: [ :note | str nextPutAll: note; cr; cr ].
str nextPutAll: 'Files: '; nextPutAll: self maFiles keys asArray printString.
].
^ text
!
Item was changed:
----- Method: InstallerMantis>>maRead:field: (in category 'mantis') -----
maRead: page field: fieldKey
| value |
value := page upToAll: ('!!-- ', fieldKey, ' -->'); upToAll: '<td'; upTo: $>; upToAll: '</td>'.
page upTo: $<.
page peek = $t ifTrue: [ value := page upToAll: 'td'; upTo: $>; upToAll: '</td>' ].
+ ^Association key: fieldKey value: (self removeHtmlMarkupFrom: value withBlanksTrimmed readStream) contents!
- ^Association key: fieldKey value: value withBlanksTrimmed!
More information about the Packages
mailing list