Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/dalehenrich/metacello-work
Browse files Browse the repository at this point in the history
…into issue_514
  • Loading branch information
dalehenrich committed Jul 3, 2020
2 parents 348ac29 + 5b62d08 commit eecb483
Show file tree
Hide file tree
Showing 114 changed files with 1,171 additions and 1,020 deletions.
8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ sudo: false
os: linux

smalltalk:
- GemStone-3.5.0
- GemStone-3.5.1
- Pharo-5.0
- GemStone-2.4.8
- GemStone-3.1.0.6
- GemStone-3.2.17
- GemStone-3.3.9
- GemStone-3.4.3
- GemStone-3.4.5
- GemStone-3.5.2
- Pharo-3.0
- Pharo-4.0
- Pharo-6.0
Expand All @@ -32,3 +33,6 @@ matrix:
cache:
directories:
- $SMALLTALK_CI_CACHE

notifications:
slack: gemtalksystems:ENb7sBznQr32ZxlOCAdFfZdm
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ baseline: spec
with: [ spec requires: #('Metacello-GitBasedRepository') ];
package: 'Metacello-Bitbucket'
with: [ spec requires: #('Metacello-GitBasedRepository') ];
package: 'Metacello-MC'
with: [ spec requires: #('Metacello-Core') ];
package: 'Metacello-MC' with: [ spec requires: #('Metacello-Core') ];
package: 'Metacello-Platform'
with: [ spec requires: #('Metacello-MC') ];
package: 'Metacello-Reference'
Expand All @@ -45,7 +44,10 @@ baseline: spec
requires:
#('Metacello-Core' 'Metacello-TestsCore' 'Metacello-ToolBox' 'Metacello-TestsMCResources') ];
package: 'Metacello-TestsMC'
with: [ spec requires: #('Metacello-MC' 'Metacello-ToolBox' 'Metacello-GitHub' 'Metacello-Bitbucket' 'Metacello-TestsMCResources') ];
with: [
spec
requires:
#('Metacello-MC' 'Metacello-ToolBox' 'Metacello-GitHub' 'Metacello-Bitbucket' 'Metacello-TestsMCResources') ];
package: 'Metacello-TestsMCA'
with: [ spec requires: #('Metacello-TestsMC') ];
package: 'Metacello-TestsMCB'
Expand Down Expand Up @@ -109,9 +111,9 @@ baseline: spec
yourself ].
spec
for: #(#'pharo1.x' #'pharo2.x')
do: [
self filetree: spec.
self gofer: spec.
do: [
self filetree: spec.
self gofer: spec.
spec
project: 'ProfStef'
with: [
Expand All @@ -127,10 +129,8 @@ baseline: spec
repository: 'http://seaside.gemtalksystems.com/ss/metacello' ];
yourself.
spec
package: 'Metacello-MC'
with: [ spec requires: #('Gofer') ];
package: 'Metacello-TestsMC'
with: [ spec requires: #('Gofer Tests') ];
package: 'Metacello-MC' with: [ spec requires: #('Gofer') ];
package: 'Metacello-TestsMC' with: [ spec requires: #('Gofer Tests') ];
package: 'Metacello-ProfStef'
with: [ spec requires: #('Metacello-Core' 'ProfStef' 'Metacello-ToolBox') ];
package: 'Metacello-TestsProfStef'
Expand Down Expand Up @@ -201,13 +201,11 @@ baseline: spec
spec
for: #(#'pharo3.x' #'pharo4.x' #'pharo5.x')
do: [
self filetree: spec.
self gofer: spec.
self filetree: spec.
self gofer: spec.
spec
package: 'Metacello-MC'
with: [ spec requires: #('Gofer') ];
package: 'Metacello-TestsMC'
with: [ spec requires: #('Gofer Tests') ];
package: 'Metacello-MC' with: [ spec requires: #('Gofer') ];
package: 'Metacello-TestsMC' with: [ spec requires: #('Gofer Tests') ];
package: 'Metacello-PharoCommonPlatform'
with: [ spec requires: #('Metacello-MC') ];
package: 'Metacello-Platform'
Expand All @@ -222,10 +220,12 @@ baseline: spec
for: #(#'pharo6.x' #'pharo7.x')
do: [
spec
package: 'Metacello-MC'
with: [ spec requires: #('Metacello-Core') ];
package: 'Metacello-MC' with: [ spec requires: #('Metacello-Core') ];
package: 'Metacello-TestsMC'
with: [ spec requires: #('Metacello-MC' 'Metacello-ToolBox' 'Metacello-GitHub' 'Metacello-Bitbucket' 'Metacello-TestsMCResources') ];
with: [
spec
requires:
#('Metacello-MC' 'Metacello-ToolBox' 'Metacello-GitHub' 'Metacello-Bitbucket' 'Metacello-TestsMCResources') ];
package: 'Metacello-PharoCommonPlatform'
with: [ spec requires: #('Metacello-MC') ];
package: 'Metacello-Platform'
Expand Down Expand Up @@ -271,44 +271,40 @@ baseline: spec
with: [ spec repository: 'github://dalehenrich/filetree:squeak4.3/repository' ];
yourself.
spec
package: 'Metacello-MC'
with: [ spec requires: #('Gofer') ];
package: 'Metacello-TestsMC'
with: [ spec requires: #('Gofer Tests') ];
package: 'Metacello-MC' with: [ spec requires: #('Gofer') ];
package: 'Metacello-TestsMC' with: [ spec requires: #('Gofer Tests') ];
package: 'Metacello-Platform'
with: [
spec file: 'Metacello-Platform.squeak'; requires: #('Ston') ];
yourself ].
spec
for: #( #'squeak4.1.x' #'squeak4.2.x' #'squeak4.3.x' #'squeak4.4.x' #'squeak4.5.x' )
for:
#(#'squeak4.1.x' #'squeak4.2.x' #'squeak4.3.x' #'squeak4.4.x' #'squeak4.5.x')
do: [
spec
configuration: 'WebClient'
with: [
spec
loads: #('Core');
repository: 'http://www.squeaksource.com/MetacelloRepository';
repository: 'http://ss3.gemtalksystems.com/ss/WebClient' ].
with: [
spec
loads: #('Core');
repository: 'http://www.squeaksource.com/MetacelloRepository';
repository: 'http://ss3.gemtalksystems.com/ss/WebClient' ].
spec
package: 'SqueakSSL-Core'
with: [spec repository: 'http://www.squeaksource.com/SqueakSSL'];
with: [ spec repository: 'http://www.squeaksource.com/SqueakSSL' ];
package: 'Metacello-Platform'
with: [ spec requires: #('WebClient' 'SqueakSSL-Core') ];
yourself ].

spec
for: #'gemstone'
do: [
self filetree: spec.
self gofer: spec.
self filetree: spec.
self gofer: spec.
spec
baseline: 'FileTree'
with: [ spec repository: 'github://dalehenrich/filetree:gemstone2.4/repository' ].
spec
package: 'Metacello-MC'
with: [ spec requires: #('Gofer') ];
package: 'Metacello-TestsMC'
with: [ spec requires: #('Gofer Tests') ];
package: 'Metacello-MC' with: [ spec requires: #('Gofer') ];
package: 'Metacello-TestsMC' with: [ spec requires: #('Gofer Tests') ];
package: 'Metacello-Platform'
with: [
spec
Expand Down Expand Up @@ -345,4 +341,16 @@ baseline: spec
with: [ spec requires: 'Metacello-Platform' ];
package: 'Metacello-Platform'
with: [ spec includes: 'Metacello-GS3x-Platform' ];
yourself ]
yourself ].
spec
for: #'gs3.3.x'
do: [
spec
package: 'Metacello-Platform'
with: [ spec includes: #('Metacello-GS3x-Platform' 'Metacello-Platform3x') ];
package: 'Metacello-Platform3x'
with: [
spec
requires: 'Metacello-Platform';
postLoadDoIt: #'gemstoneMetacelloGemStonePlatform3xInit' ];
yourself ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
doits
gemstoneMetacelloGemStonePlatform3xInit
(Smalltalk at: #'MetacelloGemStonePlatform3x') select
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SystemOrganization addCategory: #BaselineOfMetacello!
SystemOrganization addCategory: #'BaselineOfMetacello'!

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ projectDirectoryFrom: projectPath version: versionString
directory := mcPlatform
directoryFromPath: (cachePath := archive members first fileName)
relativeTo: theCacheDirectory.
archive close.
false
ifTrue: [
"temporary patch for https://github.com/Metacello/metacello/issues/504"
archive close ].
directory exists
ifTrue: [ mcPlatform deleteFileNamed: zipFileName ]
ifFalse: [ mcPlatform
Expand All @@ -44,4 +47,4 @@ projectDirectoryFrom: projectPath version: versionString
projectDirectory := mcPlatform
directoryFromPath: cachePath
relativeTo: theCacheDirectory ].
^ projectDirectory
^ projectDirectory
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ initialize-release
initialize
"self initialize"

self select.
SystemLoginNotification subscribe: self name.
self sessionStart
Smalltalk
at: #'MetacelloGemStonePlatform3x'
ifAbsent: [
self select.
SystemLoginNotification subscribe: self name.
self sessionStart ]
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,10 @@ downloadJSON: url eTagsCache: eTagsCache eTagsKey: eTagsKey username: username p

"To minimize GitHub rate limiting problems, we are caching the ETags for the tag request: https://developer.github.com/v3/#conditional-requests"

| jsonFileName errorFileName jsonFile eTagsUrl eTagInfo errorBlock |
| jsonFileName errorFileName jsonFile eTagsUrl errorBlock etagInfo |
jsonFileName := self tempFileFor: 'tags-' , self processPID suffix: '.json'.
eTagsUrl := url.
eTagsCache
ifNotNil: [
eTagsCache
at: eTagsKey
ifPresent: [ :info |
| etag |
etag := info at: 'ETag' ifAbsent: [ '1234' ].
eTagsUrl := eTagsUrl , ' -H ''If-None-Match: ' , etag , ''''.
eTagInfo := info ]
ifAbsent: [
eTagInfo := Dictionary new.
eTagsCache at: eTagsKey put: eTagInfo ] ].
etagInfo := eTagsCache at: eTagsKey ifAbsentPut: [ Dictionary new ].
errorFileName := self
downloadBasicFile: eTagsUrl
to: jsonFileName
Expand Down Expand Up @@ -48,38 +37,30 @@ downloadJSON: url eTagsCache: eTagsCache eTagsKey: eTagsKey username: username p
ifNil: [ ^ MCFileTreeJsonParser parse: fileStream contents ]
ifNotNil: [
self
extractHTTPHeader: (ReadStream on: fileStream contents)
extractHTTPHeader: (ReadStreamPortable on: fileStream contents)
do: [ :headerDict :payload |
| status |
status := headerDict at: 'Status'.
| status tag |
status := headerDict at: 'status' ifAbsent: [ '403' ].
(status beginsWith: '200')
ifTrue: [
| jsonObject |
"cached info is not valid"
jsonObject := MCFileTreeJsonParser parse: payload.
eTagInfo
at: 'ETag'
put: (headerDict at: 'ETag' ifAbsent: [ '1234' ]);
at: 'Last-Modified' put: (headerDict at: 'Last-Modified');
tag := headerDict at: 'etag'.
(tag beginsWith: 'W/')
ifTrue: [ tag := tag copyFrom: 3 to: tag size ]
ifFalse: [ tag := tag copyFrom: 1 to: tag size ].
etagInfo
at: 'ETag' put: tag;
at: 'last-modified' put: (headerDict at: 'last-modified');
at: 'jsonObject' put: jsonObject;
at: 'X-RateLimit-Remaining'
put: (headerDict at: 'X-RateLimit-Remaining');
at: 'X-Ratelimit-Remaining'
put: (headerDict at: 'X-Ratelimit-Remaining');
yourself.
self deleteFileNamed: errorFileName.
^ jsonObject ].
(status beginsWith: '304')
ifTrue: [
"eTagCache hit ... need to know if data still valid"
eTagInfo
at: 'X-RateLimit-Remaining'
put: (headerDict at: 'X-RateLimit-Remaining').
self deleteFileNamed: errorFileName.
^ self
downloadJSONIfModified: url
eTagInfo: eTagInfo
username: username
pass: pass
onError: errorBlock ].
ifTrue: [ ^ etagInfo at: 'jsonObject' ifAbsent: [ MCFileTreeJsonParser parse: payload ] ].
(status beginsWith: '403')
ifTrue: [
| jsonObject |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ downloadJSONIfModified: url eTagInfo: eTagInfo username: username pass: pass onE

| jsonFileName errorFileName jsonFile eTagsUrl |
jsonFileName := self tempFileFor: 'tagsIM-' , self processPID suffix: 'json'.
eTagsUrl := url , ' -H "If-Modified-Since: ' , (eTagInfo at: 'Last-Modified')
eTagsUrl := url , ' -H "If-Modified-Since: ' , (eTagInfo at: 'last-modified')
, '"'.
errorFileName := self
downloadBasicFile: eTagsUrl
Expand All @@ -23,26 +23,26 @@ downloadJSONIfModified: url eTagInfo: eTagInfo username: username pass: pass onE
extractHTTPHeader: (ReadStream on: fileStream contents)
do: [ :headerDict :payload |
| status |
status := headerDict at: 'Status'.
status := headerDict at: 'status'.
(status beginsWith: '200')
ifTrue: [
| jsonObject |
"Last-Modified date changed"
jsonObject := MCFileTreeJsonParser parse: payload.
eTagInfo
at: 'Last-Modified' put: (headerDict at: 'Last-Modified');
at: 'last-modified' put: (headerDict at: 'last-modified');
at: 'jsonObject' put: jsonObject;
at: 'X-RateLimit-Remaining'
put: (headerDict at: 'X-RateLimit-Remaining');
at: 'X-Ratelimit-Remaining'
put: (headerDict at: 'X-Ratelimit-Remaining');
yourself.
self deleteFileNamed: errorFileName.
^ jsonObject ].
(status beginsWith: '304')
ifTrue: [
"eTagCache hit ... need to know if data still valid"
eTagInfo
at: 'X-RateLimit-Remaining'
put: (headerDict at: 'X-RateLimit-Remaining').
at: 'X-Ratelimit-Remaining'
put: (headerDict at: 'X-Ratelimit-Remaining').
self deleteFileNamed: errorFileName.
^ eTagInfo at: 'jsonObject' ].
(status beginsWith: '403')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"class" : {
"initialize" : "dkh 05/14/2014 06:34",
"initialize" : "dkh 07/02/2020 12:49",
"registerForNotifications" : "dkh 05/13/2014 21:29",
"sessionStart" : "dkh 05/13/2014 21:36" },
"instance" : {
Expand All @@ -16,12 +16,12 @@
"downloadBasicFile:to:" : "dkh 10/15/2014 17:04",
"downloadBasicFile:to:includeHTTPHeader:username:pass:" : "dkh 03/18/2015 05:21",
"downloadBasicFile:to:username:pass:" : "dkh 03/18/2015 05:21",
"downloadJSON:eTagsCache:eTagsKey:username:pass:" : "dkh 07/28/2016 17:19",
"downloadJSON:eTagsCache:eTagsKey:username:pass:" : "dkh 07/02/2020 17:53",
"downloadJSON:username:pass:" : "dkh 03/18/2015 06:44",
"downloadJSONIfModified:eTagInfo:username:pass:onError:" : "dkh 07/28/2016 17:20",
"downloadJSONIfModified:eTagInfo:username:pass:onError:" : "dkh 07/02/2020 11:53",
"downloadZipArchive:to:" : "dkh 10/14/2014 10:51",
"extractAtrributesFrom:" : "dkh 10/10/2016 14:56",
"extractHTTPHeader:do:" : "dkh 03/18/2015 06:05",
"extractHTTPHeader:do:" : "dkh 07/02/2020 11:55",
"extractRepositoryFrom:to:" : "dkh 05/28/2015 09:39",
"extractTypeFromDescription:" : "dkh 03/23/2013 08:54",
"fileDirectoryClass" : "dkh 07/09/2012 04:46",
Expand Down

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions repository/Metacello-Platform3x.package/.filetree
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"noMethodMetaData" : true,
"separateMethodMetaAndSource" : false,
"useCypressPropertiesFile" : true }
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
initialize-release
initialize
"self initialize"

self select.
SystemLoginNotification subscribe: self name.
self sessionStart
Loading

0 comments on commit eecb483

Please sign in to comment.