[squeak-dev] The Trunk: System-mt.1238.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Jul 6 12:31:11 UTC 2021


Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1238.mcz

==================== Summary ====================

Name: System-mt.1238
Author: mt
Time: 6 July 2021, 2:31:04.816497 pm
UUID: 27e22442-c577-47a1-9746-f2078e38154c
Ancestors: System-eem.1237

Adds query to access last-modified timestamp for TravisCI badge.

=============== Diff against System-eem.1237 ===============

Item was added:
+ ----- Method: SystemVersion>>ciStatusTimestamp (in category 'continuous integration') -----
+ ciStatusTimestamp
+ 
+ 	| stamp " 'Mon, 05 Jul 2021 17:52:11 GMT' " dateAndTime |
+ 	stamp := (WebClient httpGet: self ciStatusBadgeUrl) headerAt: 'last-modified'.
+ 	dateAndTime := DateAndTime readFrom: (((stamp allButFirst: 4) allButLast: 4), ' Z') readStream.
+ 	^ String streamContents: [:s |
+ 		dateAndTime asDate = Date today
+ 			ifTrue: [s nextPutAll: 'Today' translated, ',']
+ 			ifFalse: [dateAndTime asDate = Date yesterday
+ 				ifTrue: [s nextPutAll: 'Yesterday' translated, ',']
+ 				ifFalse: [dateAndTime printYMDOn: s]].
+ 		s space.
+ 		dateAndTime printHMSOn: s]!



More information about the Squeak-dev mailing list