From e39fa339b2171c5cad1e33f72dba831041845cf4 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Fri, 29 Oct 2021 14:26:23 +0200 Subject: [PATCH 01/30] Increase the default for ZnClient>>#maxNumberOfRedirects from 3 to 5 --- .../ZnClient.class/instance/maxNumberOfRedirects.st | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/maxNumberOfRedirects.st b/repository/Zinc-HTTP.package/ZnClient.class/instance/maxNumberOfRedirects.st index 84a80bb1..9b28c1e5 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/maxNumberOfRedirects.st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/maxNumberOfRedirects.st @@ -3,6 +3,6 @@ maxNumberOfRedirects "Return the maximum number of HTTP redirect that will be followed. Note that when the #followsRedirect option is false, no redirects will ever be followed regardless of the value of this option. - Defaults to 3. A ZnTooManyRedirects will be signalled when the count reaches zero." + Defaults to 5. A ZnTooManyRedirects will be signalled when the count reaches zero." - ^ self optionAt: #maxNumberOfRedirects ifAbsent: [ 3 ] \ No newline at end of file + ^ self optionAt: #maxNumberOfRedirects ifAbsent: [ 5 ] \ No newline at end of file From d9fe41707b16748b9340540127ec5d77800856b6 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Wed, 3 Nov 2021 17:04:27 +0100 Subject: [PATCH 02/30] Add some more options regarding the use of userAgentSession in ZnClient --- .../ZnClient.class/instance/resetCredentials.st | 3 +++ .../Zinc-HTTP.package/ZnClient.class/instance/session..st | 6 ++++++ .../Zinc-HTTP.package/ZnClient.class/instance/session.st | 2 +- .../Zinc-HTTP.package/ZnUserAgentSession.class/README.md | 2 ++ .../ZnUserAgentSession.class/instance/resetCredentials.st | 3 +++ .../ZnUserAgentSession.class/properties.json | 2 +- 6 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 repository/Zinc-HTTP.package/ZnClient.class/instance/resetCredentials.st create mode 100644 repository/Zinc-HTTP.package/ZnClient.class/instance/session..st create mode 100644 repository/Zinc-HTTP.package/ZnUserAgentSession.class/instance/resetCredentials.st diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/resetCredentials.st b/repository/Zinc-HTTP.package/ZnClient.class/instance/resetCredentials.st new file mode 100644 index 00000000..db0dc8cf --- /dev/null +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/resetCredentials.st @@ -0,0 +1,3 @@ +accessing +resetCredentials + session ifNotNil: [ session resetCredentials ] \ No newline at end of file diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/session..st b/repository/Zinc-HTTP.package/ZnClient.class/instance/session..st new file mode 100644 index 00000000..092a646e --- /dev/null +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/session..st @@ -0,0 +1,6 @@ +accessing +session: userAgentSession + "Set the current HTTP session object that I am using. + This session object holds cookies and credentials." + + session := userAgentSession \ No newline at end of file diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/session.st b/repository/Zinc-HTTP.package/ZnClient.class/instance/session.st index 7ee8f91f..9ed3f203 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/session.st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/session.st @@ -1,6 +1,6 @@ accessing session "Return the current HTTP session object that I am using. - This session object holds cookies among other things." + This session object holds cookies and credentials." ^ session ifNil: [ session := ZnUserAgentSession new ] \ No newline at end of file diff --git a/repository/Zinc-HTTP.package/ZnUserAgentSession.class/README.md b/repository/Zinc-HTTP.package/ZnUserAgentSession.class/README.md index de24efaf..57d53e42 100644 --- a/repository/Zinc-HTTP.package/ZnUserAgentSession.class/README.md +++ b/repository/Zinc-HTTP.package/ZnUserAgentSession.class/README.md @@ -2,4 +2,6 @@ I represent a session store for an HTTP client instance of ZnUserAgent. I hold the cookie jar for the session and any authentication credentials used by the client. +Obviously, care should be taken when sharing or reusing my contents. + Part of Zinc HTTP Components. \ No newline at end of file diff --git a/repository/Zinc-HTTP.package/ZnUserAgentSession.class/instance/resetCredentials.st b/repository/Zinc-HTTP.package/ZnUserAgentSession.class/instance/resetCredentials.st new file mode 100644 index 00000000..c632129a --- /dev/null +++ b/repository/Zinc-HTTP.package/ZnUserAgentSession.class/instance/resetCredentials.st @@ -0,0 +1,3 @@ +operations +resetCredentials + credentials ifNotNil: [ credentials removeAll ] \ No newline at end of file diff --git a/repository/Zinc-HTTP.package/ZnUserAgentSession.class/properties.json b/repository/Zinc-HTTP.package/ZnUserAgentSession.class/properties.json index a29fdec4..d920173c 100644 --- a/repository/Zinc-HTTP.package/ZnUserAgentSession.class/properties.json +++ b/repository/Zinc-HTTP.package/ZnUserAgentSession.class/properties.json @@ -1,5 +1,5 @@ { - "commentStamp" : "", + "commentStamp" : "SvenVanCaekenberghe 11/3/2021 17:03", "super" : "Object", "category" : "Zinc-HTTP-Support", "classinstvars" : [ ], From 24f5871676fd6877f7769bb50e149aa4913a959a Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Thu, 11 Nov 2021 12:06:17 +0100 Subject: [PATCH 03/30] Extend ZnUrl parsing to allow the simplified file:/home/user/file.txt form by introducing #schemesOptionallyNotUsingDoubleSlash so that these URLs are still printed using the more common/standard file:/// form Extend a couple of unit tests See also https://github.com/pharo-project/pharo/issues/10328 --- .../class/schemesOptionallyNotUsingDoubleSlash.st | 6 ++++++ .../instance/isSchemeNotUsingDoubleSlash..st | 3 ++- .../instance/testAsFileReferenceNoDoubleSlash.st | 9 +++++++++ .../ZnUrlTest.class/instance/testFileUrl.st | 12 ++++++++++-- 4 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/class/schemesOptionallyNotUsingDoubleSlash.st create mode 100644 repository/Zinc-Resource-Meta-Tests.package/ZnFileUrlTest.class/instance/testAsFileReferenceNoDoubleSlash.st diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/class/schemesOptionallyNotUsingDoubleSlash.st b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/class/schemesOptionallyNotUsingDoubleSlash.st new file mode 100644 index 00000000..24dc401b --- /dev/null +++ b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/class/schemesOptionallyNotUsingDoubleSlash.st @@ -0,0 +1,6 @@ +accessing +schemesOptionallyNotUsingDoubleSlash + "Most URL schemes use a double slash, as in http:// + but some optionally don't, return a list of those" + + ^ #( #file ) \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/isSchemeNotUsingDoubleSlash..st b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/isSchemeNotUsingDoubleSlash..st index 42f9572f..3460afaa 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/isSchemeNotUsingDoubleSlash..st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/isSchemeNotUsingDoubleSlash..st @@ -1,3 +1,4 @@ private isSchemeNotUsingDoubleSlash: schemeString - ^ self class schemesNotUsingDoubleSlash includes: schemeString asLowercase \ No newline at end of file + ^ self class schemesNotUsingDoubleSlash , self class schemesOptionallyNotUsingDoubleSlash + includes: schemeString asLowercase \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Tests.package/ZnFileUrlTest.class/instance/testAsFileReferenceNoDoubleSlash.st b/repository/Zinc-Resource-Meta-Tests.package/ZnFileUrlTest.class/instance/testAsFileReferenceNoDoubleSlash.st new file mode 100644 index 00000000..9afc00c6 --- /dev/null +++ b/repository/Zinc-Resource-Meta-Tests.package/ZnFileUrlTest.class/instance/testAsFileReferenceNoDoubleSlash.st @@ -0,0 +1,9 @@ +testing +testAsFileReferenceNoDoubleSlash + | fileUrl fileReference | + fileUrl := 'file:/foo/bar/test.txt' asZnUrl. + self assert: fileUrl asString equals: 'file:///foo/bar/test.txt'. + fileReference := fileUrl asFileReference. + self assert: fileReference basename equals: 'test.txt'. + self assert: fileReference pathSegments asArray equals: #( 'foo' 'bar' 'test.txt' ). + self assert: fileReference isAbsolute. \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testFileUrl.st b/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testFileUrl.st index 50af4b8a..1be15f9d 100644 --- a/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testFileUrl.st +++ b/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testFileUrl.st @@ -1,7 +1,15 @@ testing testFileUrl | url | - url := 'file://localhost/users/Sven/Desktop/foo.txt' asZnUrl. + url := 'file://localhost/Users/Sven/Desktop/foo.txt' asZnUrl. self assert: url isFile. self assert: url host equals: 'localhost'. - self assert: url pathSegments equals: #( 'users' 'Sven' 'Desktop' 'foo.txt' ) asOrderedCollection \ No newline at end of file + self assert: url pathSegments equals: #( 'Users' 'Sven' 'Desktop' 'foo.txt' ) asOrderedCollection. + url := 'file:///Users/Sven/Desktop/foo.txt' asZnUrl. + self assert: url isFile. + self deny: url hasHost. + self assert: url pathSegments equals: #( 'Users' 'Sven' 'Desktop' 'foo.txt' ) asOrderedCollection. + url := 'file:/Users/Sven/Desktop/foo.txt' asZnUrl. + self assert: url isFile. + self deny: url hasHost. + self assert: url pathSegments equals: #( 'Users' 'Sven' 'Desktop' 'foo.txt' ) asOrderedCollection \ No newline at end of file From 6046f96176cad79cdc10320511bb378076912826 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Fri, 26 Nov 2021 18:21:19 +0100 Subject: [PATCH 04/30] Update some extension protocols to proper casing See also https://github.com/pharo-project/pharo/issues/10360 --- .../ZnUrl.extension/instance/retrieveContents.st | 2 +- .../ZnUrl.extension/instance/saveContentsToFile..st | 2 +- .../AbsolutePath.extension/instance/asUrl.st | 2 +- .../AbsolutePath.extension/instance/asZnUrl.st | 2 +- .../AbstractFileReference.extension/instance/asUrl.st | 2 +- .../AbstractFileReference.extension/instance/asZnUrl.st | 2 +- .../Collection.extension/instance/addedToZnUrl..st | 2 +- .../String.extension/instance/addedToZnUrl..st | 2 +- .../String.extension/instance/asUrl.st | 2 +- .../String.extension/instance/asZnMimeType.st | 2 +- .../String.extension/instance/asZnUrl.st | 2 +- .../ZnUrl.class/instance/asFileReference.st | 2 +- .../ZnUrlTest.extension/instance/testRetrieveContents.st | 2 +- .../ZnUrlTest.extension/instance/testSaveContentsToFile.st | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/repository/Zinc-HTTP.package/ZnUrl.extension/instance/retrieveContents.st b/repository/Zinc-HTTP.package/ZnUrl.extension/instance/retrieveContents.st index 80049073..038c82e0 100644 --- a/repository/Zinc-HTTP.package/ZnUrl.extension/instance/retrieveContents.st +++ b/repository/Zinc-HTTP.package/ZnUrl.extension/instance/retrieveContents.st @@ -1,4 +1,4 @@ -*zinc-http +*Zinc-HTTP retrieveContents "Download and return the resource that I refer to. This will typically return a String or a ByteArray. diff --git a/repository/Zinc-HTTP.package/ZnUrl.extension/instance/saveContentsToFile..st b/repository/Zinc-HTTP.package/ZnUrl.extension/instance/saveContentsToFile..st index 457c19f8..ca16d10e 100644 --- a/repository/Zinc-HTTP.package/ZnUrl.extension/instance/saveContentsToFile..st +++ b/repository/Zinc-HTTP.package/ZnUrl.extension/instance/saveContentsToFile..st @@ -1,4 +1,4 @@ -*zinc-http +*Zinc-HTTP saveContentsToFile: aFilename "Download and return a fileReference to the resource that I refer to. diff --git a/repository/Zinc-Resource-Meta-Core.package/AbsolutePath.extension/instance/asUrl.st b/repository/Zinc-Resource-Meta-Core.package/AbsolutePath.extension/instance/asUrl.st index a42ee761..e374eaf7 100644 --- a/repository/Zinc-Resource-Meta-Core.package/AbsolutePath.extension/instance/asUrl.st +++ b/repository/Zinc-Resource-Meta-Core.package/AbsolutePath.extension/instance/asUrl.st @@ -1,4 +1,4 @@ -*zinc-resource-meta-core +*Zinc-Resource-Meta-Core asUrl "Convert the receiver in a file:// ZnUrl" diff --git a/repository/Zinc-Resource-Meta-Core.package/AbsolutePath.extension/instance/asZnUrl.st b/repository/Zinc-Resource-Meta-Core.package/AbsolutePath.extension/instance/asZnUrl.st index 79920eea..9b4ce457 100644 --- a/repository/Zinc-Resource-Meta-Core.package/AbsolutePath.extension/instance/asZnUrl.st +++ b/repository/Zinc-Resource-Meta-Core.package/AbsolutePath.extension/instance/asZnUrl.st @@ -1,4 +1,4 @@ -*zinc-resource-meta-core +*Zinc-Resource-Meta-Core asZnUrl "Convert the receiver in a file:// ZnUrl" diff --git a/repository/Zinc-Resource-Meta-Core.package/AbstractFileReference.extension/instance/asUrl.st b/repository/Zinc-Resource-Meta-Core.package/AbstractFileReference.extension/instance/asUrl.st index b5ae22d9..cc934bcc 100644 --- a/repository/Zinc-Resource-Meta-Core.package/AbstractFileReference.extension/instance/asUrl.st +++ b/repository/Zinc-Resource-Meta-Core.package/AbstractFileReference.extension/instance/asUrl.st @@ -1,4 +1,4 @@ -*zinc-resource-meta-core +*Zinc-Resource-Meta-Core asUrl "Convert the receiver in a file:// ZnUrl. Only an absolute path can be represented as a file:// URL" diff --git a/repository/Zinc-Resource-Meta-Core.package/AbstractFileReference.extension/instance/asZnUrl.st b/repository/Zinc-Resource-Meta-Core.package/AbstractFileReference.extension/instance/asZnUrl.st index 406d0475..f3cb5846 100644 --- a/repository/Zinc-Resource-Meta-Core.package/AbstractFileReference.extension/instance/asZnUrl.st +++ b/repository/Zinc-Resource-Meta-Core.package/AbstractFileReference.extension/instance/asZnUrl.st @@ -1,4 +1,4 @@ -*zinc-resource-meta-core +*Zinc-Resource-Meta-Core asZnUrl "Convert the receiver in a file:// ZnUrl. Only an absolute path can be represented as a file:// URL" diff --git a/repository/Zinc-Resource-Meta-Core.package/Collection.extension/instance/addedToZnUrl..st b/repository/Zinc-Resource-Meta-Core.package/Collection.extension/instance/addedToZnUrl..st index 3362e47d..d7430084 100644 --- a/repository/Zinc-Resource-Meta-Core.package/Collection.extension/instance/addedToZnUrl..st +++ b/repository/Zinc-Resource-Meta-Core.package/Collection.extension/instance/addedToZnUrl..st @@ -1,3 +1,3 @@ -*zinc-resource-meta-core +*Zinc-Resource-Meta-Core addedToZnUrl: url ^ url withPathSegments: self \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Core.package/String.extension/instance/addedToZnUrl..st b/repository/Zinc-Resource-Meta-Core.package/String.extension/instance/addedToZnUrl..st index c235cdf2..739554a9 100644 --- a/repository/Zinc-Resource-Meta-Core.package/String.extension/instance/addedToZnUrl..st +++ b/repository/Zinc-Resource-Meta-Core.package/String.extension/instance/addedToZnUrl..st @@ -1,4 +1,4 @@ -*zinc-resource-meta-core +*Zinc-Resource-Meta-Core addedToZnUrl: url | segments | segments := self findTokens: '/'. diff --git a/repository/Zinc-Resource-Meta-Core.package/String.extension/instance/asUrl.st b/repository/Zinc-Resource-Meta-Core.package/String.extension/instance/asUrl.st index 20e4afdd..9bc1d7ce 100644 --- a/repository/Zinc-Resource-Meta-Core.package/String.extension/instance/asUrl.st +++ b/repository/Zinc-Resource-Meta-Core.package/String.extension/instance/asUrl.st @@ -1,3 +1,3 @@ -*zinc-resource-meta-core +*Zinc-Resource-Meta-Core asUrl ^ self asZnUrl \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Core.package/String.extension/instance/asZnMimeType.st b/repository/Zinc-Resource-Meta-Core.package/String.extension/instance/asZnMimeType.st index 0c95ecdb..b49f16cc 100644 --- a/repository/Zinc-Resource-Meta-Core.package/String.extension/instance/asZnMimeType.st +++ b/repository/Zinc-Resource-Meta-Core.package/String.extension/instance/asZnMimeType.st @@ -1,3 +1,3 @@ -*zinc-resource-meta-core +*Zinc-Resource-Meta-Core asZnMimeType ^ ZnMimeType fromString: self \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Core.package/String.extension/instance/asZnUrl.st b/repository/Zinc-Resource-Meta-Core.package/String.extension/instance/asZnUrl.st index 8fa4cd9a..10334492 100644 --- a/repository/Zinc-Resource-Meta-Core.package/String.extension/instance/asZnUrl.st +++ b/repository/Zinc-Resource-Meta-Core.package/String.extension/instance/asZnUrl.st @@ -1,3 +1,3 @@ -*zinc-resource-meta-core +*Zinc-Resource-Meta-Core asZnUrl ^ ZnUrl fromString: self \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/asFileReference.st b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/asFileReference.st index 122eaa98..cfedf7ea 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/asFileReference.st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/asFileReference.st @@ -1,4 +1,4 @@ -*zinc-resource-meta-core +converting asFileReference "Convert the receiver into a new FileReference object. Note that for a FileReference a trailing slash is not relevant" diff --git a/repository/Zinc-Tests.package/ZnUrlTest.extension/instance/testRetrieveContents.st b/repository/Zinc-Tests.package/ZnUrlTest.extension/instance/testRetrieveContents.st index 47fc30e3..e52cef4b 100644 --- a/repository/Zinc-Tests.package/ZnUrlTest.extension/instance/testRetrieveContents.st +++ b/repository/Zinc-Tests.package/ZnUrlTest.extension/instance/testRetrieveContents.st @@ -1,4 +1,4 @@ -*zinc-tests +*Zinc-Tests testRetrieveContents | numbers | numbers := 'http://zn.stfx.eu/zn/numbers.txt' asZnUrl retrieveContents. diff --git a/repository/Zinc-Tests.package/ZnUrlTest.extension/instance/testSaveContentsToFile.st b/repository/Zinc-Tests.package/ZnUrlTest.extension/instance/testSaveContentsToFile.st index 3cdf334a..9eede5df 100644 --- a/repository/Zinc-Tests.package/ZnUrlTest.extension/instance/testSaveContentsToFile.st +++ b/repository/Zinc-Tests.package/ZnUrlTest.extension/instance/testSaveContentsToFile.st @@ -1,4 +1,4 @@ -*zinc-tests +*Zinc-Tests testSaveContentsToFile | url target result numbers | url := 'http://zn.stfx.eu/zn/numbers.txt' asZnUrl. From df181e9bae09e15d2377011aedc792323dd67070 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Mon, 13 Dec 2021 15:24:59 +0100 Subject: [PATCH 05/30] Make #queryKeyValueSafeSet a znOption to allow dynamic overrides. Improve the documentation of ZnOption and ZnUrl percent encoding. --- .../ZnOptions.class/README.md | 24 ++++++++++++++++++- .../ZnOptions.class/class/initialize.st | 2 +- .../ZnOptions.class/class/myOption.st | 8 +++++++ .../class/queryKeyValueSafeSet.st | 15 ++++++++++++ .../ZnOptions.class/properties.json | 2 +- .../class/queryKeyValueSafeSet.st | 8 +++---- .../ZnUrl.class/instance/encode.on..st | 3 +++ ...codeQuery.on..st => encodeFragment.on..st} | 4 +++- .../ZnUrl.class/instance/encodePath.on..st | 2 ++ .../instance/encodeQueryFields.on..st | 5 ++++ .../instance/printPathQueryFragmentOn..st | 2 +- .../ZnUrl.class/instance/printQueryOn..st | 2 +- 12 files changed, 66 insertions(+), 11 deletions(-) create mode 100644 repository/Zinc-HTTP.package/ZnOptions.class/class/myOption.st create mode 100644 repository/Zinc-HTTP.package/ZnOptions.class/class/queryKeyValueSafeSet.st rename repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/{encodeQuery.on..st => encodeFragment.on..st} (52%) create mode 100644 repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/encodeQueryFields.on..st diff --git a/repository/Zinc-HTTP.package/ZnOptions.class/README.md b/repository/Zinc-HTTP.package/ZnOptions.class/README.md index 68401239..5400df6d 100644 --- a/repository/Zinc-HTTP.package/ZnOptions.class/README.md +++ b/repository/Zinc-HTTP.package/ZnOptions.class/README.md @@ -1 +1,23 @@ -I am ZnOptions, a object that holds key/value options for configuration, parametrization and settings. \ No newline at end of file +I am ZnOptions, a object that holds key/value options for configuration, parameterization and settings. + +Option objects contain key/value pairs and inherit from a parent. +They can be writeable or readonly. + +Clients typically refer to option using the ZnCurrentOptions dynamic variable. + + ZnCurrentOptions at: #myOption + +The top level, global default is typically on my class side marked by the pragma. + +I hold the #globalDefault options. + +Options can be cloned to make them writeable. + +Options can changed and activated using #during: + +ZnOptions globalDefault clone + at: #myOption put: 'newValue'; + during: [ ZnCurrentOptions at: #myOption ]. + +ZnClient and ZnServer instances hold and apply their own local options. +They use or #conditionallyDuring: to allow an enclosing #during: to take precedence. diff --git a/repository/Zinc-HTTP.package/ZnOptions.class/class/initialize.st b/repository/Zinc-HTTP.package/ZnOptions.class/class/initialize.st index ca45f3b5..9c3db81d 100644 --- a/repository/Zinc-HTTP.package/ZnOptions.class/class/initialize.st +++ b/repository/Zinc-HTTP.package/ZnOptions.class/class/initialize.st @@ -1,5 +1,5 @@ class initialization initialize - "Changed at 2021-10-09" + "Changed at 2021-12-13" self resetGlobalDefault \ No newline at end of file diff --git a/repository/Zinc-HTTP.package/ZnOptions.class/class/myOption.st b/repository/Zinc-HTTP.package/ZnOptions.class/class/myOption.st new file mode 100644 index 00000000..bf0425bf --- /dev/null +++ b/repository/Zinc-HTTP.package/ZnOptions.class/class/myOption.st @@ -0,0 +1,8 @@ +options +myOption + "This is an example option. + This class side method defines the option and its global default value" + + + + ^ 'myOptionDefaultValue' \ No newline at end of file diff --git a/repository/Zinc-HTTP.package/ZnOptions.class/class/queryKeyValueSafeSet.st b/repository/Zinc-HTTP.package/ZnOptions.class/class/queryKeyValueSafeSet.st new file mode 100644 index 00000000..c400574d --- /dev/null +++ b/repository/Zinc-HTTP.package/ZnOptions.class/class/queryKeyValueSafeSet.st @@ -0,0 +1,15 @@ +options +queryKeyValueSafeSet + "When encoding the key/value pairs of a URL or form-url-encoded entity, + the characters part of this safe set are not percent encoded. + Some servers expect more characters to be percent encoded, some less, + in which case this option can be modified." + + + + ^ 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.~!$''()*,;:@/?' + + "When a query is interpreted as a list of key=value&.. pairs, + it is better to encode = and & and leave them out of the safe set. + Furthermore, since + is interpreted as space in the query part, + it is unsafe as well. This is a restriction of #querySafeSet" \ No newline at end of file diff --git a/repository/Zinc-HTTP.package/ZnOptions.class/properties.json b/repository/Zinc-HTTP.package/ZnOptions.class/properties.json index 988e1be7..b303d1cf 100644 --- a/repository/Zinc-HTTP.package/ZnOptions.class/properties.json +++ b/repository/Zinc-HTTP.package/ZnOptions.class/properties.json @@ -1,5 +1,5 @@ { - "commentStamp" : "SvenVanCaekenberghe 1/11/2019 23:48", + "commentStamp" : "SvenVanCaekenberghe 12/13/2021 14:58", "super" : "Object", "category" : "Zinc-HTTP-Support", "classinstvars" : [ ], diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnResourceMetaUtils.class/class/queryKeyValueSafeSet.st b/repository/Zinc-Resource-Meta-Core.package/ZnResourceMetaUtils.class/class/queryKeyValueSafeSet.st index a8134832..9a5e0c35 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnResourceMetaUtils.class/class/queryKeyValueSafeSet.st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnResourceMetaUtils.class/class/queryKeyValueSafeSet.st @@ -1,8 +1,6 @@ accessing queryKeyValueSafeSet - "When a query is interpreted as a list of key=value&.. pairs, - it is better to encode = and & and leave them out of the safe set. - Furthermore, since + is interpreted as space in the query part, - it is unsafe as well. This is a restriction of #querySafeSet" + "There is a tension between encoding as much as possible and leaving as much characters unencoded + as allowed by the specifications. Since there is no single best answer, this became an option." - ^ 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.~!$''()*,;:@/?' \ No newline at end of file + ^ ZnCurrentOptions at: #queryKeyValueSafeSet \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/encode.on..st b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/encode.on..st index eab6ed3d..a7ef7c11 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/encode.on..st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/encode.on..st @@ -1,3 +1,6 @@ private encode: string on: stream + "Percent encode string on stream, using the smallest possible safe set. + This is used for the host, username and password parts." + stream nextPutAll: (ZnResourceMetaUtils encodePercent: string safeSet: #rfc3986SafeSet encoder: ZnDefaultCharacterEncoder value) \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/encodeQuery.on..st b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/encodeFragment.on..st similarity index 52% rename from repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/encodeQuery.on..st rename to repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/encodeFragment.on..st index a467fe59..0bdf2d2a 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/encodeQuery.on..st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/encodeFragment.on..st @@ -1,3 +1,5 @@ private -encodeQuery: string on: stream +encodeFragment: string on: stream + "Percent encode string, assumed to be a fragment, on stream using the query safe set." + stream nextPutAll: (ZnResourceMetaUtils encodePercent: string safeSet: #querySafeSet encoder: ZnDefaultCharacterEncoder value) \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/encodePath.on..st b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/encodePath.on..st index 33776b04..dcf7c4a7 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/encodePath.on..st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/encodePath.on..st @@ -1,3 +1,5 @@ private encodePath: string on: stream + "Percent encode string on stream using a safe set specific to path elements" + stream nextPutAll: (ZnResourceMetaUtils encodePercent: string safeSet: #urlPathSafeSet encoder: ZnDefaultCharacterEncoder value) \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/encodeQueryFields.on..st b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/encodeQueryFields.on..st new file mode 100644 index 00000000..5c1c06bf --- /dev/null +++ b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/encodeQueryFields.on..st @@ -0,0 +1,5 @@ +private +encodeQueryFields: fields on: stream + "Percent encode the key/value fields on stream, these constitute the query part" + + ZnResourceMetaUtils writeQueryFields: fields on: stream \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/printPathQueryFragmentOn..st b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/printPathQueryFragmentOn..st index 0e90165e..037696b4 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/printPathQueryFragmentOn..st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/printPathQueryFragmentOn..st @@ -7,4 +7,4 @@ printPathQueryFragmentOn: stream self hasFragment ifFalse: [ ^ self ]. stream nextPut: $#. - self encodeQuery: self fragment on: stream \ No newline at end of file + self encodeFragment: self fragment on: stream \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/printQueryOn..st b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/printQueryOn..st index f722b3e5..a2fa3cb8 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/printQueryOn..st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/printQueryOn..st @@ -1,4 +1,4 @@ printing printQueryOn: stream stream nextPut: $?. - ZnResourceMetaUtils writeQueryFields: self query on: stream \ No newline at end of file + self encodeQueryFields: self query on: stream \ No newline at end of file From c2e788a5f8092cae8bcd4f8f26575c6db3664778 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Mon, 24 Jan 2022 19:30:32 +0100 Subject: [PATCH 06/30] Fix ZnMimePart class>>#fieldName:fileNamed: to always use a binary stream for its streaming entity Add ZnClientTest>>#testPostMultipartNonASCII Thx @mtabacman for raising this issue --- .../class/fieldName.fileNamed..st | 4 +--- .../ZnStreamingEntity.class/README.md | 2 +- .../ZnStreamingEntity.class/properties.json | 2 +- .../instance/testPostMultipartNonASCII.st | 17 +++++++++++++++++ 4 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 repository/Zinc-Tests.package/ZnClientTest.class/instance/testPostMultipartNonASCII.st diff --git a/repository/Zinc-HTTP.package/ZnMimePart.class/class/fieldName.fileNamed..st b/repository/Zinc-HTTP.package/ZnMimePart.class/class/fieldName.fileNamed..st index cd1f4e1b..3eddc096 100644 --- a/repository/Zinc-HTTP.package/ZnMimePart.class/class/fieldName.fileNamed..st +++ b/repository/Zinc-HTTP.package/ZnMimePart.class/class/fieldName.fileNamed..st @@ -2,9 +2,7 @@ instance creation fieldName: fieldName fileNamed: fileName | mimeType size fileStream entity baseName | mimeType := ZnMimeType forFilenameExtension: (ZnFileSystemUtils extensionFor: fileName). - fileStream := mimeType isBinary - ifTrue: [ ZnFileSystemUtils binaryReadStreamFor: fileName ] - ifFalse: [ ZnFileSystemUtils readStreamFor: fileName ]. + fileStream := ZnFileSystemUtils binaryReadStreamFor: fileName. size := ZnFileSystemUtils fileSizeFor: fileName. (entity := ZnStreamingEntity type: mimeType length: size) stream: fileStream. diff --git a/repository/Zinc-HTTP.package/ZnStreamingEntity.class/README.md b/repository/Zinc-HTTP.package/ZnStreamingEntity.class/README.md index 48047792..af0e9f3a 100644 --- a/repository/Zinc-HTTP.package/ZnStreamingEntity.class/README.md +++ b/repository/Zinc-HTTP.package/ZnStreamingEntity.class/README.md @@ -9,7 +9,7 @@ use to read from. When the client is done, either all data must be read or #consumeContent must be called. A client should normally not close the stream. -A ZnStreamingEntity can also be instanciated with an existing read stream. +A ZnStreamingEntity can also be instanciated with an existing binary read stream. During #writeOn: this stream is copied to the output stream. Part of Zinc HTTP Components. \ No newline at end of file diff --git a/repository/Zinc-HTTP.package/ZnStreamingEntity.class/properties.json b/repository/Zinc-HTTP.package/ZnStreamingEntity.class/properties.json index ae17618a..9e50121c 100644 --- a/repository/Zinc-HTTP.package/ZnStreamingEntity.class/properties.json +++ b/repository/Zinc-HTTP.package/ZnStreamingEntity.class/properties.json @@ -1,5 +1,5 @@ { - "commentStamp" : "", + "commentStamp" : "SvenVanCaekenberghe 1/24/2022 19:22", "super" : "ZnEntity", "category" : "Zinc-HTTP-Core", "classinstvars" : [ ], diff --git a/repository/Zinc-Tests.package/ZnClientTest.class/instance/testPostMultipartNonASCII.st b/repository/Zinc-Tests.package/ZnClientTest.class/instance/testPostMultipartNonASCII.st new file mode 100644 index 00000000..59a34637 --- /dev/null +++ b/repository/Zinc-Tests.package/ZnClientTest.class/instance/testPostMultipartNonASCII.st @@ -0,0 +1,17 @@ +testing +testPostMultipartNonASCII + | client filename | + ZnFileSystemUtils deleteIfExists: 'testPostMultiPart.txt'. + filename := ZnFileSystemUtils fullNameFor: 'testPostMultiPart.txt'. + ZnFileSystemUtils writeStreamFor: filename do: [ :stream | stream nextPutAll: 'Ελλάδα' ]. + self withServerDo: [ :server | + (client := ZnClient new) + url: server localUrl; + addPath: 'echo'; + addPart: (ZnMimePart fieldName: 'username' value: 'john'); + addPart: (ZnMimePart fieldName: 'foo' entity: (ZnEntity text: '123')); + addPart: (ZnMimePart fieldName: 'file' fileNamed: filename); + post. + self assert: client isSuccess. + self assert: (client contents includesSubstring: 'multipart') ]. + ZnFileSystemUtils deleteIfExists: 'testPostMultiPart.txt'. From aad0c509f68775c5d744dfd45618618e4c5e92ea Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Mon, 24 Jan 2022 19:37:45 +0100 Subject: [PATCH 07/30] skip ZnHTTPSTests>>#testSNIPage --- .../ZnHTTPSTests.class/instance/testSNIPage.st | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/repository/Zinc-Zodiac-Tests.package/ZnHTTPSTests.class/instance/testSNIPage.st b/repository/Zinc-Zodiac-Tests.package/ZnHTTPSTests.class/instance/testSNIPage.st index 3fd67583..821b2562 100644 --- a/repository/Zinc-Zodiac-Tests.package/ZnHTTPSTests.class/instance/testSNIPage.st +++ b/repository/Zinc-Zodiac-Tests.package/ZnHTTPSTests.class/instance/testSNIPage.st @@ -1,13 +1,15 @@ testing testSNIPage - | client | + "| client | self ensureSocketStreamFactory. self isNativeSSLPluginPresent ifFalse: [ ^ self skip ]. - self doesNativeSSLPluginSupportSNI ifFalse: [ ^ self skip ]. + self doesNativeSSLPluginSupportSNI ifFalse: [ ^ self skip ]." - (client := ZnClient new) + self skip. "This does no longer work, but we have to find out why" + + "(client := ZnClient new) get: 'https://www.mnot.net/blog/2014/05/09/if_you_can_read_this_youre_sniing'. self assert: client isSuccess. - client close \ No newline at end of file + client close" \ No newline at end of file From 93080e6b0df95bee0e02350527b4e31bdfea0093 Mon Sep 17 00:00:00 2001 From: Christophe Demarey Date: Fri, 4 Feb 2022 08:40:27 +0100 Subject: [PATCH 08/30] cosmetics --- .../instance/int16.st | 2 +- .../instance/int32.st | 2 +- .../instance/int8.st | 2 +- .../instance/nextInt32.st | 2 +- .../nextIntegerOfSize.signed.bigEndian..st | 2 +- .../instance/nextLittleEndianNumber..st | 2 +- .../instance/nextNumber..st | 2 +- .../instance/nextWord.st | 2 +- .../instance/uint16.st | 2 +- .../instance/uint32.st | 2 +- .../instance/uint8.st | 2 +- .../instance/int16..st | 2 +- .../instance/int32..st | 2 +- .../instance/int8..st | 2 +- .../instance/nextInt32Put..st | 2 +- ...nextIntegerOfSize.signed.bigEndian.put..st | 2 +- .../instance/nextLittleEndianNumber.put..st | 2 +- .../instance/nextNumber.put..st | 2 +- .../instance/nextWordPut..st | 2 +- .../instance/uint16..st | 2 +- .../instance/uint32..st | 2 +- .../instance/uint8..st | 2 +- .../ZnClient.class/instance/accept..st | 2 +- .../ZnClient.class/instance/addPart..st | 2 +- .../ZnClient.class/instance/addPath..st | 2 +- .../instance/addPathSegment..st | 2 +- .../applicationFormUrlEncodedEntity.st | 2 +- .../ZnClient.class/instance/contentType..st | 2 +- .../ZnClient.class/instance/contents..st | 2 +- .../ZnClient.class/instance/contents.st | 2 +- .../ZnClient.class/instance/entity..st | 2 +- .../ZnClient.class/instance/entity.st | 2 +- .../instance/executeRequestResponse.st | 2 +- .../executeWithRedirectsRemaining..st | 2 +- .../instance/executeWithRetriesRemaining..st | 2 +- .../instance/executeWithTimeout.st | 2 +- .../ZnClient.class/instance/formAdd..st | 2 +- .../ZnClient.class/instance/formAddAll..st | 2 +- .../ZnClient.class/instance/formAt.add..st | 2 +- .../ZnClient.class/instance/formAt.put..st | 2 +- .../instance/getConnectionAndExecute.st | 2 +- .../ZnClient.class/instance/handleResponse.st | 2 +- .../ZnClient.class/instance/handleRetry..st | 2 +- .../ZnClient.class/instance/headerAddAll..st | 2 +- .../ZnClient.class/instance/headerAt.add..st | 2 +- .../ZnClient.class/instance/headerAt.put..st | 2 +- .../ZnClient.class/instance/host..st | 2 +- .../ZnClient.class/instance/http.st | 2 +- .../ZnClient.class/instance/https.st | 2 +- ...actionRequestDuration.responseDuration..st | 2 +- .../logConnectionClosedAddress.port..st | 2 +- .../logConnectionEstablishedTo.started..st | 2 +- ...logIgnoringExceptionOnReusedConnection..st | 2 +- .../ZnClient.class/instance/logRedirect..st | 2 +- .../instance/logRequestWrittenStarted..st | 2 +- .../instance/logResponseReadStarted..st | 2 +- .../ZnClient.class/instance/logRetrying..st | 2 +- .../ZnClient.class/instance/method..st | 2 +- .../instance/multiPartFormDataEntity.st | 2 +- .../ZnClient.class/instance/newLogEvent..st | 2 +- .../ZnClient.class/instance/path..st | 2 +- .../ZnClient.class/instance/port..st | 2 +- .../instance/prepareNextRequest.st | 2 +- .../instance/prepareRedirect.st | 2 +- .../ZnClient.class/instance/prepareRequest.st | 2 +- .../ZnClient.class/instance/queryAddAll..st | 2 +- .../ZnClient.class/instance/queryAt.add..st | 2 +- .../ZnClient.class/instance/queryAt.put..st | 2 +- .../ZnClient.class/instance/readResponse.st | 2 +- .../ZnClient.class/instance/request..st | 2 +- .../ZnClient.class/instance/request.st | 2 +- .../ZnClient.class/instance/resetEntity.st | 2 +- .../ZnClient.class/instance/response.st | 2 +- .../instance/setAcceptEncodingGzip.st | 2 +- ...etBasicAuthenticationUsername.password..st | 2 +- .../instance/setIfModifiedSince..st | 2 +- .../ZnClient.class/instance/url..st | 2 +- .../instance/username.password..st | 2 +- .../ZnClient.class/instance/writeRequest.st | 2 +- .../instance/closeTag..st | 2 +- .../instance/openTag..st | 2 +- .../instance/openTag.attribute.value..st | 2 +- .../instance/openTag.attributes..st | 2 +- .../instance/renderAttributes..st | 2 +- .../authenticateAndDelegateRequest..st | 2 +- .../instance/authenticateRequest.do..st | 2 +- .../instance/logConnectionAccepted..st | 2 +- .../instance/logConnectionClosed..st | 2 +- .../logRequest.response.handledStarted..st | 2 +- .../instance/logRequestRead.started..st | 2 +- .../instance/logResponseWritten.started..st | 2 +- .../instance/logServerGeneric..st | 2 +- .../instance/logServerHandlerError..st | 2 +- .../instance/logServerReadError..st | 2 +- .../instance/logServerSocketBound.st | 2 +- .../logServerSocketReleasedAddress.port..st | 2 +- ...rverTransactionRequest.response.timing..st | 2 +- .../instance/logServerWriteError..st | 2 +- .../instance/logStarted.st | 2 +- .../instance/logStopped.st | 2 +- .../instance/newLogEvent..st | 2 +- .../ZnUtils.class/class/capitalizeString..st | 2 +- .../ZnUtils.class/class/decodeBase64..st | 2 +- .../ZnUtils.class/class/encodeBase64..st | 2 +- .../ZnUtils.class/class/httpDate..st | 2 +- .../ZnUtils.class/class/httpDate.st | 2 +- .../ZnUtils.class/class/parseHttpDate..st | 2 +- .../ZnUtils.class/class/trimString..st | 2 +- .../class/decodePercent..st | 2 +- .../class/decodePercentForQuery..st | 2 +- .../class/encodePercent.safeSet.encoder..st | 2 +- .../class/parseQueryFrom..st | 2 +- .../class/writeQueryFields.on..st | 2 +- .../class/writeQueryFields.withEncoder.on..st | 2 +- .../ZnUrl.class/instance/addPathSegment..st | 2 +- .../ZnUrl.class/instance/addPathSegments..st | 2 +- .../ZnUrl.class/instance/clearPath.st | 2 +- .../ZnUrl.class/instance/closePath.st | 4 +- .../ZnUrl.class/instance/directory.st | 2 +- .../ZnUrl.class/instance/file.st | 2 +- .../ZnUrl.class/instance/firstPathSegment.st | 2 +- .../ZnUrl.class/instance/lastPathSegment.st | 2 +- .../ZnUrl.class/instance/pathSegments.st | 2 +- .../ZnUrl.class/instance/queryAddAll..st | 2 +- .../ZnUrl.class/instance/queryAt..st | 2 +- .../ZnUrl.class/instance/queryAt.ifAbsent..st | 2 +- .../instance/queryAt.ifPresent..st | 2 +- .../ZnUrl.class/instance/queryDo..st | 2 +- .../ZnUrl.class/instance/queryKeys.st | 2 +- .../ZnUrl.class/instance/queryRemoveAll.st | 2 +- .../ZnUrl.class/instance/queryRemoveKey..st | 2 +- .../instance/removeFirstPathSegment.st | 2 +- .../instance/removeLastPathSegment.st | 2 +- .../class/handlesOperation.with.on..st | 2 +- .../ZnUrlOperation.class/class/operation.st | 2 +- .../ZnUrlOperation.class/class/schemes.st | 2 +- .../instance/testTrailingSlash.st | 5 +- .../instance/testCharset.st | 2 + .../instance/testComparingWithParameters.st | 2 +- .../instance/testCopying.st | 4 +- .../instance/testDefault.st | 1 + .../instance/testIdentity.st | 1 + .../instance/testReading.st | 2 + .../instance/testWriting.st | 5 +- .../instance/testMultiValues.st | 18 ++++--- .../instance/testQueryParsing.st | 7 ++- .../ZnUrlTest.class/instance/testAuthority.st | 4 +- .../instance/testDefaultScheme.st | 9 ++-- .../instance/testDefaultSchemeAndPort.st | 5 +- .../ZnUrlTest.class/instance/testDefaults.st | 5 +- .../instance/testEncodedSlash.st | 15 +++--- .../instance/testParsePathOnly.st | 10 ++-- .../instance/testParsingEscape.st | 2 +- .../instance/testParsingSimple.st | 8 +-- .../instance/testPrintingSimple.st | 12 ++--- .../ZnUrlTest.class/instance/testQuery.st | 2 +- .../instance/testQueryEncoding.st | 7 ++- .../instance/testQueryManipulation.st | 6 +-- .../instance/testQueryRemoveAll.st | 4 +- .../ZnUrlTest.class/instance/testRelative.st | 2 +- .../testWriteUrlPathQueryFragmentOfOn.st | 5 +- .../instance/testByteWriting.st | 12 +++-- .../instance/testCharacterWriting.st | 13 +++-- .../instance/testConstruction.st | 8 +-- .../instance/testCookies.st | 49 +++++++++++-------- .../instance/testGetSmallHTML.st | 2 +- .../instance/testGetSmallHTMLBinary.st | 11 +++-- .../instance/testGetSmallHTMLOneShot.st | 2 +- .../instance/testGetSmallHTMLStreaming.st | 4 +- .../instance/testGetSmallHTMLTwice.st | 6 +-- .../testGetSmallHTMLUrlConstruction.st | 2 +- .../ZnEasyTest.class/instance/testDelete.st | 18 ++++--- .../instance/testGetSmallHTMLDocument.st | 4 +- .../instance/testHeadSmallHTMLDocument.st | 4 +- .../ZnEasyTest.class/instance/testPost.st | 21 +++++--- .../instance/testPostUnicodeUtf8.st | 21 +++++--- .../ZnEasyTest.class/instance/testPut.st | 21 +++++--- .../instance/testChunked.st | 8 +-- .../instance/testChunkedWithExtraHeaders.st | 12 ++--- .../instance/testReadStreaming.st | 6 +-- .../instance/testReadStreamingWriting.st | 6 +-- .../testMultiPartFormDataWriteRead.st | 24 +++++---- .../testMultiPartFormDataWriteReadBinary.st | 12 ++--- .../instance/testUTF8ReadingDetermined.st | 12 +++-- .../instance/testUTF8ReadingUndetermined.st | 12 +++-- .../instance/testUTF8Writing.st | 12 +++-- .../instance/testWriting.st | 12 ++--- .../instance/testBinary.st | 2 +- .../instance/testBinaryAll.st | 2 +- .../instance/testNext.st | 9 ++-- .../instance/testNextCount.st | 2 +- .../instance/testNextCountInto.st | 4 +- .../instance/testNextCountIntoShort.st | 3 +- .../instance/testNextCountShort.st | 2 +- .../instance/testSimple.st | 2 +- .../instance/testSimpleEof.st | 2 +- .../instance/testBinary.st | 6 +-- .../instance/testSimple.st | 6 +-- .../instance/testAdd.st | 2 +- .../instance/testCookiesForUrl.st | 6 ++- .../instance/testFromString.st | 9 ++-- .../instance/testReading.st | 8 +-- .../instance/testWriting.st | 2 +- .../instance/testBasicAuthenticate.st | 12 ++--- .../instance/testAbsoluteCreated.st | 4 +- .../instance/testAbsoluteRedirect.st | 6 +-- .../instance/testCreated.st | 4 +- .../instance/testNotFound.st | 2 +- .../instance/testRedirect.st | 12 ++--- .../instance/testAuthorizationFailed.st | 20 +++++--- .../instance/testAuthorizationSuccessful.st | 22 ++++++--- .../instance/testDefault.st | 12 ++--- .../ZnServerTest.class/instance/testEcho.st | 20 +++++--- .../instance/testEchoBinary.st | 23 ++++++--- .../instance/testEchoLocalInterface.st | 25 +++++----- .../instance/testGetUnicodeUtf8.st | 22 ++++++--- .../instance/testOSAssignedPort.st | 23 +++++---- .../instance/testSession.st | 30 +++++++----- .../instance/testSessionExpired.st | 34 +++++++------ .../instance/testSessionRoute.st | 36 ++++++++------ .../instance/testReading.st | 8 +-- .../instance/testWriting.st | 2 +- .../instance/testAddCredential.st | 2 +- .../ZnUtilsTest.class/instance/testBase64.st | 8 +-- .../instance/testCapitalizeString.st | 10 ++-- .../instance/testHttpDate.st | 12 +++-- .../instance/testParseHttpDate.st | 16 +++--- .../instance/testParseHttpDateAlternative1.st | 16 +++--- .../instance/testParseHttpDateDashes.st | 16 +++--- .../testParseHttpDateDashesAlternative1.st | 16 +++--- .../instance/testReadUpToEndBinary.st | 10 ++-- .../instance/testReadUpToEndNonBinary.st | 10 ++-- .../instance/testStreamingBinary.st | 6 +-- .../instance/testStreamingNonBinary.st | 6 +-- 234 files changed, 664 insertions(+), 579 deletions(-) diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/int16.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/int16.st index 0cabffeb..c35f5e2e 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/int16.st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/int16.st @@ -1,3 +1,3 @@ -accessing-bytes +accessing - bytes int16 ^ self nextIntegerOfSize: 2 signed: true bigEndian: true \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/int32.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/int32.st index c8bb7cf0..a5131786 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/int32.st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/int32.st @@ -1,3 +1,3 @@ -accessing-bytes +accessing - bytes int32 ^ self nextIntegerOfSize: 4 signed: true bigEndian: true \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/int8.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/int8.st index 0bd9cecb..967445b0 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/int8.st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/int8.st @@ -1,3 +1,3 @@ -accessing-bytes +accessing - bytes int8 ^ self nextIntegerOfSize: 1 signed: true bigEndian: true \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/nextInt32.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/nextInt32.st index 941b2288..fefbc9dd 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/nextInt32.st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/nextInt32.st @@ -1,3 +1,3 @@ -accessing-bytes +accessing - bytes nextInt32 ^ self nextIntegerOfSize: 4 signed: true bigEndian: true \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/nextIntegerOfSize.signed.bigEndian..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/nextIntegerOfSize.signed.bigEndian..st index 62050b2c..37cfd523 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/nextIntegerOfSize.signed.bigEndian..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/nextIntegerOfSize.signed.bigEndian..st @@ -1,4 +1,4 @@ -accessing-bytes +accessing - bytes nextIntegerOfSize: numberOfBytes signed: signed bigEndian: bigEndian "Assuming the receiver is a stream of bytes, read the next integer of size numberOfBytes. If bigEndian is true, use network byte order, most significant byte first, diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/nextLittleEndianNumber..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/nextLittleEndianNumber..st index 036b2fa4..c60ff979 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/nextLittleEndianNumber..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/nextLittleEndianNumber..st @@ -1,3 +1,3 @@ -accessing-bytes +accessing - bytes nextLittleEndianNumber: numberOfBytes ^ self nextIntegerOfSize: numberOfBytes signed: false bigEndian: false \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/nextNumber..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/nextNumber..st index 8d10dcc6..f56a1a03 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/nextNumber..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/nextNumber..st @@ -1,3 +1,3 @@ -accessing-bytes +accessing - bytes nextNumber: numberOfBytes ^ self nextIntegerOfSize: numberOfBytes signed: false bigEndian: true \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/nextWord.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/nextWord.st index b1f1e461..decc03b4 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/nextWord.st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/nextWord.st @@ -1,3 +1,3 @@ -accessing-bytes +accessing - bytes nextWord ^ self nextIntegerOfSize: 2 signed: false bigEndian: true \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/uint16.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/uint16.st index 2b7a00a9..76b76de0 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/uint16.st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/uint16.st @@ -1,3 +1,3 @@ -accessing-bytes +accessing - bytes uint16 ^ self nextIntegerOfSize: 2 signed: false bigEndian: true \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/uint32.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/uint32.st index 868660a6..9960087b 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/uint32.st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/uint32.st @@ -1,3 +1,3 @@ -accessing-bytes +accessing - bytes uint32 ^ self nextIntegerOfSize: 4 signed: false bigEndian: true \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/uint8.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/uint8.st index 12c1ccee..09c5409e 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/uint8.st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/uint8.st @@ -1,3 +1,3 @@ -accessing-bytes +accessing - bytes uint8 ^ self nextIntegerOfSize: 1 signed: false bigEndian: true \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/int16..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/int16..st index f95d4588..cd8cf710 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/int16..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/int16..st @@ -1,3 +1,3 @@ -accessing-bytes +accessing - bytes int16: integer ^ self nextIntegerOfSize: 2 signed: true bigEndian: true put: integer \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/int32..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/int32..st index 6eeb8036..d8d375c8 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/int32..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/int32..st @@ -1,3 +1,3 @@ -accessing-bytes +accessing - bytes int32: integer ^ self nextIntegerOfSize: 4 signed: true bigEndian: true put: integer \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/int8..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/int8..st index c6d441c5..76102f81 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/int8..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/int8..st @@ -1,3 +1,3 @@ -accessing-bytes +accessing - bytes int8: integer ^ self nextIntegerOfSize: 1 signed: true bigEndian: true put: integer \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/nextInt32Put..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/nextInt32Put..st index 4882d23b..93228705 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/nextInt32Put..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/nextInt32Put..st @@ -1,3 +1,3 @@ -accessing-bytes +accessing - bytes nextInt32Put: integer ^ self nextIntegerOfSize: 4 signed: true bigEndian: true put: integer \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/nextIntegerOfSize.signed.bigEndian.put..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/nextIntegerOfSize.signed.bigEndian.put..st index bfe08489..328b8fd9 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/nextIntegerOfSize.signed.bigEndian.put..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/nextIntegerOfSize.signed.bigEndian.put..st @@ -1,4 +1,4 @@ -accessing-bytes +accessing - bytes nextIntegerOfSize: numberOfBytes signed: signed bigEndian: bigEndian put: value "Assuming the receiver is a stream of bytes, write value as the next integer of size numberOfBytes. If bigEndian is true, use network byte order, most significant byte first, diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/nextLittleEndianNumber.put..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/nextLittleEndianNumber.put..st index 7478007f..15583565 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/nextLittleEndianNumber.put..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/nextLittleEndianNumber.put..st @@ -1,3 +1,3 @@ -accessing-bytes +accessing - bytes nextLittleEndianNumber: numberOfBytes put: integer ^ self nextIntegerOfSize: numberOfBytes signed: false bigEndian: false put: integer \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/nextNumber.put..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/nextNumber.put..st index 6806f08c..99f3fc61 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/nextNumber.put..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/nextNumber.put..st @@ -1,3 +1,3 @@ -accessing-bytes +accessing - bytes nextNumber: numberOfBytes put: integer ^ self nextIntegerOfSize: numberOfBytes signed: false bigEndian: true put: integer \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/nextWordPut..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/nextWordPut..st index 809c8a04..9b4b4b71 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/nextWordPut..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/nextWordPut..st @@ -1,3 +1,3 @@ -accessing-bytes +accessing - bytes nextWordPut: integer ^ self nextIntegerOfSize: 2 signed: false bigEndian: true put: integer \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/uint16..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/uint16..st index 176495ba..331b951c 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/uint16..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/uint16..st @@ -1,3 +1,3 @@ -accessing-bytes +accessing - bytes uint16: integer ^ self nextIntegerOfSize: 2 signed: false bigEndian: true put: integer \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/uint32..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/uint32..st index ee9de293..6b8b74c6 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/uint32..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/uint32..st @@ -1,3 +1,3 @@ -accessing-bytes +accessing - bytes uint32: integer ^ self nextIntegerOfSize: 4 signed: false bigEndian: true put: integer \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/uint8..st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/uint8..st index 397ea98b..c684d38d 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/uint8..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedWriteStream.class/instance/uint8..st @@ -1,3 +1,3 @@ -accessing-bytes +accessing - bytes uint8: integer ^ self nextIntegerOfSize: 1 signed: false bigEndian: true put: integer \ No newline at end of file diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/accept..st b/repository/Zinc-HTTP.package/ZnClient.class/instance/accept..st index 5963ef1c..5be0955e 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/accept..st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/accept..st @@ -1,4 +1,4 @@ -accessing request +accessing - request accept: mimeTypeObject "Set the Accept HTTP header to mimeTypeObject for the current request." diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/addPart..st b/repository/Zinc-HTTP.package/ZnClient.class/instance/addPart..st index 8b38ae98..3efd6725 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/addPart..st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/addPart..st @@ -1,4 +1,4 @@ -accessing request +accessing - request addPart: mimePart "Add mimePart to the multipart/form-data entity of the current request" diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/addPath..st b/repository/Zinc-HTTP.package/ZnClient.class/instance/addPath..st index 3d5bf764..fd2640e9 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/addPath..st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/addPath..st @@ -1,4 +1,4 @@ -accessing request +accessing - request addPath: object "Extend the path of the current request with object. Either a string or a collection of strings is allowed as argument." diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/addPathSegment..st b/repository/Zinc-HTTP.package/ZnClient.class/instance/addPathSegment..st index f32dbb39..a20de640 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/addPathSegment..st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/addPathSegment..st @@ -1,4 +1,4 @@ -accessing request +accessing - request addPathSegment: pathSegment "Extend the path of the current request with a single pathSegment." diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/applicationFormUrlEncodedEntity.st b/repository/Zinc-HTTP.package/ZnClient.class/instance/applicationFormUrlEncodedEntity.st index 5ff7b643..dd752b94 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/applicationFormUrlEncodedEntity.st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/applicationFormUrlEncodedEntity.st @@ -1,4 +1,4 @@ -accessing request +accessing - request applicationFormUrlEncodedEntity "Initialize the current request to have an application/x-www-form-urlencoded entity. Return the existing entity if there is one. diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/contentType..st b/repository/Zinc-HTTP.package/ZnClient.class/instance/contentType..st index 5021f830..532b85e9 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/contentType..st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/contentType..st @@ -1,4 +1,4 @@ -accessing request +accessing - request contentType: mimeType "Set the content-type of the request entity, provided we have one" diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/contents..st b/repository/Zinc-HTTP.package/ZnClient.class/instance/contents..st index f6bbd95d..56a98e73 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/contents..st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/contents..st @@ -1,4 +1,4 @@ -accessing request +accessing - request contents: object "Set the entity contents of the current request to object. I will pass this through my contentWriter if I have one. diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/contents.st b/repository/Zinc-HTTP.package/ZnClient.class/instance/contents.st index ef70f869..34324549 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/contents.st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/contents.st @@ -1,4 +1,4 @@ -accessing response +accessing - response contents "Answer the contents or HTTP payload of the last response, assuming the current request was executed. diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/entity..st b/repository/Zinc-HTTP.package/ZnClient.class/instance/entity..st index 109f9217..5395a44a 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/entity..st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/entity..st @@ -1,4 +1,4 @@ -accessing request +accessing - request entity: entity "Set the entity of the current request to enity. A ZnEntity subclass or compatible object is expected." diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/entity.st b/repository/Zinc-HTTP.package/ZnClient.class/instance/entity.st index 023aa913..2f208961 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/entity.st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/entity.st @@ -1,4 +1,4 @@ -accessing response +accessing - response entity "Answer the entity or HTTP payload of the last response, assuming the current request was executed." diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/executeRequestResponse.st b/repository/Zinc-HTTP.package/ZnClient.class/instance/executeRequestResponse.st index b6eb8ee2..d7cdc16f 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/executeRequestResponse.st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/executeRequestResponse.st @@ -1,4 +1,4 @@ -private protocol +private - protocol executeRequestResponse | initialMilliseconds requestDuration responseDuration | initialMilliseconds := Time millisecondClockValue. diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/executeWithRedirectsRemaining..st b/repository/Zinc-HTTP.package/ZnClient.class/instance/executeWithRedirectsRemaining..st index c9ab52ea..19da1f63 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/executeWithRedirectsRemaining..st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/executeWithRedirectsRemaining..st @@ -1,4 +1,4 @@ -private protocol +private - protocol executeWithRedirectsRemaining: redirectCount self getConnectionAndExecute. response isRedirect diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/executeWithRetriesRemaining..st b/repository/Zinc-HTTP.package/ZnClient.class/instance/executeWithRetriesRemaining..st index aff76aca..41a03d90 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/executeWithRetriesRemaining..st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/executeWithRetriesRemaining..st @@ -1,4 +1,4 @@ -private protocol +private - protocol executeWithRetriesRemaining: retryCount ^ [ self executeWithRedirectsRemaining: self maxNumberOfRedirects ] on: self retryExceptionSet diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/executeWithTimeout.st b/repository/Zinc-HTTP.package/ZnClient.class/instance/executeWithTimeout.st index f75f6b1d..abe3dd48 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/executeWithTimeout.st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/executeWithTimeout.st @@ -1,4 +1,4 @@ -private protocol +private - protocol executeWithTimeout ^ self withTimeoutDo: [ [ self executeWithRetriesRemaining: self numberOfRetries ] diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/formAdd..st b/repository/Zinc-HTTP.package/ZnClient.class/instance/formAdd..st index f548073e..74f91c1e 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/formAdd..st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/formAdd..st @@ -1,4 +1,4 @@ -accessing request +accessing - request formAdd: association "Add the key->value association to the application/x-www-form-urlencoded entity of the current request." diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/formAddAll..st b/repository/Zinc-HTTP.package/ZnClient.class/instance/formAddAll..st index f49bfa77..da06df47 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/formAddAll..st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/formAddAll..st @@ -1,4 +1,4 @@ -accessing request +accessing - request formAddAll: keyedCollection "Add all key->value associations of keyedCollection to the application/x-www-form-urlencoded entity of the current request." diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/formAt.add..st b/repository/Zinc-HTTP.package/ZnClient.class/instance/formAt.add..st index feb34984..686e2e73 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/formAt.add..st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/formAt.add..st @@ -1,4 +1,4 @@ -accessing request +accessing - request formAt: key add: value "Add key equals value to the application/x-www-form-urlencoded entity of the current request. This is for multi-values form fields." diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/formAt.put..st b/repository/Zinc-HTTP.package/ZnClient.class/instance/formAt.put..st index 3f4df846..de40f5a6 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/formAt.put..st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/formAt.put..st @@ -1,4 +1,4 @@ -accessing request +accessing - request formAt: key put: value "Set key equal to value in the application/x-www-form-urlencoded entity of the current request." diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/getConnectionAndExecute.st b/repository/Zinc-HTTP.package/ZnClient.class/instance/getConnectionAndExecute.st index 442df250..de9d9fbf 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/getConnectionAndExecute.st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/getConnectionAndExecute.st @@ -1,4 +1,4 @@ -private protocol +private - protocol getConnectionAndExecute self canReuseConnection ifTrue: [ diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/handleResponse.st b/repository/Zinc-HTTP.package/ZnClient.class/instance/handleResponse.st index e8236ea9..cd818b43 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/handleResponse.st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/handleResponse.st @@ -1,4 +1,4 @@ -private protocol +private - protocol handleResponse self receiveCookies. (self enforceHttpSuccess and: [ response isSuccess not ]) diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/handleRetry..st b/repository/Zinc-HTTP.package/ZnClient.class/instance/handleRetry..st index 685134fe..9262b6d3 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/handleRetry..st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/handleRetry..st @@ -1,4 +1,4 @@ -private protocol +private - protocol handleRetry: exception self logRetrying: exception. self close. diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/headerAddAll..st b/repository/Zinc-HTTP.package/ZnClient.class/instance/headerAddAll..st index 6d8cf7bb..0b59474c 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/headerAddAll..st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/headerAddAll..st @@ -1,4 +1,4 @@ -accessing request +accessing - request headerAddAll: keyedCollection "Add all key/value pairs of keyedCollection as headers. Note that #addAllMulti: is used" diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/headerAt.add..st b/repository/Zinc-HTTP.package/ZnClient.class/instance/headerAt.add..st index 2afd98b9..22d360da 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/headerAt.add..st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/headerAt.add..st @@ -1,4 +1,4 @@ -accessing request +accessing - request headerAt: key add: value "Add value to key in the HTTP header of the current request. This is for multi-values headers." diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/headerAt.put..st b/repository/Zinc-HTTP.package/ZnClient.class/instance/headerAt.put..st index a7004dc6..6279181c 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/headerAt.put..st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/headerAt.put..st @@ -1,4 +1,4 @@ -accessing request +accessing - request headerAt: key put: value "Set key equals value in the HTTP header of the current request" diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/host..st b/repository/Zinc-HTTP.package/ZnClient.class/instance/host..st index ee432beb..2b035b2e 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/host..st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/host..st @@ -1,4 +1,4 @@ -accessing request +accessing - request host: hostName "Set the host of the current request to hostName." diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/http.st b/repository/Zinc-HTTP.package/ZnClient.class/instance/http.st index 24ee7545..a704f28a 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/http.st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/http.st @@ -1,4 +1,4 @@ -accessing request +accessing - request http "Set the scheme of the current request to HTTP." diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/https.st b/repository/Zinc-HTTP.package/ZnClient.class/instance/https.st index 1b068b17..0c568782 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/https.st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/https.st @@ -1,4 +1,4 @@ -accessing request +accessing - request https "Set the scheme of the current request to HTTPS." diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/logClientTransactionRequestDuration.responseDuration..st b/repository/Zinc-HTTP.package/ZnClient.class/instance/logClientTransactionRequestDuration.responseDuration..st index 0c5150f8..77e72e5e 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/logClientTransactionRequestDuration.responseDuration..st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/logClientTransactionRequestDuration.responseDuration..st @@ -1,4 +1,4 @@ -private logging +private - logging logClientTransactionRequestDuration: requestDuration responseDuration: responseDuration | logEventClass | logLevel < 1 ifTrue: [ ^ nil ]. diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/logConnectionClosedAddress.port..st b/repository/Zinc-HTTP.package/ZnClient.class/instance/logConnectionClosedAddress.port..st index a93c7c22..36fa818b 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/logConnectionClosedAddress.port..st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/logConnectionClosedAddress.port..st @@ -1,4 +1,4 @@ -private logging +private - logging logConnectionClosedAddress: address port: port logLevel < 3 ifTrue: [ ^ nil ]. ^ (self newLogEvent: ZnClientConnectionClosedEvent) diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/logConnectionEstablishedTo.started..st b/repository/Zinc-HTTP.package/ZnClient.class/instance/logConnectionEstablishedTo.started..st index d0a63c91..a69e60d8 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/logConnectionEstablishedTo.started..st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/logConnectionEstablishedTo.started..st @@ -1,4 +1,4 @@ -private logging +private - logging logConnectionEstablishedTo: url started: initialMilliseconds | event | logLevel < 3 ifTrue: [ ^ nil ]. diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/logIgnoringExceptionOnReusedConnection..st b/repository/Zinc-HTTP.package/ZnClient.class/instance/logIgnoringExceptionOnReusedConnection..st index bf8d276c..e07d4dd3 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/logIgnoringExceptionOnReusedConnection..st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/logIgnoringExceptionOnReusedConnection..st @@ -1,4 +1,4 @@ -private logging +private - logging logIgnoringExceptionOnReusedConnection: exception logLevel < 3 ifTrue: [ ^ nil ]. ^ (self newLogEvent: ZnClientIgnoringExceptionOnConnectionReuseEvent) diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/logRedirect..st b/repository/Zinc-HTTP.package/ZnClient.class/instance/logRedirect..st index a17c3944..113d4209 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/logRedirect..st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/logRedirect..st @@ -1,4 +1,4 @@ -private logging +private - logging logRedirect: url ^ (self newLogEvent: ZnClientFollowingRedirectEvent) target: url; diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/logRequestWrittenStarted..st b/repository/Zinc-HTTP.package/ZnClient.class/instance/logRequestWrittenStarted..st index e5ac6094..11b31589 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/logRequestWrittenStarted..st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/logRequestWrittenStarted..st @@ -1,4 +1,4 @@ -private logging +private - logging logRequestWrittenStarted: initialMilliseconds ^ logLevel < 3 ifTrue: [ Time millisecondsSince: initialMilliseconds ] diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/logResponseReadStarted..st b/repository/Zinc-HTTP.package/ZnClient.class/instance/logResponseReadStarted..st index b6c892f3..5990963f 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/logResponseReadStarted..st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/logResponseReadStarted..st @@ -1,4 +1,4 @@ -private logging +private - logging logResponseReadStarted: initialMilliseconds ^ logLevel < 3 ifTrue: [ Time millisecondsSince: initialMilliseconds ] diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/logRetrying..st b/repository/Zinc-HTTP.package/ZnClient.class/instance/logRetrying..st index 115c4575..9acdf7cc 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/logRetrying..st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/logRetrying..st @@ -1,4 +1,4 @@ -private logging +private - logging logRetrying: exception logLevel < 3 ifTrue: [ ^ nil ]. ^ (self newLogEvent: ZnClientRetryingEvent) diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/method..st b/repository/Zinc-HTTP.package/ZnClient.class/instance/method..st index 966e3079..b1f2285e 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/method..st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/method..st @@ -1,4 +1,4 @@ -accessing request +accessing - request method: httpMethod "Set the HTTP method of the current request to httpMethod. An uppercase symbol such as #GET is expected. diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/multiPartFormDataEntity.st b/repository/Zinc-HTTP.package/ZnClient.class/instance/multiPartFormDataEntity.st index 0b94bd83..11e9c78f 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/multiPartFormDataEntity.st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/multiPartFormDataEntity.st @@ -1,4 +1,4 @@ -accessing request +accessing - request multiPartFormDataEntity "Initialize the current request to have an multipart/form-data entity. Return the existing entity if there is one. diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/newLogEvent..st b/repository/Zinc-HTTP.package/ZnClient.class/instance/newLogEvent..st index 4ad22d53..d8041737 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/newLogEvent..st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/newLogEvent..st @@ -1,4 +1,4 @@ -private logging +private - logging newLogEvent: logEventClass ^ logEventClass new clientId: self clientId; diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/path..st b/repository/Zinc-HTTP.package/ZnClient.class/instance/path..st index bf81d8a1..71359213 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/path..st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/path..st @@ -1,4 +1,4 @@ -accessing request +accessing - request path: pathString "Set the path of the current request to pathString. The argument will be merged with of the current/previous request." diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/port..st b/repository/Zinc-HTTP.package/ZnClient.class/instance/port..st index 9d130a8b..56c86004 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/port..st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/port..st @@ -1,4 +1,4 @@ -accessing request +accessing - request port: portNumber "Set the port of the current request to portNumber." diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/prepareNextRequest.st b/repository/Zinc-HTTP.package/ZnClient.class/instance/prepareNextRequest.st index 54972645..ea9ee9fc 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/prepareNextRequest.st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/prepareNextRequest.st @@ -1,4 +1,4 @@ -private protocol +private - protocol prepareNextRequest "The request could be modified destructively in the next run, but the request can also be part of a log event, hence copy it" diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/prepareRedirect.st b/repository/Zinc-HTTP.package/ZnClient.class/instance/prepareRedirect.st index e35d233c..30753677 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/prepareRedirect.st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/prepareRedirect.st @@ -1,4 +1,4 @@ -private protocol +private - protocol prepareRedirect "We implement the common behavior that POST/PUT redirects turn into GET request and that the body data is dropped, except for a 307 or 308 where this is explicitly forbidden. diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/prepareRequest.st b/repository/Zinc-HTTP.package/ZnClient.class/instance/prepareRequest.st index 85658c3c..ccb0cf4f 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/prepareRequest.st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/prepareRequest.st @@ -1,4 +1,4 @@ -private protocol +private - protocol prepareRequest self isOneShot ifTrue: [ request setConnectionClose ]. diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/queryAddAll..st b/repository/Zinc-HTTP.package/ZnClient.class/instance/queryAddAll..st index b0fe874c..6136dd2d 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/queryAddAll..st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/queryAddAll..st @@ -1,4 +1,4 @@ -accessing request +accessing - request queryAddAll: keyedCollection "Add all key -> value elements of keyedCollection as HTTP query parameters to the current request. diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/queryAt.add..st b/repository/Zinc-HTTP.package/ZnClient.class/instance/queryAt.add..st index c5c88eeb..fad26f46 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/queryAt.add..st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/queryAt.add..st @@ -1,4 +1,4 @@ -accessing request +accessing - request queryAt: key add: value "Modify the receiver by adding a query variable key=value. If key already exists, value is added to it." diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/queryAt.put..st b/repository/Zinc-HTTP.package/ZnClient.class/instance/queryAt.put..st index 469d0f4f..e4aa7a24 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/queryAt.put..st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/queryAt.put..st @@ -1,4 +1,4 @@ -accessing request +accessing - request queryAt: key put: value "Add key equals value as an HTTP query parameter to the current request. If the key already exists, its value is overwritten." diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/readResponse.st b/repository/Zinc-HTTP.package/ZnClient.class/instance/readResponse.st index ad88e80a..babbcfc4 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/readResponse.st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/readResponse.st @@ -1,4 +1,4 @@ -private protocol +private - protocol readResponse self signalHTTPProgress: 'Reading response'. self withMaximumNumberOfDictionaryEntriesDo: [ diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/request..st b/repository/Zinc-HTTP.package/ZnClient.class/instance/request..st index 7aea83cb..37aba870 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/request..st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/request..st @@ -1,4 +1,4 @@ -accessing request +accessing - request request: aRequest "Replace my current request with aRequest. This is a low level operation only needed in special cases." diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/request.st b/repository/Zinc-HTTP.package/ZnClient.class/instance/request.st index 9af1b4d9..e898ba56 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/request.st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/request.st @@ -1,4 +1,4 @@ -accessing request +accessing - request request "Return the current request that I am building, or the previous request that I executed." diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/resetEntity.st b/repository/Zinc-HTTP.package/ZnClient.class/instance/resetEntity.st index a1f6c2f8..a9e20028 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/resetEntity.st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/resetEntity.st @@ -1,4 +1,4 @@ -accessing request +accessing - request resetEntity "Make sure that the current request does not hold an entity from a previous request. This is sometimes necessary after a POST or PUT. This method will be called automatically diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/response.st b/repository/Zinc-HTTP.package/ZnClient.class/instance/response.st index 77762d75..44331be7 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/response.st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/response.st @@ -1,4 +1,4 @@ -accessing response +accessing - response response "Answer the last response, assuming the current request was executed." diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/setAcceptEncodingGzip.st b/repository/Zinc-HTTP.package/ZnClient.class/instance/setAcceptEncodingGzip.st index 75e61acf..25a32d58 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/setAcceptEncodingGzip.st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/setAcceptEncodingGzip.st @@ -1,4 +1,4 @@ -accessing request +accessing - request setAcceptEncodingGzip "Give the server the hint that we accept gzip content encoding. When the server complies, important bandwidth reductions are possible." diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/setBasicAuthenticationUsername.password..st b/repository/Zinc-HTTP.package/ZnClient.class/instance/setBasicAuthenticationUsername.password..st index 12b45679..3a42bdf0 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/setBasicAuthenticationUsername.password..st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/setBasicAuthenticationUsername.password..st @@ -1,4 +1,4 @@ -accessing request +accessing - request setBasicAuthenticationUsername: username password: password "Set the username/password for basic authenticationfor the current request." diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/setIfModifiedSince..st b/repository/Zinc-HTTP.package/ZnClient.class/instance/setIfModifiedSince..st index f78081cc..53ac0a7f 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/setIfModifiedSince..st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/setIfModifiedSince..st @@ -1,4 +1,4 @@ -accessing request +accessing - request setIfModifiedSince: reference "Tell the server that we are only interested in the currently requested URI if it was modified since reference, a DateAndTime. diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/url..st b/repository/Zinc-HTTP.package/ZnClient.class/instance/url..st index 95ffdb4e..4d911f37 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/url..st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/url..st @@ -1,4 +1,4 @@ -accessing request +accessing - request url: urlObject "Modify the URL of the current request object to urlObject. This is done using ZnUrl>>#inContextOf: so that either scheme, diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/username.password..st b/repository/Zinc-HTTP.package/ZnClient.class/instance/username.password..st index 1ed36bef..80ea44ad 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/username.password..st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/username.password..st @@ -1,4 +1,4 @@ -accessing request +accessing - request username: username password: password "Set the username/password for basic authenticationfor the current request." diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/writeRequest.st b/repository/Zinc-HTTP.package/ZnClient.class/instance/writeRequest.st index 33ebe9b4..ff296389 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/writeRequest.st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/writeRequest.st @@ -1,4 +1,4 @@ -private protocol +private - protocol writeRequest self signalHTTPProgress: 'Writing request'. self withDefaultCharacterEncoderDo: [ request writeOn: connection ]. diff --git a/repository/Zinc-HTTP.package/ZnHtmlOutputStream.class/instance/closeTag..st b/repository/Zinc-HTTP.package/ZnHtmlOutputStream.class/instance/closeTag..st index 194cfb26..a0b8a797 100644 --- a/repository/Zinc-HTTP.package/ZnHtmlOutputStream.class/instance/closeTag..st +++ b/repository/Zinc-HTTP.package/ZnHtmlOutputStream.class/instance/closeTag..st @@ -1,4 +1,4 @@ -private html +private - html closeTag: tag stream nextPut: $<; diff --git a/repository/Zinc-HTTP.package/ZnHtmlOutputStream.class/instance/openTag..st b/repository/Zinc-HTTP.package/ZnHtmlOutputStream.class/instance/openTag..st index 87c00b0d..3f07f4e5 100644 --- a/repository/Zinc-HTTP.package/ZnHtmlOutputStream.class/instance/openTag..st +++ b/repository/Zinc-HTTP.package/ZnHtmlOutputStream.class/instance/openTag..st @@ -1,4 +1,4 @@ -private html +private - html openTag: tag stream nextPut: $<; diff --git a/repository/Zinc-HTTP.package/ZnHtmlOutputStream.class/instance/openTag.attribute.value..st b/repository/Zinc-HTTP.package/ZnHtmlOutputStream.class/instance/openTag.attribute.value..st index 4aab882d..7928d0f5 100644 --- a/repository/Zinc-HTTP.package/ZnHtmlOutputStream.class/instance/openTag.attribute.value..st +++ b/repository/Zinc-HTTP.package/ZnHtmlOutputStream.class/instance/openTag.attribute.value..st @@ -1,4 +1,4 @@ -private html +private - html openTag: tag attribute: name value: value stream nextPut: $<; diff --git a/repository/Zinc-HTTP.package/ZnHtmlOutputStream.class/instance/openTag.attributes..st b/repository/Zinc-HTTP.package/ZnHtmlOutputStream.class/instance/openTag.attributes..st index ba3b1d43..51ea13c2 100644 --- a/repository/Zinc-HTTP.package/ZnHtmlOutputStream.class/instance/openTag.attributes..st +++ b/repository/Zinc-HTTP.package/ZnHtmlOutputStream.class/instance/openTag.attributes..st @@ -1,4 +1,4 @@ -private html +private - html openTag: tag attributes: attributes stream nextPut: $<; diff --git a/repository/Zinc-HTTP.package/ZnHtmlOutputStream.class/instance/renderAttributes..st b/repository/Zinc-HTTP.package/ZnHtmlOutputStream.class/instance/renderAttributes..st index c717a784..6ee10a3d 100644 --- a/repository/Zinc-HTTP.package/ZnHtmlOutputStream.class/instance/renderAttributes..st +++ b/repository/Zinc-HTTP.package/ZnHtmlOutputStream.class/instance/renderAttributes..st @@ -1,4 +1,4 @@ -private html +private - html renderAttributes: attributes attributes pairsDo: [ :name :value | stream space; nextPutAll: name. diff --git a/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/authenticateAndDelegateRequest..st b/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/authenticateAndDelegateRequest..st index ed13395a..4b10d9c8 100644 --- a/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/authenticateAndDelegateRequest..st +++ b/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/authenticateAndDelegateRequest..st @@ -1,7 +1,7 @@ request handling authenticateAndDelegateRequest: request "Handle request and return a response. - If we have a delegate, pass the responsability. + If we have a delegate, pass the responsibility. If we have no delegate, we return a page not found. Make sure to pass via our authenticator." diff --git a/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/authenticateRequest.do..st b/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/authenticateRequest.do..st index bf773408..889971e0 100644 --- a/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/authenticateRequest.do..st +++ b/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/authenticateRequest.do..st @@ -1,7 +1,7 @@ request handling authenticateRequest: request do: block "Validate request and execute block. - When our authenticator is not nil, pass the responsability" + When our authenticator is not nil, pass the responsibility" ^ self authenticator ifNil: [ block value ] diff --git a/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logConnectionAccepted..st b/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logConnectionAccepted..st index 9722d266..755f7353 100644 --- a/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logConnectionAccepted..st +++ b/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logConnectionAccepted..st @@ -1,4 +1,4 @@ -private logging +private - logging logConnectionAccepted: socket logLevel < 3 ifTrue: [ ^ nil ]. ^ (self newLogEvent: ZnConnectionAcceptedEvent) diff --git a/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logConnectionClosed..st b/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logConnectionClosed..st index 883d1816..21cd3513 100644 --- a/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logConnectionClosed..st +++ b/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logConnectionClosed..st @@ -1,4 +1,4 @@ -private logging +private - logging logConnectionClosed: socketStream logLevel < 3 ifTrue: [ ^ nil ]. socketStream socket ifNil: [ ^ nil ]. diff --git a/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logRequest.response.handledStarted..st b/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logRequest.response.handledStarted..st index d6efc3d2..72ab1e52 100644 --- a/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logRequest.response.handledStarted..st +++ b/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logRequest.response.handledStarted..st @@ -1,4 +1,4 @@ -private logging +private - logging logRequest: request response: response handledStarted: initialMilliseconds ^ logLevel < 3 ifTrue: [ Time millisecondsSince: initialMilliseconds ] diff --git a/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logRequestRead.started..st b/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logRequestRead.started..st index 2737c0cf..21b9ae8c 100644 --- a/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logRequestRead.started..st +++ b/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logRequestRead.started..st @@ -1,4 +1,4 @@ -private logging +private - logging logRequestRead: request started: initialMilliseconds ^ logLevel < 3 ifTrue: [ Time millisecondsSince: initialMilliseconds ] diff --git a/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logResponseWritten.started..st b/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logResponseWritten.started..st index 22642016..e183ae81 100644 --- a/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logResponseWritten.started..st +++ b/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logResponseWritten.started..st @@ -1,4 +1,4 @@ -private logging +private - logging logResponseWritten: response started: initialMilliseconds ^ logLevel < 3 ifTrue: [ Time millisecondsSince: initialMilliseconds ] diff --git a/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logServerGeneric..st b/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logServerGeneric..st index f16297e5..d8b168ae 100644 --- a/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logServerGeneric..st +++ b/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logServerGeneric..st @@ -1,4 +1,4 @@ -private logging +private - logging logServerGeneric: subject ^ (self newLogEvent: ZnServerGenericLogEvent) subject: subject; diff --git a/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logServerHandlerError..st b/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logServerHandlerError..st index 8dd0ddd1..ffec1325 100644 --- a/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logServerHandlerError..st +++ b/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logServerHandlerError..st @@ -1,4 +1,4 @@ -private logging +private - logging logServerHandlerError: exception ^ (self newLogEvent: ZnServerHandlerErrorEvent) exception: exception; diff --git a/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logServerReadError..st b/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logServerReadError..st index 73bc9bf3..8db25719 100644 --- a/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logServerReadError..st +++ b/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logServerReadError..st @@ -1,4 +1,4 @@ -private logging +private - logging logServerReadError: exception logLevel < 3 ifTrue: [ ^ nil ]. ^ (self newLogEvent: ZnServerReadErrorEvent) diff --git a/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logServerSocketBound.st b/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logServerSocketBound.st index 341b88b9..2b428332 100644 --- a/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logServerSocketBound.st +++ b/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logServerSocketBound.st @@ -1,4 +1,4 @@ -private logging +private - logging logServerSocketBound logLevel < 1 ifTrue: [ ^ nil ]. ^ (self newLogEvent: ZnServerSocketBoundEvent) diff --git a/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logServerSocketReleasedAddress.port..st b/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logServerSocketReleasedAddress.port..st index 31e5de61..7397d24f 100644 --- a/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logServerSocketReleasedAddress.port..st +++ b/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logServerSocketReleasedAddress.port..st @@ -1,4 +1,4 @@ -private logging +private - logging logServerSocketReleasedAddress: address port: port logLevel < 1 ifTrue: [ ^ nil ]. ^ (self newLogEvent: ZnServerSocketReleasedEvent) diff --git a/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logServerTransactionRequest.response.timing..st b/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logServerTransactionRequest.response.timing..st index 5688ab4a..ab041822 100644 --- a/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logServerTransactionRequest.response.timing..st +++ b/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logServerTransactionRequest.response.timing..st @@ -1,4 +1,4 @@ -private logging +private - logging logServerTransactionRequest: request response: response timing: timing | logEventClass | logLevel < 1 ifTrue: [ ^ nil ]. diff --git a/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logServerWriteError..st b/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logServerWriteError..st index 3f24c75a..5fd65270 100644 --- a/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logServerWriteError..st +++ b/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logServerWriteError..st @@ -1,4 +1,4 @@ -private logging +private - logging logServerWriteError: exception logLevel < 3 ifTrue: [ ^ nil ]. ^ (self newLogEvent: ZnServerWriteErrorEvent) diff --git a/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logStarted.st b/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logStarted.st index f73dfce0..8d36572f 100644 --- a/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logStarted.st +++ b/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logStarted.st @@ -1,4 +1,4 @@ -private logging +private - logging logStarted logLevel < 1 ifTrue: [ ^ nil ]. ^ (self newLogEvent: ZnServerStartedEvent) diff --git a/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logStopped.st b/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logStopped.st index 8d77e68e..39b06fe5 100644 --- a/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logStopped.st +++ b/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/logStopped.st @@ -1,4 +1,4 @@ -private logging +private - logging logStopped logLevel < 1 ifTrue: [ ^ nil ]. ^ (self newLogEvent: ZnServerStoppedEvent) diff --git a/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/newLogEvent..st b/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/newLogEvent..st index 41dd4330..629bf0cd 100644 --- a/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/newLogEvent..st +++ b/repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/newLogEvent..st @@ -1,4 +1,4 @@ -private logging +private - logging newLogEvent: logEventClass ^ logEventClass new serverId: self route; diff --git a/repository/Zinc-HTTP.package/ZnUtils.class/class/capitalizeString..st b/repository/Zinc-HTTP.package/ZnUtils.class/class/capitalizeString..st index 22b05cb3..1be416df 100644 --- a/repository/Zinc-HTTP.package/ZnUtils.class/class/capitalizeString..st +++ b/repository/Zinc-HTTP.package/ZnUtils.class/class/capitalizeString..st @@ -1,4 +1,4 @@ -conversions +converting capitalizeString: string | capitalExpected | capitalExpected := true. diff --git a/repository/Zinc-HTTP.package/ZnUtils.class/class/decodeBase64..st b/repository/Zinc-HTTP.package/ZnUtils.class/class/decodeBase64..st index cce8cc2f..0c6e72de 100644 --- a/repository/Zinc-HTTP.package/ZnUtils.class/class/decodeBase64..st +++ b/repository/Zinc-HTTP.package/ZnUtils.class/class/decodeBase64..st @@ -1,4 +1,4 @@ -conversions +converting decodeBase64: string | bytes | bytes := ZnBase64Encoder new decode: string. diff --git a/repository/Zinc-HTTP.package/ZnUtils.class/class/encodeBase64..st b/repository/Zinc-HTTP.package/ZnUtils.class/class/encodeBase64..st index 34d1623e..384249ff 100644 --- a/repository/Zinc-HTTP.package/ZnUtils.class/class/encodeBase64..st +++ b/repository/Zinc-HTTP.package/ZnUtils.class/class/encodeBase64..st @@ -1,4 +1,4 @@ -conversions +converting encodeBase64: string | bytes | bytes := ZnNullEncoder new encodeString: string. diff --git a/repository/Zinc-HTTP.package/ZnUtils.class/class/httpDate..st b/repository/Zinc-HTTP.package/ZnUtils.class/class/httpDate..st index 36a73ddb..5cdccc65 100644 --- a/repository/Zinc-HTTP.package/ZnUtils.class/class/httpDate..st +++ b/repository/Zinc-HTTP.package/ZnUtils.class/class/httpDate..st @@ -1,4 +1,4 @@ -conversions +converting httpDate: object "Answers a string formatting object as time stamp for HTTP1.1 (RFC 1123). Eg. Sun, 06 Nov 1994 08:49:37 GMT" diff --git a/repository/Zinc-HTTP.package/ZnUtils.class/class/httpDate.st b/repository/Zinc-HTTP.package/ZnUtils.class/class/httpDate.st index 5ca9aebb..3c26bcaa 100644 --- a/repository/Zinc-HTTP.package/ZnUtils.class/class/httpDate.st +++ b/repository/Zinc-HTTP.package/ZnUtils.class/class/httpDate.st @@ -1,3 +1,3 @@ -conversions +converting httpDate ^ self httpDate: DateAndTime now \ No newline at end of file diff --git a/repository/Zinc-HTTP.package/ZnUtils.class/class/parseHttpDate..st b/repository/Zinc-HTTP.package/ZnUtils.class/class/parseHttpDate..st index 4f224848..87b711c9 100644 --- a/repository/Zinc-HTTP.package/ZnUtils.class/class/parseHttpDate..st +++ b/repository/Zinc-HTTP.package/ZnUtils.class/class/parseHttpDate..st @@ -1,4 +1,4 @@ -conversions +converting parseHttpDate: string "self parseHttpDate: 'Tue, 13 Sep 2011 08:04:49 GMT'." "self parseHttpDate: 'Tue, 13-Sep-2011 08:04:51 GMT'." diff --git a/repository/Zinc-HTTP.package/ZnUtils.class/class/trimString..st b/repository/Zinc-HTTP.package/ZnUtils.class/class/trimString..st index 635f04d0..251d65b5 100644 --- a/repository/Zinc-HTTP.package/ZnUtils.class/class/trimString..st +++ b/repository/Zinc-HTTP.package/ZnUtils.class/class/trimString..st @@ -1,4 +1,4 @@ -conversions +converting trimString: string "Until String>>#trimBoth is available everywhere" diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnResourceMetaUtils.class/class/decodePercent..st b/repository/Zinc-Resource-Meta-Core.package/ZnResourceMetaUtils.class/class/decodePercent..st index f71d1cc0..ac2e752c 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnResourceMetaUtils.class/class/decodePercent..st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnResourceMetaUtils.class/class/decodePercent..st @@ -1,4 +1,4 @@ -conversions +converting decodePercent: string ^ ZnPercentEncoder new decodePlusAsSpace: false; diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnResourceMetaUtils.class/class/decodePercentForQuery..st b/repository/Zinc-Resource-Meta-Core.package/ZnResourceMetaUtils.class/class/decodePercentForQuery..st index 440648b3..f57cee8a 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnResourceMetaUtils.class/class/decodePercentForQuery..st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnResourceMetaUtils.class/class/decodePercentForQuery..st @@ -1,4 +1,4 @@ -conversions +converting decodePercentForQuery: string ^ ZnPercentEncoder new decodePlusAsSpace: true; diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnResourceMetaUtils.class/class/encodePercent.safeSet.encoder..st b/repository/Zinc-Resource-Meta-Core.package/ZnResourceMetaUtils.class/class/encodePercent.safeSet.encoder..st index 7c8f951f..f1ae51c7 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnResourceMetaUtils.class/class/encodePercent.safeSet.encoder..st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnResourceMetaUtils.class/class/encodePercent.safeSet.encoder..st @@ -1,4 +1,4 @@ -conversions +converting encodePercent: string safeSet: safeSet encoder: encoder ^ ZnPercentEncoder new characterEncoder: encoder; diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnResourceMetaUtils.class/class/parseQueryFrom..st b/repository/Zinc-Resource-Meta-Core.package/ZnResourceMetaUtils.class/class/parseQueryFrom..st index 91b07cdb..90011aaa 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnResourceMetaUtils.class/class/parseQueryFrom..st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnResourceMetaUtils.class/class/parseQueryFrom..st @@ -1,4 +1,4 @@ -conversions +converting parseQueryFrom: stream | string index fields | fields := ZnMultiValueDictionary new. diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnResourceMetaUtils.class/class/writeQueryFields.on..st b/repository/Zinc-Resource-Meta-Core.package/ZnResourceMetaUtils.class/class/writeQueryFields.on..st index d2a00b70..69a26d5a 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnResourceMetaUtils.class/class/writeQueryFields.on..st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnResourceMetaUtils.class/class/writeQueryFields.on..st @@ -1,3 +1,3 @@ -conversions +converting writeQueryFields: dictionary on: stream self writeQueryFields: dictionary withEncoder: ZnCharacterEncoder utf8 on: stream \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnResourceMetaUtils.class/class/writeQueryFields.withEncoder.on..st b/repository/Zinc-Resource-Meta-Core.package/ZnResourceMetaUtils.class/class/writeQueryFields.withEncoder.on..st index 4656cc14..1796df2e 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnResourceMetaUtils.class/class/writeQueryFields.withEncoder.on..st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnResourceMetaUtils.class/class/writeQueryFields.withEncoder.on..st @@ -1,4 +1,4 @@ -conversions +converting writeQueryFields: dictionary withEncoder: encoder on: stream | first | first := true. diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/addPathSegment..st b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/addPathSegment..st index ed8da7cb..502febd3 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/addPathSegment..st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/addPathSegment..st @@ -1,4 +1,4 @@ -accessing-path +accessing - path addPathSegment: segment "Modify the receiver's path by adding segment at the end" diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/addPathSegments..st b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/addPathSegments..st index adc117bd..e12c28da 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/addPathSegments..st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/addPathSegments..st @@ -1,4 +1,4 @@ -accessing-path +accessing - path addPathSegments: pathSegments "Modify the receiver's path by adding the elements of pathSegments at the end" diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/clearPath.st b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/clearPath.st index 1c9c5fa1..d436a7d1 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/clearPath.st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/clearPath.st @@ -1,4 +1,4 @@ -accessing-path +accessing - path clearPath self hasPath ifTrue: [ segments removeAll ] \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/closePath.st b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/closePath.st index 67ca1438..efa69193 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/closePath.st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/closePath.st @@ -1,4 +1,4 @@ -accessing-path +accessing - path closePath self isDirectoryPath - ifFalse: [ self addPathSegment: $/ ] \ No newline at end of file + ifFalse: [ self addPathSegment: #/ ] \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/directory.st b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/directory.st index 48f73152..fce1647b 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/directory.st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/directory.st @@ -1,4 +1,4 @@ -accessing-path +accessing - path directory ^ self isDirectoryPath ifTrue: [ self path ] diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/file.st b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/file.st index 72a74cd2..7ae88b33 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/file.st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/file.st @@ -1,4 +1,4 @@ -accessing-path +accessing - path file ^ self isDirectoryPath ifTrue: [ String new ] diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/firstPathSegment.st b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/firstPathSegment.st index 5888da76..d27e4f01 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/firstPathSegment.st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/firstPathSegment.st @@ -1,4 +1,4 @@ -accessing-path +accessing - path firstPathSegment ^ self isSlash ifTrue: [ nil ] diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/lastPathSegment.st b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/lastPathSegment.st index 988764d6..17bc725a 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/lastPathSegment.st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/lastPathSegment.st @@ -1,4 +1,4 @@ -accessing-path +accessing - path lastPathSegment ^ self isSlash ifTrue: [ nil ] diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/pathSegments.st b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/pathSegments.st index 638200fd..35bccd4e 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/pathSegments.st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/pathSegments.st @@ -1,3 +1,3 @@ -accessing-path +accessing - path pathSegments ^ segments ifNil: [ #() ] \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/queryAddAll..st b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/queryAddAll..st index 4b43da57..8bc7dac5 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/queryAddAll..st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/queryAddAll..st @@ -1,4 +1,4 @@ -accessing-query +accessing - query queryAddAll: keyedCollection "Add all key/value pairs in keyedCollection as query parameters to the receiver. Note that we use #addAllMulti:" diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/queryAt..st b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/queryAt..st index ed5b7316..ac4ebf87 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/queryAt..st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/queryAt..st @@ -1,4 +1,4 @@ -accessing-query +accessing - query queryAt: key "Return the value of the query parameter key in the receiver. Signal a KeyNotFound exception if there is no such parameter" diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/queryAt.ifAbsent..st b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/queryAt.ifAbsent..st index d3989394..d6f6b94e 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/queryAt.ifAbsent..st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/queryAt.ifAbsent..st @@ -1,4 +1,4 @@ -accessing-query +accessing - query queryAt: key ifAbsent: block "Return the value of the query parameter key in the receiver. Execute block if there is no such parameter" diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/queryAt.ifPresent..st b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/queryAt.ifPresent..st index f30c83b6..7053b3e9 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/queryAt.ifPresent..st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/queryAt.ifPresent..st @@ -1,4 +1,4 @@ -accessing-query +accessing - query queryAt: key ifPresent: block "Execute block with the value of the query parameter named key as value. Return nil if there is no such parameter" diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/queryDo..st b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/queryDo..st index 2f0b47fb..4fccae65 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/queryDo..st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/queryDo..st @@ -1,4 +1,4 @@ -accessing-query +accessing - query queryDo: block "Execute block for each query key/value pair in the receiver" diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/queryKeys.st b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/queryKeys.st index ac5c3e64..3ffa24be 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/queryKeys.st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/queryKeys.st @@ -1,4 +1,4 @@ -accessing-query +accessing - query queryKeys "Return the collection of all query keys in the receiver" diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/queryRemoveAll.st b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/queryRemoveAll.st index 073719aa..f459d1e5 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/queryRemoveAll.st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/queryRemoveAll.st @@ -1,4 +1,4 @@ -accessing-query +accessing - query queryRemoveAll "Modify the receiver by removing all query parameters" diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/queryRemoveKey..st b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/queryRemoveKey..st index fc859b33..a4a1c0af 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/queryRemoveKey..st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/queryRemoveKey..st @@ -1,4 +1,4 @@ -accessing-query +accessing - query queryRemoveKey: key "Modify the receiver by remove the query parameter named key. Do nothing if there is no such parameter" diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/removeFirstPathSegment.st b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/removeFirstPathSegment.st index 15f2a56d..c3e0a2c2 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/removeFirstPathSegment.st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/removeFirstPathSegment.st @@ -1,4 +1,4 @@ -accessing-path +accessing - path removeFirstPathSegment self hasPath ifTrue: [ segments removeFirst ] \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/removeLastPathSegment.st b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/removeLastPathSegment.st index 1adbadd6..3e57227c 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/removeLastPathSegment.st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/removeLastPathSegment.st @@ -1,4 +1,4 @@ -accessing-path +accessing - path removeLastPathSegment self hasPath ifTrue: [ segments removeLast ] \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnUrlOperation.class/class/handlesOperation.with.on..st b/repository/Zinc-Resource-Meta-Core.package/ZnUrlOperation.class/class/handlesOperation.with.on..st index f4c4e925..e6b27c28 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnUrlOperation.class/class/handlesOperation.with.on..st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnUrlOperation.class/class/handlesOperation.with.on..st @@ -1,4 +1,4 @@ -acccessing +accessing handlesOperation: operation with: argument on: url "Return true when my instances can handle operation with argument on url. This can optionally be overridden for a more specific test." diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnUrlOperation.class/class/operation.st b/repository/Zinc-Resource-Meta-Core.package/ZnUrlOperation.class/class/operation.st index d75e2d97..cba2f2e3 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnUrlOperation.class/class/operation.st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnUrlOperation.class/class/operation.st @@ -1,4 +1,4 @@ -acccessing +accessing operation "Return the operation that I implement. Subclasses can/should override this method." diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnUrlOperation.class/class/schemes.st b/repository/Zinc-Resource-Meta-Core.package/ZnUrlOperation.class/class/schemes.st index 29606050..fddf028c 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnUrlOperation.class/class/schemes.st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnUrlOperation.class/class/schemes.st @@ -1,4 +1,4 @@ -acccessing +accessing schemes "Return a collection of scheme identifiers that I handle. Subclasses can/should override this method." diff --git a/repository/Zinc-Resource-Meta-Tests.package/ZnFileUrlTest.class/instance/testTrailingSlash.st b/repository/Zinc-Resource-Meta-Tests.package/ZnFileUrlTest.class/instance/testTrailingSlash.st index 118473e6..42821070 100644 --- a/repository/Zinc-Resource-Meta-Tests.package/ZnFileUrlTest.class/instance/testTrailingSlash.st +++ b/repository/Zinc-Resource-Meta-Tests.package/ZnFileUrlTest.class/instance/testTrailingSlash.st @@ -1,13 +1,12 @@ testing testTrailingSlash | fileReference1 fileReference2 fileUrl1 fileUrl2 | - fileReference1 := '/foo/bar' asFileReference. fileReference2 := '/foo/bar/' asFileReference. self assert: fileReference1 equals: fileReference2. self assert: fileReference1 asZnUrl equals: fileReference2 asZnUrl. - + fileUrl1 := 'file:///foo/bar' asZnUrl. fileUrl2 := 'file:///foo/bar/' asZnUrl. - self deny: fileUrl1 = fileUrl2. + self deny: fileUrl1 equals: fileUrl2. self assert: fileUrl1 asFileReference equals: fileUrl2 asFileReference \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Tests.package/ZnMimeTypeTest.class/instance/testCharset.st b/repository/Zinc-Resource-Meta-Tests.package/ZnMimeTypeTest.class/instance/testCharset.st index 387d27ab..dcfdb0fe 100644 --- a/repository/Zinc-Resource-Meta-Tests.package/ZnMimeTypeTest.class/instance/testCharset.st +++ b/repository/Zinc-Resource-Meta-Tests.package/ZnMimeTypeTest.class/instance/testCharset.st @@ -1,6 +1,8 @@ testing testCharset + | mimeType | + mimeType := ZnMimeType textPlain. self assert: mimeType charSet equals: 'utf-8'. mimeType charSet: 'ascii'. diff --git a/repository/Zinc-Resource-Meta-Tests.package/ZnMimeTypeTest.class/instance/testComparingWithParameters.st b/repository/Zinc-Resource-Meta-Tests.package/ZnMimeTypeTest.class/instance/testComparingWithParameters.st index 08261943..402db798 100644 --- a/repository/Zinc-Resource-Meta-Tests.package/ZnMimeTypeTest.class/instance/testComparingWithParameters.st +++ b/repository/Zinc-Resource-Meta-Tests.package/ZnMimeTypeTest.class/instance/testComparingWithParameters.st @@ -1,4 +1,4 @@ -tests +testing testComparingWithParameters | mimeType equalMimeType | diff --git a/repository/Zinc-Resource-Meta-Tests.package/ZnMimeTypeTest.class/instance/testCopying.st b/repository/Zinc-Resource-Meta-Tests.package/ZnMimeTypeTest.class/instance/testCopying.st index 00b17052..cb8388c4 100644 --- a/repository/Zinc-Resource-Meta-Tests.package/ZnMimeTypeTest.class/instance/testCopying.st +++ b/repository/Zinc-Resource-Meta-Tests.package/ZnMimeTypeTest.class/instance/testCopying.st @@ -10,5 +10,5 @@ testCopying mimeType2 charSet: 'latin1'. self assert: mimeType2 charSet equals: 'latin1'. self assert: (mimeType1 matches: mimeType2). - self deny: mimeType1 parameters = mimeType2 parameters. - self deny: mimeType1 charSet = mimeType2 charSet \ No newline at end of file + self deny: mimeType1 parameters equals: mimeType2 parameters. + self deny: mimeType1 charSet equals: mimeType2 charSet \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Tests.package/ZnMimeTypeTest.class/instance/testDefault.st b/repository/Zinc-Resource-Meta-Tests.package/ZnMimeTypeTest.class/instance/testDefault.st index e2dec3ac..8aa929a6 100644 --- a/repository/Zinc-Resource-Meta-Tests.package/ZnMimeTypeTest.class/instance/testDefault.st +++ b/repository/Zinc-Resource-Meta-Tests.package/ZnMimeTypeTest.class/instance/testDefault.st @@ -1,3 +1,4 @@ testing testDefault + self assert: ZnMimeType default equals: ZnMimeType applicationOctetStream \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Tests.package/ZnMimeTypeTest.class/instance/testIdentity.st b/repository/Zinc-Resource-Meta-Tests.package/ZnMimeTypeTest.class/instance/testIdentity.st index 75aac5ce..dbfe7e7b 100644 --- a/repository/Zinc-Resource-Meta-Tests.package/ZnMimeTypeTest.class/instance/testIdentity.st +++ b/repository/Zinc-Resource-Meta-Tests.package/ZnMimeTypeTest.class/instance/testIdentity.st @@ -1,3 +1,4 @@ testing testIdentity + self assert: ZnMimeType textPlain equals: ZnMimeType textPlain \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Tests.package/ZnMimeTypeTest.class/instance/testReading.st b/repository/Zinc-Resource-Meta-Tests.package/ZnMimeTypeTest.class/instance/testReading.st index f29a7ebc..2df1d19b 100644 --- a/repository/Zinc-Resource-Meta-Tests.package/ZnMimeTypeTest.class/instance/testReading.st +++ b/repository/Zinc-Resource-Meta-Tests.package/ZnMimeTypeTest.class/instance/testReading.st @@ -1,6 +1,8 @@ testing testReading + | mimeType | + mimeType := ZnMimeType fromString: 'text/plain; charset=utf-8'. self assert: mimeType main equals: 'text'. self assert: mimeType sub equals: 'plain'. diff --git a/repository/Zinc-Resource-Meta-Tests.package/ZnMimeTypeTest.class/instance/testWriting.st b/repository/Zinc-Resource-Meta-Tests.package/ZnMimeTypeTest.class/instance/testWriting.st index 25a2ae22..6b5fdc5a 100644 --- a/repository/Zinc-Resource-Meta-Tests.package/ZnMimeTypeTest.class/instance/testWriting.st +++ b/repository/Zinc-Resource-Meta-Tests.package/ZnMimeTypeTest.class/instance/testWriting.st @@ -1,8 +1,9 @@ testing testWriting + | mimeType | - (mimeType := ZnMimeType main: 'text' sub: 'plain') - charSet: 'utf-8'. + + ( mimeType := ZnMimeType main: 'text' sub: 'plain' ) charSet: 'utf-8'. self assert: mimeType printString equals: 'text/plain;charset=utf-8'. self assert: mimeType isCharSetUTF8. self assert: mimeType isBinary not \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Tests.package/ZnMultiValueDictionaryTest.class/instance/testMultiValues.st b/repository/Zinc-Resource-Meta-Tests.package/ZnMultiValueDictionaryTest.class/instance/testMultiValues.st index dd698991..94bcddb8 100644 --- a/repository/Zinc-Resource-Meta-Tests.package/ZnMultiValueDictionaryTest.class/instance/testMultiValues.st +++ b/repository/Zinc-Resource-Meta-Tests.package/ZnMultiValueDictionaryTest.class/instance/testMultiValues.st @@ -2,12 +2,16 @@ testing testMultiValues | dictionary values keys | dictionary := ZnMultiValueDictionary new. - dictionary at: 'foo' add: 1; at: 'foo' add: 2. - self assert: (dictionary at: 'foo') = #(1 2). - self assert: dictionary keys asArray = #('foo'). + dictionary + at: 'foo' add: 1; + at: 'foo' add: 2. + self assert: (dictionary at: 'foo') equals: #(1 2). + self assert: dictionary keys asArray equals: #('foo'). values := OrderedCollection new. keys := OrderedCollection new. - dictionary keysAndValuesDo: [ :key :value | keys add: key. values add: value ]. - self assert: values = (OrderedCollection with: 1 with: 2). - self assert: keys = (OrderedCollection with: 'foo' with: 'foo') - \ No newline at end of file + dictionary + keysAndValuesDo: [ :key :value | + keys add: key. + values add: value ]. + self assert: values equals: (OrderedCollection with: 1 with: 2). + self assert: keys equals: (OrderedCollection with: 'foo' with: 'foo') \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Tests.package/ZnResourceMetaUtilsTest.class/instance/testQueryParsing.st b/repository/Zinc-Resource-Meta-Tests.package/ZnResourceMetaUtilsTest.class/instance/testQueryParsing.st index 2a191ebc..1dc3215b 100644 --- a/repository/Zinc-Resource-Meta-Tests.package/ZnResourceMetaUtilsTest.class/instance/testQueryParsing.st +++ b/repository/Zinc-Resource-Meta-Tests.package/ZnResourceMetaUtilsTest.class/instance/testQueryParsing.st @@ -1,8 +1,7 @@ testing testQueryParsing | string fields | - string := 'foo=100&x=', (ZnPercentEncoder new encode: '/a b'). + string := 'foo=100&x=' , (ZnPercentEncoder new encode: '/a b'). fields := ZnResourceMetaUtils parseQueryFrom: string readStream. - self assert: (fields at: 'foo') = '100'. - self assert: (fields at: 'x') = '/a b'. - \ No newline at end of file + self assert: (fields at: 'foo') equals: '100'. + self assert: (fields at: 'x') equals: '/a b' \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testAuthority.st b/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testAuthority.st index 483104c3..b6697f7a 100644 --- a/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testAuthority.st +++ b/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testAuthority.st @@ -1,4 +1,4 @@ testing testAuthority - self assert: 'http://localhost:8080/foo/bar/doc.txt' asZnUrl authority = 'localhost:8080'. - self assert: 'http://www.google.com?q=Smalltalk' asZnUrl authority = 'www.google.com' \ No newline at end of file + self assert: 'http://localhost:8080/foo/bar/doc.txt' asZnUrl authority equals: 'localhost:8080'. + self assert: 'http://www.google.com?q=Smalltalk' asZnUrl authority equals: 'www.google.com' \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testDefaultScheme.st b/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testDefaultScheme.st index 5e2ef775..aa281c9b 100644 --- a/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testDefaultScheme.st +++ b/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testDefaultScheme.st @@ -1,9 +1,8 @@ testing testDefaultScheme | url | - url := ZnUrl fromString: 'www.example.com/foo.html' defaultScheme: #http. + url := ZnUrl fromString: 'www.example.com/foo.html' defaultScheme: #http. self assert: url hasScheme. - self assert: url scheme = #http. - self assert: url host = 'www.example.com'. - self assert: url pathSegments = (OrderedCollection with: 'foo.html') - \ No newline at end of file + self assert: url scheme equals: #http. + self assert: url host equals: 'www.example.com'. + self assert: url pathSegments equals: (OrderedCollection with: 'foo.html') \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testDefaultSchemeAndPort.st b/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testDefaultSchemeAndPort.st index 221d898d..51e35b8d 100644 --- a/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testDefaultSchemeAndPort.st +++ b/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testDefaultSchemeAndPort.st @@ -6,6 +6,5 @@ testDefaultSchemeAndPort self assert: url hasPort not. self assert: url port isNil. self assert: url scheme isNil. - self assert: url schemeOrDefault = #http. - self assert: url portOrDefault = 80 - \ No newline at end of file + self assert: url schemeOrDefault equals: #http. + self assert: url portOrDefault equals: 80 \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testDefaults.st b/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testDefaults.st index 2229562e..270d2c7b 100644 --- a/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testDefaults.st +++ b/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testDefaults.st @@ -4,6 +4,5 @@ testDefaults url := '' asZnUrl asZnUrlWithDefaults. self assert: url hasScheme. self assert: url hasPort. - self assert: url scheme = #http. - self assert: url port = 80 - \ No newline at end of file + self assert: url scheme equals: #http. + self assert: url port equals: 80 \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testEncodedSlash.st b/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testEncodedSlash.st index c0430b51..5eaa3242 100644 --- a/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testEncodedSlash.st +++ b/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testEncodedSlash.st @@ -1,11 +1,10 @@ testing testEncodedSlash - self assert: 'http://example.com/foo//' asZnUrl pathPrintString = '/foo//'. - self assert: 'http://example.com/foo//bar/' asZnUrl pathPrintString = '/foo//bar/'. - self assert: 'http://example.com/foo//bar/file.txt' asZnUrl pathPrintString = '/foo//bar/file.txt'. - - self assert: 'http://example.com/foo/%2F' asZnUrl pathPrintString = '/foo/%2F'. - self assert: 'http://example.com/foo/%2Fbar/' asZnUrl pathPrintString = '/foo/%2Fbar/'. - self assert: 'http://example.com/foo/%2F/bar/' asZnUrl pathPrintString = '/foo/%2F/bar/'. - self assert: 'http://example.com/foo/%2Ffoo.txt' asZnUrl pathPrintString = '/foo/%2Ffoo.txt'. + self assert: 'http://example.com/foo//' asZnUrl pathPrintString equals: '/foo//'. + self assert: 'http://example.com/foo//bar/' asZnUrl pathPrintString equals: '/foo//bar/'. + self assert: 'http://example.com/foo//bar/file.txt' asZnUrl pathPrintString equals: '/foo//bar/file.txt'. + self assert: 'http://example.com/foo/%2F' asZnUrl pathPrintString equals: '/foo/%2F'. + self assert: 'http://example.com/foo/%2Fbar/' asZnUrl pathPrintString equals: '/foo/%2Fbar/'. + self assert: 'http://example.com/foo/%2F/bar/' asZnUrl pathPrintString equals: '/foo/%2F/bar/'. + self assert: 'http://example.com/foo/%2Ffoo.txt' asZnUrl pathPrintString equals: '/foo/%2Ffoo.txt' \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testParsePathOnly.st b/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testParsePathOnly.st index 37edc751..a2356276 100644 --- a/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testParsePathOnly.st +++ b/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testParsePathOnly.st @@ -6,10 +6,10 @@ testParsePathOnly self assert: url hasHost not. self assert: url hasPort not. self assert: url isAbsolute not. - self assert: url pathSegments = (OrderedCollection with: 'images' with: 'foo.png' ). - self assert: url firstPathSegment = 'images'. - self assert: url lastPathSegment = 'foo.png'. + self assert: url pathSegments equals: (OrderedCollection with: 'images' with: 'foo.png'). + self assert: url firstPathSegment equals: 'images'. + self assert: url lastPathSegment equals: 'foo.png'. self assert: url hasQuery. - self assert: (url queryAt: 'size') = 'large'. + self assert: (url queryAt: 'size') equals: 'large'. self assert: url hasFragment. - self assert: url fragment = 'center' \ No newline at end of file + self assert: url fragment equals: 'center' \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testParsingEscape.st b/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testParsingEscape.st index 7090f34a..51ee6017 100644 --- a/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testParsingEscape.st +++ b/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testParsingEscape.st @@ -2,4 +2,4 @@ testing testParsingEscape | url | url := ZnUrl fromString: 'http://localhost/foo%62%61%72'. - self assert: url firstPathSegment = 'foobar' \ No newline at end of file + self assert: url firstPathSegment equals: 'foobar' \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testParsingSimple.st b/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testParsingSimple.st index e6397c5b..89135030 100644 --- a/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testParsingSimple.st +++ b/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testParsingSimple.st @@ -2,11 +2,11 @@ testing testParsingSimple | url | url := ZnUrl fromString: 'http://www.example.com:8080/foo/bar/baz.txt?x=1&y=2#m1'. - self assert: url scheme = #http. - self assert: url host = 'www.example.com'. - self assert: url port = 8080. + self assert: url scheme equals: #http. + self assert: url host equals: 'www.example.com'. + self assert: url port equals: 8080. self assert: url hasPath. self assert: url isFilePath. self assert: url hasQuery. self assert: url hasFragment. - self assert: url fragment = 'm1' \ No newline at end of file + self assert: url fragment equals: 'm1' \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testPrintingSimple.st b/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testPrintingSimple.st index e8547840..137b7efb 100644 --- a/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testPrintingSimple.st +++ b/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testPrintingSimple.st @@ -9,11 +9,11 @@ testPrintingSimple addPathSegment: 'foo.html'; queryAt: 'q' put: '100'; fragment: 'mark'. - self assert: url authority = 'www.seaside.st:8080'. + self assert: url authority equals: 'www.seaside.st:8080'. self assert: url isAbsolute. self assert: url isFilePath. - self assert: url printString = 'http://www.seaside.st:8080/example/foo.html?q=100#mark'. - self assert: url file = 'foo.html'. - self assert: url directory = 'example'. - self assert: url pathPrintString = '/example/foo.html'. - self assert: url pathQueryFragmentPrintString = '/example/foo.html?q=100#mark' \ No newline at end of file + self assert: url printString equals: 'http://www.seaside.st:8080/example/foo.html?q=100#mark'. + self assert: url file equals: 'foo.html'. + self assert: url directory equals: 'example'. + self assert: url pathPrintString equals: '/example/foo.html'. + self assert: url pathQueryFragmentPrintString equals: '/example/foo.html?q=100#mark' \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testQuery.st b/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testQuery.st index 65071b80..7e8ccf75 100644 --- a/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testQuery.st +++ b/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testQuery.st @@ -2,4 +2,4 @@ testing testQuery | url | url := 'http://foo.com/test?q' asZnUrl. - self assert: url printString = 'http://foo.com/test?q' \ No newline at end of file + self assert: url printString equals: 'http://foo.com/test?q' \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testQueryEncoding.st b/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testQueryEncoding.st index db256973..428d7c06 100644 --- a/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testQueryEncoding.st +++ b/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testQueryEncoding.st @@ -4,7 +4,6 @@ testQueryEncoding url := 'http://www.google.com' asZnUrl. url addPathSegment: 'some encoding here'. url queryAt: 'and some encoding' put: 'here, too#'. - self assert: url printString = 'http://www.google.com/some%20encoding%20here?and%20some%20encoding=here,%20too%23'. - self assert: url path = 'some encoding here'. - self assert: (url queryAt: 'and some encoding') = 'here, too#' - \ No newline at end of file + self assert: url printString equals: 'http://www.google.com/some%20encoding%20here?and%20some%20encoding=here,%20too%23'. + self assert: url path equals: 'some encoding here'. + self assert: (url queryAt: 'and some encoding') equals: 'here, too#' \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testQueryManipulation.st b/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testQueryManipulation.st index 06923cfa..2f1ebfe9 100644 --- a/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testQueryManipulation.st +++ b/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testQueryManipulation.st @@ -4,8 +4,8 @@ testQueryManipulation url := 'http://www.google.com/?one=1&two=2' asZnUrl. url queryAt: 'three' put: '3'. url queryRemoveKey: 'one'. - self assert: url queryKeys sorted = #(three two). - self assert: (url queryAt: 'two') = '2'. - self assert: (url queryAt: 'three') = '3'. + self assert: url queryKeys sorted equals: #(three two). + self assert: (url queryAt: 'two') equals: '2'. + self assert: (url queryAt: 'three') equals: '3'. url queryRemoveAll. self deny: url hasQuery \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testQueryRemoveAll.st b/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testQueryRemoveAll.st index 46987b65..0a4e4cb6 100644 --- a/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testQueryRemoveAll.st +++ b/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testQueryRemoveAll.st @@ -4,8 +4,8 @@ testQueryRemoveAll do: [ :each | | url | url := 'http://foo.com/test?name=value' asZnUrl. - self deny: url = each asZnUrl. + self deny: url equals: each asZnUrl. url queryRemoveAll. self assert: url query isEmpty; - assert: url = each asZnUrl ] \ No newline at end of file + assert: url equals: each asZnUrl ] \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testRelative.st b/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testRelative.st index 680f6217..5a915597 100644 --- a/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testRelative.st +++ b/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testRelative.st @@ -4,4 +4,4 @@ testRelative url := 'http://api.foo.com:8080' asZnUrl. self assert: url isAbsolute. url parseFrom: '/user/1?format=full'. - self assert: url printString = 'http://api.foo.com:8080/user/1?format=full' \ No newline at end of file + self assert: url printString equals: 'http://api.foo.com:8080/user/1?format=full' \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testWriteUrlPathQueryFragmentOfOn.st b/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testWriteUrlPathQueryFragmentOfOn.st index 34a336d5..cf538e0c 100644 --- a/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testWriteUrlPathQueryFragmentOfOn.st +++ b/repository/Zinc-Resource-Meta-Tests.package/ZnUrlTest.class/instance/testWriteUrlPathQueryFragmentOfOn.st @@ -1,6 +1,5 @@ testing testWriteUrlPathQueryFragmentOfOn | string | - string := String streamContents: [ :stream | - 'http://host:7777/foo/bar/doc.txt?x=1#mark' asZnUrl printPathQueryFragmentOn: stream ]. - self assert: string = '/foo/bar/doc.txt?x=1#mark' \ No newline at end of file + string := String streamContents: [ :stream | 'http://host:7777/foo/bar/doc.txt?x=1#mark' asZnUrl printPathQueryFragmentOn: stream ]. + self assert: string equals: '/foo/bar/doc.txt?x=1#mark' \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnBivalentWriteStreamTest.class/instance/testByteWriting.st b/repository/Zinc-Tests.package/ZnBivalentWriteStreamTest.class/instance/testByteWriting.st index 10f47df5..864fa77b 100644 --- a/repository/Zinc-Tests.package/ZnBivalentWriteStreamTest.class/instance/testByteWriting.st +++ b/repository/Zinc-Tests.package/ZnBivalentWriteStreamTest.class/instance/testByteWriting.st @@ -1,7 +1,11 @@ testing testByteWriting | string | - string := String streamContents: [ :stream | | writeStream | - writeStream := ZnBivalentWriteStream on: stream. - writeStream nextPut: 97; nextPutAll: #(98 99) asByteArray ]. - self assert: string asByteArray = #(97 98 99) asByteArray \ No newline at end of file + string := String + streamContents: [ :stream | + | writeStream | + writeStream := ZnBivalentWriteStream on: stream. + writeStream + nextPut: 97; + nextPutAll: #(98 99) asByteArray ]. + self assert: string asByteArray equals: #(97 98 99) asByteArray \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnBivalentWriteStreamTest.class/instance/testCharacterWriting.st b/repository/Zinc-Tests.package/ZnBivalentWriteStreamTest.class/instance/testCharacterWriting.st index 16cc462a..f79ece91 100644 --- a/repository/Zinc-Tests.package/ZnBivalentWriteStreamTest.class/instance/testCharacterWriting.st +++ b/repository/Zinc-Tests.package/ZnBivalentWriteStreamTest.class/instance/testCharacterWriting.st @@ -1,7 +1,12 @@ testing testCharacterWriting | bytes | - bytes := ByteArray streamContents: [ :stream | | writeStream | - writeStream := ZnBivalentWriteStream on: stream. - writeStream nextPut: $a; space; nextPutAll: '123' ]. - self assert: bytes = 'a 123' asByteArray \ No newline at end of file + bytes := ByteArray + streamContents: [ :stream | + | writeStream | + writeStream := ZnBivalentWriteStream on: stream. + writeStream + nextPut: $a; + space; + nextPutAll: '123' ]. + self assert: bytes equals: 'a 123' asByteArray \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnClientTest.class/instance/testConstruction.st b/repository/Zinc-Tests.package/ZnClientTest.class/instance/testConstruction.st index f9a60963..2ff55ef8 100644 --- a/repository/Zinc-Tests.package/ZnClientTest.class/instance/testConstruction.st +++ b/repository/Zinc-Tests.package/ZnClientTest.class/instance/testConstruction.st @@ -10,7 +10,7 @@ testConstruction addPath: 'file.txt'; queryAt: 'key' put: '123456'; headerAt: 'X-token' put: 'ABCDEF'. - self assert: client request url host = 'www.example.com'. - self assert: client request url port = 8080. - self assert: client request url pathQueryFragmentPrintString = '/foo/a%20space/file.txt?key=123456'. - self assert: (client request headers at: 'X-token') = 'ABCDEF' \ No newline at end of file + self assert: client request url host equals: 'www.example.com'. + self assert: client request url port equals: 8080. + self assert: client request url pathQueryFragmentPrintString equals: '/foo/a%20space/file.txt?key=123456'. + self assert: (client request headers at: 'X-token') equals: 'ABCDEF' \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnClientTest.class/instance/testCookies.st b/repository/Zinc-Tests.package/ZnClientTest.class/instance/testCookies.st index e0bca725..8e800e0b 100644 --- a/repository/Zinc-Tests.package/ZnClientTest.class/instance/testCookies.st +++ b/repository/Zinc-Tests.package/ZnClientTest.class/instance/testCookies.st @@ -1,24 +1,31 @@ testing testCookies | client | - self withServerDo: [ :server | - server onRequestRespond: [ :request | | cookie1 cookie2 response | - cookie1 := request cookies detect: [ :each | each name = 'x' ] ifNone: [ ZnCookie name: 'x' value: '0' ]. - cookie2 := request cookies detect: [ :each | each name = 'y' ] ifNone: [ ZnCookie name: 'y' value: '100' ]. - cookie1 value: (cookie1 value asInteger + 1) asString. - cookie2 value: (cookie2 value asInteger + 2) asString. - response := ZnResponse ok: (ZnEntity text: 'OK'). - response addCookie: cookie1; addCookie: cookie2. - response ]. - client := ZnClient new url: server localUrl; yourself. - self assert: (client session cookieJar cookieAt: 'x' forUrl: client request url) isNil. - self assert: (client session cookieJar cookieAt: 'y' forUrl: client request url) isNil. - client get. - self assert: client isSuccess. - self assert: (client session cookieJar cookieAt: 'x' forUrl: client request url) value = '1'. - self assert: (client session cookieJar cookieAt: 'y' forUrl: client request url) value = '102'. - client get. - self assert: client isSuccess. - self assert: (client session cookieJar cookieAt: 'x' forUrl: client request url) value = '2'. - self assert: (client session cookieJar cookieAt: 'y' forUrl: client request url) value = '104'. - client close ] \ No newline at end of file + self + withServerDo: [ :server | + server + onRequestRespond: [ :request | + | cookie1 cookie2 response | + cookie1 := request cookies detect: [ :each | each name = 'x' ] ifNone: [ ZnCookie name: 'x' value: '0' ]. + cookie2 := request cookies detect: [ :each | each name = 'y' ] ifNone: [ ZnCookie name: 'y' value: '100' ]. + cookie1 value: (cookie1 value asInteger + 1) asString. + cookie2 value: (cookie2 value asInteger + 2) asString. + response := ZnResponse ok: (ZnEntity text: 'OK'). + response + addCookie: cookie1; + addCookie: cookie2. + response ]. + client := ZnClient new + url: server localUrl; + yourself. + self assert: (client session cookieJar cookieAt: 'x' forUrl: client request url) isNil. + self assert: (client session cookieJar cookieAt: 'y' forUrl: client request url) isNil. + client get. + self assert: client isSuccess. + self assert: (client session cookieJar cookieAt: 'x' forUrl: client request url) value equals: '1'. + self assert: (client session cookieJar cookieAt: 'y' forUrl: client request url) value equals: '102'. + client get. + self assert: client isSuccess. + self assert: (client session cookieJar cookieAt: 'x' forUrl: client request url) value equals: '2'. + self assert: (client session cookieJar cookieAt: 'y' forUrl: client request url) value equals: '104'. + client close ] \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnClientTest.class/instance/testGetSmallHTML.st b/repository/Zinc-Tests.package/ZnClientTest.class/instance/testGetSmallHTML.st index 998bd09a..72266798 100644 --- a/repository/Zinc-Tests.package/ZnClientTest.class/instance/testGetSmallHTML.st +++ b/repository/Zinc-Tests.package/ZnClientTest.class/instance/testGetSmallHTML.st @@ -6,7 +6,7 @@ testGetSmallHTML get. self assert: client isSuccess. self assert: client isContentTypeAcceptable. - self assert: client response contentType = ZnMimeType textHtml. + self assert: client response contentType equals: ZnMimeType textHtml. self assert: (client contents includesSubstring: 'Small'). self assert: client isConnected. client close. diff --git a/repository/Zinc-Tests.package/ZnClientTest.class/instance/testGetSmallHTMLBinary.st b/repository/Zinc-Tests.package/ZnClientTest.class/instance/testGetSmallHTMLBinary.st index 8c49c874..f40fdaa2 100644 --- a/repository/Zinc-Tests.package/ZnClientTest.class/instance/testGetSmallHTMLBinary.st +++ b/repository/Zinc-Tests.package/ZnClientTest.class/instance/testGetSmallHTMLBinary.st @@ -1,7 +1,6 @@ testing testGetSmallHTMLBinary | client html bytes | - (client := ZnClient new) url: self smallHtmlUrl; get. @@ -10,12 +9,14 @@ testGetSmallHTMLBinary self assert: (client contents includesSubstring: 'Small'). html := client contents. self assert: html isString. - - client beBinary; get. + + client + beBinary; + get. self assert: client isSuccess. - self assert: client response contentType = ZnMimeType textHtml. + self assert: client response contentType equals: ZnMimeType textHtml. bytes := client contents. self deny: bytes isString. self assert: bytes utf8Decoded equals: html. - + client close \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnClientTest.class/instance/testGetSmallHTMLOneShot.st b/repository/Zinc-Tests.package/ZnClientTest.class/instance/testGetSmallHTMLOneShot.st index 7addc34e..eedd0ff9 100644 --- a/repository/Zinc-Tests.package/ZnClientTest.class/instance/testGetSmallHTMLOneShot.st +++ b/repository/Zinc-Tests.package/ZnClientTest.class/instance/testGetSmallHTMLOneShot.st @@ -6,6 +6,6 @@ testGetSmallHTMLOneShot url: self smallHtmlUrl; get. self assert: client isSuccess. - self assert: client response contentType = ZnMimeType textHtml. + self assert: client response contentType equals: ZnMimeType textHtml. self assert: (client contents includesSubstring: 'Small'). self deny: client isConnected \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnClientTest.class/instance/testGetSmallHTMLStreaming.st b/repository/Zinc-Tests.package/ZnClientTest.class/instance/testGetSmallHTMLStreaming.st index ce3295dd..5b1e21ee 100644 --- a/repository/Zinc-Tests.package/ZnClientTest.class/instance/testGetSmallHTMLStreaming.st +++ b/repository/Zinc-Tests.package/ZnClientTest.class/instance/testGetSmallHTMLStreaming.st @@ -6,9 +6,9 @@ testGetSmallHTMLStreaming streaming: true; get. self assert: client isSuccess. - self assert: client response contentType = ZnMimeType textHtml. + self assert: client response contentType equals: ZnMimeType textHtml. self assert: result isStream. - self assert: client entity stream = result. + self assert: client entity stream equals: result. contents := ZnUTF8Encoder new decodeBytes: result upToEnd. self assert: (contents includesSubstring: 'Small'). client close \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnClientTest.class/instance/testGetSmallHTMLTwice.st b/repository/Zinc-Tests.package/ZnClientTest.class/instance/testGetSmallHTMLTwice.st index ec2dfca8..60fbc0fb 100644 --- a/repository/Zinc-Tests.package/ZnClientTest.class/instance/testGetSmallHTMLTwice.st +++ b/repository/Zinc-Tests.package/ZnClientTest.class/instance/testGetSmallHTMLTwice.st @@ -5,12 +5,12 @@ testGetSmallHTMLTwice url: self smallHtmlUrl; get. self assert: client isSuccess. - self assert: client response contentType = ZnMimeType textHtml. + self assert: client response contentType equals: ZnMimeType textHtml. self assert: (client contents includesSubstring: 'Small'). - client + client url: self smallHtmlUrl pathPrintString; get. self assert: client isSuccess. - self assert: client response contentType = ZnMimeType textHtml. + self assert: client response contentType equals: ZnMimeType textHtml. self assert: (client contents includesSubstring: 'Small'). client close \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnClientTest.class/instance/testGetSmallHTMLUrlConstruction.st b/repository/Zinc-Tests.package/ZnClientTest.class/instance/testGetSmallHTMLUrlConstruction.st index af59fb68..05e406d9 100644 --- a/repository/Zinc-Tests.package/ZnClientTest.class/instance/testGetSmallHTMLUrlConstruction.st +++ b/repository/Zinc-Tests.package/ZnClientTest.class/instance/testGetSmallHTMLUrlConstruction.st @@ -7,6 +7,6 @@ testGetSmallHTMLUrlConstruction path: self smallHtmlUrl pathPrintString; get. self assert: client isSuccess. - self assert: client response contentType = ZnMimeType textHtml. + self assert: client response contentType equals: ZnMimeType textHtml. self assert: (client contents includesSubstring: 'Small'). client close \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnEasyTest.class/instance/testDelete.st b/repository/Zinc-Tests.package/ZnEasyTest.class/instance/testDelete.st index 890bdc3c..81ef286a 100644 --- a/repository/Zinc-Tests.package/ZnEasyTest.class/instance/testDelete.st +++ b/repository/Zinc-Tests.package/ZnEasyTest.class/instance/testDelete.st @@ -1,8 +1,14 @@ testing testDelete - self withServerDo: [ :server | | response | - response := ZnEasy delete: (server localUrl addPathSegments: #('echo' 'foo'); yourself). - self assert: (response headers contentType = ZnMimeType textPlain). - self assert: (response statusLine code = 200). - self assert: (response entity string includesSubstring: 'DELETE'). - self assert: (response entity string includesSubstring: 'foo') ] \ No newline at end of file + self + withServerDo: [ :server | + | response | + response := ZnEasy + delete: + (server localUrl + addPathSegments: #('echo' 'foo'); + yourself). + self assert: response headers contentType equals: ZnMimeType textPlain. + self assert: response statusLine code equals: 200. + self assert: (response entity string includesSubstring: 'DELETE'). + self assert: (response entity string includesSubstring: 'foo') ] \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnEasyTest.class/instance/testGetSmallHTMLDocument.st b/repository/Zinc-Tests.package/ZnEasyTest.class/instance/testGetSmallHTMLDocument.st index 602d2601..eafafbab 100644 --- a/repository/Zinc-Tests.package/ZnEasyTest.class/instance/testGetSmallHTMLDocument.st +++ b/repository/Zinc-Tests.package/ZnEasyTest.class/instance/testGetSmallHTMLDocument.st @@ -3,6 +3,6 @@ testGetSmallHTMLDocument | url response | url := self smallHtmlUrl. response := ZnEasy get: url. - self assert: (response headers contentType = ZnMimeType textHtml). - self assert: (response statusLine code = 200). + self assert: response headers contentType equals: ZnMimeType textHtml. + self assert: response statusLine code equals: 200. self assert: (response entity string includesSubstring: 'small') \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnEasyTest.class/instance/testHeadSmallHTMLDocument.st b/repository/Zinc-Tests.package/ZnEasyTest.class/instance/testHeadSmallHTMLDocument.st index c5161432..92333163 100644 --- a/repository/Zinc-Tests.package/ZnEasyTest.class/instance/testHeadSmallHTMLDocument.st +++ b/repository/Zinc-Tests.package/ZnEasyTest.class/instance/testHeadSmallHTMLDocument.st @@ -3,6 +3,6 @@ testHeadSmallHTMLDocument | url response | url := self smallHtmlUrl. response := ZnEasy head: url. - self assert: (response headers contentType = ZnMimeType textHtml). - self assert: (response statusLine code = 200). + self assert: response headers contentType equals: ZnMimeType textHtml. + self assert: response statusLine code equals: 200. self assert: response hasEntity not \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnEasyTest.class/instance/testPost.st b/repository/Zinc-Tests.package/ZnEasyTest.class/instance/testPost.st index 224efdb7..277d3ead 100644 --- a/repository/Zinc-Tests.package/ZnEasyTest.class/instance/testPost.st +++ b/repository/Zinc-Tests.package/ZnEasyTest.class/instance/testPost.st @@ -1,9 +1,16 @@ testing testPost - self withServerDo: [ :server | | response data | - data := String streamContents: [ :stream | 1 to: 32 do: [ :each | stream nextPut: 'abc' atRandom ] ]. - response := ZnEasy post: (server localUrl addPathSegment: 'echo'; yourself) data: (ZnEntity text: data). - self assert: (response headers contentType = ZnMimeType textPlain). - self assert: (response statusLine code = 200). - self assert: (response entity string includesSubstring: 'POST'). - self assert: (response entity string includesSubstring: data) ] \ No newline at end of file + self + withServerDo: [ :server | + | response data | + data := String streamContents: [ :stream | 1 to: 32 do: [ :each | stream nextPut: 'abc' atRandom ] ]. + response := ZnEasy + post: + (server localUrl + addPathSegment: 'echo'; + yourself) + data: (ZnEntity text: data). + self assert: response headers contentType equals: ZnMimeType textPlain. + self assert: response statusLine code equals: 200. + self assert: (response entity string includesSubstring: 'POST'). + self assert: (response entity string includesSubstring: data) ] \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnEasyTest.class/instance/testPostUnicodeUtf8.st b/repository/Zinc-Tests.package/ZnEasyTest.class/instance/testPostUnicodeUtf8.st index 8e52e488..884c1adb 100644 --- a/repository/Zinc-Tests.package/ZnEasyTest.class/instance/testPostUnicodeUtf8.st +++ b/repository/Zinc-Tests.package/ZnEasyTest.class/instance/testPostUnicodeUtf8.st @@ -1,9 +1,16 @@ testing testPostUnicodeUtf8 - self withServerDo: [ :server | | response data | - data := String streamContents: [ :stream | 0 to: 16r024F do: [ :each | stream nextPut: each asCharacter ] ]. - response := ZnEasy post: (server localUrl addPathSegment: 'echo'; yourself) data: (ZnEntity text: data). - self assert: (response headers contentType = ZnMimeType textPlain). - self assert: (response statusLine code = 200). - self assert: (response entity string includesSubstring: 'POST'). - self assert: (response entity string includesSubstring: data) ] \ No newline at end of file + self + withServerDo: [ :server | + | response data | + data := String streamContents: [ :stream | 0 to: 16r024F do: [ :each | stream nextPut: each asCharacter ] ]. + response := ZnEasy + post: + (server localUrl + addPathSegment: 'echo'; + yourself) + data: (ZnEntity text: data). + self assert: response headers contentType equals: ZnMimeType textPlain. + self assert: response statusLine code equals: 200. + self assert: (response entity string includesSubstring: 'POST'). + self assert: (response entity string includesSubstring: data) ] \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnEasyTest.class/instance/testPut.st b/repository/Zinc-Tests.package/ZnEasyTest.class/instance/testPut.st index 5a0189ef..2d4b2c7f 100644 --- a/repository/Zinc-Tests.package/ZnEasyTest.class/instance/testPut.st +++ b/repository/Zinc-Tests.package/ZnEasyTest.class/instance/testPut.st @@ -1,9 +1,16 @@ testing testPut - self withServerDo: [ :server | | response data | - data := String streamContents: [ :stream | 1 to: 32 do: [ :each | stream nextPut: 'abc' atRandom ] ]. - response := ZnEasy put: (server localUrl addPathSegment: 'echo'; yourself) data: (ZnEntity text: data). - self assert: (response headers contentType = ZnMimeType textPlain). - self assert: (response statusLine code = 200). - self assert: (response entity string includesSubstring: 'PUT'). - self assert: (response entity string includesSubstring: data) ] \ No newline at end of file + self + withServerDo: [ :server | + | response data | + data := String streamContents: [ :stream | 1 to: 32 do: [ :each | stream nextPut: 'abc' atRandom ] ]. + response := ZnEasy + put: + (server localUrl + addPathSegment: 'echo'; + yourself) + data: (ZnEntity text: data). + self assert: response headers contentType equals: ZnMimeType textPlain. + self assert: response statusLine code equals: 200. + self assert: (response entity string includesSubstring: 'PUT'). + self assert: (response entity string includesSubstring: data) ] \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnEntityReaderTest.class/instance/testChunked.st b/repository/Zinc-Tests.package/ZnEntityReaderTest.class/instance/testChunked.st index 86549d5d..838cfa28 100644 --- a/repository/Zinc-Tests.package/ZnEntityReaderTest.class/instance/testChunked.st +++ b/repository/Zinc-Tests.package/ZnEntityReaderTest.class/instance/testChunked.st @@ -1,11 +1,7 @@ testing testChunked | input headers reader entity | - input := '3', String crlf, - 'con', String crlf, - '8', String crlf, - 'sequence', String crlf, - '0', String crlf, String crlf. + input := '3' , String crlf , 'con' , String crlf , '8' , String crlf , 'sequence' , String crlf , '0' , String crlf , String crlf. (headers := ZnHeaders new) at: 'Content-Type' put: 'text/plain'; at: 'Transfer-Encoding' put: 'chunked'. @@ -13,4 +9,4 @@ testChunked headers: headers; stream: input asByteArray readStream. entity := reader readEntity. - self assert: entity contents = 'consequence' \ No newline at end of file + self assert: entity contents equals: 'consequence' \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnEntityReaderTest.class/instance/testChunkedWithExtraHeaders.st b/repository/Zinc-Tests.package/ZnEntityReaderTest.class/instance/testChunkedWithExtraHeaders.st index 95dfd5c0..ba558553 100644 --- a/repository/Zinc-Tests.package/ZnEntityReaderTest.class/instance/testChunkedWithExtraHeaders.st +++ b/repository/Zinc-Tests.package/ZnEntityReaderTest.class/instance/testChunkedWithExtraHeaders.st @@ -1,13 +1,7 @@ testing testChunkedWithExtraHeaders | input headers reader entity | - input := '3', String crlf, - 'con', String crlf, - '8', String crlf, - 'sequence', String crlf, - '0', String crlf, - 'X-Foo:bar', String crlf, - String crlf. + input := '3' , String crlf , 'con' , String crlf , '8' , String crlf , 'sequence' , String crlf , '0' , String crlf , 'X-Foo:bar' , String crlf , String crlf. (headers := ZnHeaders new) at: 'Content-Type' put: 'text/plain'; at: 'Transfer-Encoding' put: 'chunked'. @@ -15,5 +9,5 @@ testChunkedWithExtraHeaders headers: headers; stream: input asByteArray readStream. entity := reader readEntity. - self assert: entity contents = 'consequence'. - self assert: (headers at: 'X-Foo') = 'bar' \ No newline at end of file + self assert: entity contents equals: 'consequence'. + self assert: (headers at: 'X-Foo') equals: 'bar' \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnEntityReaderTest.class/instance/testReadStreaming.st b/repository/Zinc-Tests.package/ZnEntityReaderTest.class/instance/testReadStreaming.st index 5380b0a5..2a365498 100644 --- a/repository/Zinc-Tests.package/ZnEntityReaderTest.class/instance/testReadStreaming.st +++ b/repository/Zinc-Tests.package/ZnEntityReaderTest.class/instance/testReadStreaming.st @@ -10,6 +10,6 @@ testReadStreaming stream: data readStream; streaming. entity := reader readEntity. - self assert: entity contentType = ZnMimeType applicationOctetStream. - self assert: entity contentLength = data size. - self assert: entity contents = data \ No newline at end of file + self assert: entity contentType equals: ZnMimeType applicationOctetStream. + self assert: entity contentLength equals: data size. + self assert: entity contents equals: data \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnEntityReaderTest.class/instance/testReadStreamingWriting.st b/repository/Zinc-Tests.package/ZnEntityReaderTest.class/instance/testReadStreamingWriting.st index df765d13..14e1800c 100644 --- a/repository/Zinc-Tests.package/ZnEntityReaderTest.class/instance/testReadStreamingWriting.st +++ b/repository/Zinc-Tests.package/ZnEntityReaderTest.class/instance/testReadStreamingWriting.st @@ -10,7 +10,7 @@ testReadStreamingWriting stream: data readStream; streaming. entity := reader readEntity. - self assert: entity contentType = ZnMimeType applicationOctetStream. - self assert: entity contentLength = data size. + self assert: entity contentType equals: ZnMimeType applicationOctetStream. + self assert: entity contentLength equals: data size. output := ByteArray streamContents: [ :stream | entity writeOn: stream ]. - self assert: output = data \ No newline at end of file + self assert: output equals: data \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnEntityTest.class/instance/testMultiPartFormDataWriteRead.st b/repository/Zinc-Tests.package/ZnEntityTest.class/instance/testMultiPartFormDataWriteRead.st index 3a5e429d..0218d3c3 100644 --- a/repository/Zinc-Tests.package/ZnEntityTest.class/instance/testMultiPartFormDataWriteRead.st +++ b/repository/Zinc-Tests.package/ZnEntityTest.class/instance/testMultiPartFormDataWriteRead.st @@ -1,7 +1,7 @@ testing testMultiPartFormDataWriteRead | input output bytes | - input := (ZnMultiPartFormDataEntity new) + input := ZnMultiPartFormDataEntity new addPart: (ZnMimePart fieldName: 'extra' value: 'my-extra'); addPart: (ZnMimePart fieldName: 'info' value: 'my-info'); addPart: (ZnMimePart fieldName: 'file' fileName: 'foo.txt' entity: (ZnEntity text: 'Zinc HTTP Components')); @@ -11,16 +11,14 @@ testMultiPartFormDataWriteRead self assert: (input contentType matches: ZnMimeType multiPartFormData). bytes := ByteArray streamContents: [ :stream | input writeOn: stream ]. output := (ZnMultiPartFormDataEntity type: input contentType) readFrom: bytes readStream. - self assert: (output partNamed: 'extra') fieldValue = 'my-extra'. - self assert: (output partNamed: 'info') fieldValue = 'my-info'. - self assert: (output partNamed: 'extra') fieldValueString = 'my-extra'. - self assert: (output partNamed: 'info') fieldValueString = 'my-info'. - self assert: (output partNamed: 'file') contents = 'Zinc HTTP Components'. + self assert: (output partNamed: 'extra') fieldValue equals: 'my-extra'. + self assert: (output partNamed: 'info') fieldValue equals: 'my-info'. + self assert: (output partNamed: 'extra') fieldValueString equals: 'my-extra'. + self assert: (output partNamed: 'info') fieldValueString equals: 'my-info'. + self assert: (output partNamed: 'file') contents equals: 'Zinc HTTP Components'. output := (ZnMultiPartFormDataEntity type: input contentType length: input contentLength) readFrom: bytes readStream. - self assert: (output partNamed: 'extra') fieldValue = 'my-extra'. - self assert: (output partNamed: 'info') fieldValue = 'my-info'. - self assert: (output partNamed: 'extra') fieldValueString = 'my-extra'. - self assert: (output partNamed: 'info') fieldValueString = 'my-info'. - self assert: (output partNamed: 'file') contents = 'Zinc HTTP Components'. - - \ No newline at end of file + self assert: (output partNamed: 'extra') fieldValue equals: 'my-extra'. + self assert: (output partNamed: 'info') fieldValue equals: 'my-info'. + self assert: (output partNamed: 'extra') fieldValueString equals: 'my-extra'. + self assert: (output partNamed: 'info') fieldValueString equals: 'my-info'. + self assert: (output partNamed: 'file') contents equals: 'Zinc HTTP Components' \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnEntityTest.class/instance/testMultiPartFormDataWriteReadBinary.st b/repository/Zinc-Tests.package/ZnEntityTest.class/instance/testMultiPartFormDataWriteReadBinary.st index 01fcd603..a244a075 100644 --- a/repository/Zinc-Tests.package/ZnEntityTest.class/instance/testMultiPartFormDataWriteReadBinary.st +++ b/repository/Zinc-Tests.package/ZnEntityTest.class/instance/testMultiPartFormDataWriteReadBinary.st @@ -1,7 +1,7 @@ testing testMultiPartFormDataWriteReadBinary | input output bytes | - input := (ZnMultiPartFormDataEntity new) + input := ZnMultiPartFormDataEntity new addPart: (ZnMimePart fieldName: 'extra' value: 'my-extra'); addPart: (ZnMimePart fieldName: 'info' value: 'my-info'); addPart: (ZnMimePart fieldName: 'file' fileName: 'foo.txt' entity: (ZnEntity text: 'Zinc HTTP Components')); @@ -11,9 +11,9 @@ testMultiPartFormDataWriteReadBinary self assert: (input contentType matches: ZnMimeType multiPartFormData). bytes := ByteArray streamContents: [ :stream | input writeOn: stream ]. output := ZnEntity readBinaryFrom: bytes readStream usingType: input contentType andLength: bytes size. - self assert: (output partNamed: 'extra') fieldValue = 'my-extra' asByteArray. - self assert: (output partNamed: 'info') fieldValue = 'my-info' asByteArray. - self assert: (output partNamed: 'extra') fieldValueString = 'my-extra'. - self assert: (output partNamed: 'info') fieldValueString = 'my-info'. + self assert: (output partNamed: 'extra') fieldValue equals: 'my-extra' asByteArray. + self assert: (output partNamed: 'info') fieldValue equals: 'my-info' asByteArray. + self assert: (output partNamed: 'extra') fieldValueString equals: 'my-extra'. + self assert: (output partNamed: 'info') fieldValueString equals: 'my-info'. self deny: (output partNamed: 'file') contents isString. - self assert: (output partNamed: 'file') contents = 'Zinc HTTP Components' asByteArray \ No newline at end of file + self assert: (output partNamed: 'file') contents equals: 'Zinc HTTP Components' asByteArray \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnEntityTest.class/instance/testUTF8ReadingDetermined.st b/repository/Zinc-Tests.package/ZnEntityTest.class/instance/testUTF8ReadingDetermined.st index 3f63e442..0be46662 100644 --- a/repository/Zinc-Tests.package/ZnEntityTest.class/instance/testUTF8ReadingDetermined.st +++ b/repository/Zinc-Tests.package/ZnEntityTest.class/instance/testUTF8ReadingDetermined.st @@ -1,10 +1,14 @@ testing testUTF8ReadingDetermined | string entity bytes | - string := String with: $$ with: (16r00A2 asCharacter) with: ( 16r20AC asCharacter) with: (16r024B62 asCharacter). + string := String + with: $$ + with: 16r00A2 asCharacter + with: 16r20AC asCharacter + with: 16r024B62 asCharacter. entity := ZnStringEntity type: ZnMimeType textPlain length: 10. bytes := #(16r24 16rC2 16rA2 16rE2 16r82 16rAC 16rF0 16rA4 16rAD 16rA2) asByteArray. entity readFrom: bytes readStream. - self assert: entity contentType = ZnMimeType textPlain. - self assert: entity contentLength = 10. - self assert: entity contents = string \ No newline at end of file + self assert: entity contentType equals: ZnMimeType textPlain. + self assert: entity contentLength equals: 10. + self assert: entity contents equals: string \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnEntityTest.class/instance/testUTF8ReadingUndetermined.st b/repository/Zinc-Tests.package/ZnEntityTest.class/instance/testUTF8ReadingUndetermined.st index 9a06ed66..5a155d33 100644 --- a/repository/Zinc-Tests.package/ZnEntityTest.class/instance/testUTF8ReadingUndetermined.st +++ b/repository/Zinc-Tests.package/ZnEntityTest.class/instance/testUTF8ReadingUndetermined.st @@ -1,10 +1,14 @@ testing testUTF8ReadingUndetermined | string entity bytes | - string := String with: $$ with: (16r00A2 asCharacter) with: ( 16r20AC asCharacter) with: (16r024B62 asCharacter). + string := String + with: $$ + with: 16r00A2 asCharacter + with: 16r20AC asCharacter + with: 16r024B62 asCharacter. entity := ZnStringEntity type: ZnMimeType textPlain. bytes := #(16r24 16rC2 16rA2 16rE2 16r82 16rAC 16rF0 16rA4 16rAD 16rA2) asByteArray. entity readFrom: bytes readStream. - self assert: entity contentType = ZnMimeType textPlain. - self assert: entity contentLength = 10. - self assert: entity contents = string \ No newline at end of file + self assert: entity contentType equals: ZnMimeType textPlain. + self assert: entity contentLength equals: 10. + self assert: entity contents equals: string \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnEntityTest.class/instance/testUTF8Writing.st b/repository/Zinc-Tests.package/ZnEntityTest.class/instance/testUTF8Writing.st index 3b900c89..c2f433a7 100644 --- a/repository/Zinc-Tests.package/ZnEntityTest.class/instance/testUTF8Writing.st +++ b/repository/Zinc-Tests.package/ZnEntityTest.class/instance/testUTF8Writing.st @@ -1,9 +1,13 @@ testing testUTF8Writing | string entity bytes | - string := String with: $$ with: (16r00A2 asCharacter) with: ( 16r20AC asCharacter) with: (16r024B62 asCharacter). + string := String + with: $$ + with: 16r00A2 asCharacter + with: 16r20AC asCharacter + with: 16r024B62 asCharacter. entity := ZnStringEntity text: string. - self assert: entity contentType = ZnMimeType textPlain. - self assert: entity contentLength = 10. + self assert: entity contentType equals: ZnMimeType textPlain. + self assert: entity contentLength equals: 10. bytes := ByteArray streamContents: [ :stream | entity writeOn: stream ]. - self assert: bytes = #(16r24 16rC2 16rA2 16rE2 16r82 16rAC 16rF0 16rA4 16rAD 16rA2) asByteArray \ No newline at end of file + self assert: bytes equals: #(16r24 16rC2 16rA2 16rE2 16r82 16rAC 16rF0 16rA4 16rAD 16rA2) asByteArray \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnHeadersTest.class/instance/testWriting.st b/repository/Zinc-Tests.package/ZnHeadersTest.class/instance/testWriting.st index 200b7649..e003a599 100644 --- a/repository/Zinc-Tests.package/ZnHeadersTest.class/instance/testWriting.st +++ b/repository/Zinc-Tests.package/ZnHeadersTest.class/instance/testWriting.st @@ -1,12 +1,12 @@ testing testWriting | headers string | - headers := ZnHeaders new - at: 'Content-Type' put: 'text/plain'; + headers := ZnHeaders new + at: 'Content-Type' put: 'text/plain'; at: 'Content-Length' put: '128'; yourself. string := String streamContents: [ :stream | headers writeOn: stream ]. - self assert: (string includesSubstring: 'Content-Type: text/plain', String crlf). - self assert: (string includesSubstring: 'Content-Length: 128', String crlf). - self assert: (string occurrencesOf: Character cr) = 2. - self assert: (string occurrencesOf: Character lf) = 2 \ No newline at end of file + self assert: (string includesSubstring: 'Content-Type: text/plain' , String crlf). + self assert: (string includesSubstring: 'Content-Length: 128' , String crlf). + self assert: (string occurrencesOf: Character cr) equals: 2. + self assert: (string occurrencesOf: Character lf) equals: 2 \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnLimitedReadStreamTest.class/instance/testBinary.st b/repository/Zinc-Tests.package/ZnLimitedReadStreamTest.class/instance/testBinary.st index 2898274d..29f38a00 100644 --- a/repository/Zinc-Tests.package/ZnLimitedReadStreamTest.class/instance/testBinary.st +++ b/repository/Zinc-Tests.package/ZnLimitedReadStreamTest.class/instance/testBinary.st @@ -3,4 +3,4 @@ testBinary | data limitedReadStream | data := #(0 1 2 3 4 5 6 7 8 9) asByteArray. limitedReadStream := ZnLimitedReadStream on: data readStream limit: 5. - self assert: limitedReadStream upToEnd = #(0 1 2 3 4) asByteArray \ No newline at end of file + self assert: limitedReadStream upToEnd equals: #(0 1 2 3 4) asByteArray \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnLimitedReadStreamTest.class/instance/testBinaryAll.st b/repository/Zinc-Tests.package/ZnLimitedReadStreamTest.class/instance/testBinaryAll.st index 6e662e1d..f5f428de 100644 --- a/repository/Zinc-Tests.package/ZnLimitedReadStreamTest.class/instance/testBinaryAll.st +++ b/repository/Zinc-Tests.package/ZnLimitedReadStreamTest.class/instance/testBinaryAll.st @@ -3,4 +3,4 @@ testBinaryAll | data limitedReadStream | data := #(0 1 2 3 4 5 6 7 8 9) asByteArray. limitedReadStream := ZnLimitedReadStream on: data readStream limit: data size. - self assert: limitedReadStream upToEnd = data \ No newline at end of file + self assert: limitedReadStream upToEnd equals: data \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnLimitedReadStreamTest.class/instance/testNext.st b/repository/Zinc-Tests.package/ZnLimitedReadStreamTest.class/instance/testNext.st index 8e9858ab..bff9fccd 100644 --- a/repository/Zinc-Tests.package/ZnLimitedReadStreamTest.class/instance/testNext.st +++ b/repository/Zinc-Tests.package/ZnLimitedReadStreamTest.class/instance/testNext.st @@ -6,10 +6,9 @@ testNext self assert: limitedReadStream next isNil. limitedReadStream := ZnLimitedReadStream on: 'ABC' readStream limit: 10. self assert: limitedReadStream atEnd not. - self assert: limitedReadStream next = $A. - self assert: limitedReadStream peek = $B. + self assert: limitedReadStream next equals: $A. + self assert: limitedReadStream peek equals: $B. limitedReadStream next. - self assert: limitedReadStream next = $C. + self assert: limitedReadStream next equals: $C. self assert: limitedReadStream next isNil. - self assert: limitedReadStream atEnd - \ No newline at end of file + self assert: limitedReadStream atEnd \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnLimitedReadStreamTest.class/instance/testNextCount.st b/repository/Zinc-Tests.package/ZnLimitedReadStreamTest.class/instance/testNextCount.st index b1f489fc..5bb990af 100644 --- a/repository/Zinc-Tests.package/ZnLimitedReadStreamTest.class/instance/testNextCount.st +++ b/repository/Zinc-Tests.package/ZnLimitedReadStreamTest.class/instance/testNextCount.st @@ -3,4 +3,4 @@ testNextCount | data stream | data := '0123456789'. stream := ZnLimitedReadStream on: data readStream limit: 8. - self assert: (stream next: 4) = '0123' \ No newline at end of file + self assert: (stream next: 4) equals: '0123' \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnLimitedReadStreamTest.class/instance/testNextCountInto.st b/repository/Zinc-Tests.package/ZnLimitedReadStreamTest.class/instance/testNextCountInto.st index 1a91f493..33a3a15e 100644 --- a/repository/Zinc-Tests.package/ZnLimitedReadStreamTest.class/instance/testNextCountInto.st +++ b/repository/Zinc-Tests.package/ZnLimitedReadStreamTest.class/instance/testNextCountInto.st @@ -4,5 +4,5 @@ testNextCountInto data := '0123456789'. stream := ZnLimitedReadStream on: data readStream limit: 8. buffer := String new: 4. - self assert: (stream next: 4 into: buffer) = '0123'. - self assert: buffer = '0123' \ No newline at end of file + self assert: (stream next: 4 into: buffer) equals: '0123'. + self assert: buffer equals: '0123' \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnLimitedReadStreamTest.class/instance/testNextCountIntoShort.st b/repository/Zinc-Tests.package/ZnLimitedReadStreamTest.class/instance/testNextCountIntoShort.st index c5910131..e60d4009 100644 --- a/repository/Zinc-Tests.package/ZnLimitedReadStreamTest.class/instance/testNextCountIntoShort.st +++ b/repository/Zinc-Tests.package/ZnLimitedReadStreamTest.class/instance/testNextCountIntoShort.st @@ -4,5 +4,4 @@ testNextCountIntoShort data := '0123456789'. stream := ZnLimitedReadStream on: data readStream limit: 5. buffer := String new: 6. - self assert: (stream next: 6 into: buffer) = '01234' - \ No newline at end of file + self assert: (stream next: 6 into: buffer) equals: '01234' \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnLimitedReadStreamTest.class/instance/testNextCountShort.st b/repository/Zinc-Tests.package/ZnLimitedReadStreamTest.class/instance/testNextCountShort.st index 9e685c3e..5480eef9 100644 --- a/repository/Zinc-Tests.package/ZnLimitedReadStreamTest.class/instance/testNextCountShort.st +++ b/repository/Zinc-Tests.package/ZnLimitedReadStreamTest.class/instance/testNextCountShort.st @@ -3,4 +3,4 @@ testNextCountShort | data stream | data := '0123456789'. stream := ZnLimitedReadStream on: data readStream limit: 5. - self assert: (stream next: 6) = '01234' \ No newline at end of file + self assert: (stream next: 6) equals: '01234' \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnLimitedReadStreamTest.class/instance/testSimple.st b/repository/Zinc-Tests.package/ZnLimitedReadStreamTest.class/instance/testSimple.st index 9f9e1c37..43eaf983 100644 --- a/repository/Zinc-Tests.package/ZnLimitedReadStreamTest.class/instance/testSimple.st +++ b/repository/Zinc-Tests.package/ZnLimitedReadStreamTest.class/instance/testSimple.st @@ -3,4 +3,4 @@ testSimple | data limitedReadStream | data := '0123456789'. limitedReadStream := ZnLimitedReadStream on: data readStream limit: 5. - self assert: limitedReadStream upToEnd = '01234' \ No newline at end of file + self assert: limitedReadStream upToEnd equals: '01234' \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnLimitedReadStreamTest.class/instance/testSimpleEof.st b/repository/Zinc-Tests.package/ZnLimitedReadStreamTest.class/instance/testSimpleEof.st index 43616f7a..0e5f8536 100644 --- a/repository/Zinc-Tests.package/ZnLimitedReadStreamTest.class/instance/testSimpleEof.st +++ b/repository/Zinc-Tests.package/ZnLimitedReadStreamTest.class/instance/testSimpleEof.st @@ -3,6 +3,6 @@ testSimpleEof | data limitedReadStream | data := '0123456789'. limitedReadStream := ZnLimitedReadStream on: data readStream limit: 15. - self assert: limitedReadStream upToEnd = '0123456789'. + self assert: limitedReadStream upToEnd equals: '0123456789'. self assert: limitedReadStream atEnd. self assert: limitedReadStream next isNil \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnLineReaderTest.class/instance/testBinary.st b/repository/Zinc-Tests.package/ZnLineReaderTest.class/instance/testBinary.st index 0da9914a..bd6f6cd4 100644 --- a/repository/Zinc-Tests.package/ZnLineReaderTest.class/instance/testBinary.st +++ b/repository/Zinc-Tests.package/ZnLineReaderTest.class/instance/testBinary.st @@ -1,8 +1,8 @@ testing testBinary | input reader | - input := ('Foo', String crlf, 'Bar', String crlf) asByteArray. + input := ('Foo' , String crlf , 'Bar' , String crlf) asByteArray. reader := ZnLineReader on: input readStream. - self assert: reader nextLine = 'Foo'. - self assert: reader nextLine = 'Bar'. + self assert: reader nextLine equals: 'Foo'. + self assert: reader nextLine equals: 'Bar'. self assert: reader nextLine isEmpty \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnLineReaderTest.class/instance/testSimple.st b/repository/Zinc-Tests.package/ZnLineReaderTest.class/instance/testSimple.st index ee0b0fb0..329de463 100644 --- a/repository/Zinc-Tests.package/ZnLineReaderTest.class/instance/testSimple.st +++ b/repository/Zinc-Tests.package/ZnLineReaderTest.class/instance/testSimple.st @@ -1,8 +1,8 @@ testing testSimple | input reader | - input := 'Foo', String crlf, 'Bar', String crlf. + input := 'Foo' , String crlf , 'Bar' , String crlf. reader := ZnLineReader on: input readStream. - self assert: reader nextLine = 'Foo'. - self assert: reader nextLine = 'Bar'. + self assert: reader nextLine equals: 'Foo'. + self assert: reader nextLine equals: 'Bar'. self assert: reader nextLine isEmpty \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnMagicCookieJarTest.class/instance/testAdd.st b/repository/Zinc-Tests.package/ZnMagicCookieJarTest.class/instance/testAdd.st index ce018f4b..809d6d69 100644 --- a/repository/Zinc-Tests.package/ZnMagicCookieJarTest.class/instance/testAdd.st +++ b/repository/Zinc-Tests.package/ZnMagicCookieJarTest.class/instance/testAdd.st @@ -4,4 +4,4 @@ testAdd jar := ZnCookieJar new. count := jar cookies size. jar add: (ZnCookie fromString: self cookieString for: 'www.google.com' asZnUrl). - self assert: ((jar cookies size) = (count + 1)) \ No newline at end of file + self assert: jar cookies size equals: count + 1 \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnMagicCookieJarTest.class/instance/testCookiesForUrl.st b/repository/Zinc-Tests.package/ZnMagicCookieJarTest.class/instance/testCookiesForUrl.st index c2dc8752..6ac425f5 100644 --- a/repository/Zinc-Tests.package/ZnMagicCookieJarTest.class/instance/testCookiesForUrl.st +++ b/repository/Zinc-Tests.package/ZnMagicCookieJarTest.class/instance/testCookiesForUrl.st @@ -4,5 +4,7 @@ testCookiesForUrl jar := ZnCookieJar new. c1 := ZnCookie fromString: self cookieString for: 'http://www.google.com' asZnUrl. c2 := ZnCookie fromString: self cookieStringAlt for: 'http://www.pharo-project.org' asZnUrl. - jar add: c1; add: c2. - self assert: ((jar cookiesForUrl: 'http://www.google.com' asZnUrl) size = 1) \ No newline at end of file + jar + add: c1; + add: c2. + self assert: (jar cookiesForUrl: 'http://www.google.com' asZnUrl) size equals: 1 \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnMagicCookieTest.class/instance/testFromString.st b/repository/Zinc-Tests.package/ZnMagicCookieTest.class/instance/testFromString.st index 16c7d189..614369d6 100644 --- a/repository/Zinc-Tests.package/ZnMagicCookieTest.class/instance/testFromString.st +++ b/repository/Zinc-Tests.package/ZnMagicCookieTest.class/instance/testFromString.st @@ -2,8 +2,7 @@ testing testFromString | cookie | cookie := ZnCookie fromString: self cookieString for: 'www.google.com' asZnUrl. - self assert: (cookie name = 'PREF'). - self assert: (cookie path notNil). - self assert: (cookie domain = '.google.com'). - self assert: (cookie isExpired not) - \ No newline at end of file + self assert: cookie name equals: 'PREF'. + self assert: cookie path notNil. + self assert: cookie domain equals: '.google.com'. + self assert: cookie isExpired not \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnRequestLineTest.class/instance/testReading.st b/repository/Zinc-Tests.package/ZnRequestLineTest.class/instance/testReading.st index c157ad33..a857f368 100644 --- a/repository/Zinc-Tests.package/ZnRequestLineTest.class/instance/testReading.st +++ b/repository/Zinc-Tests.package/ZnRequestLineTest.class/instance/testReading.st @@ -1,8 +1,8 @@ testing testReading | requestLine string | - string := 'GET /foo/bar/xyz.txt HTTP/1.1', String crlf. + string := 'GET /foo/bar/xyz.txt HTTP/1.1' , String crlf. requestLine := ZnRequestLine readFrom: string readStream. - self assert: requestLine method = #GET. - self assert: requestLine uriPathQueryFragment = '/foo/bar/xyz.txt'. - self assert: requestLine version = ZnConstants defaultHTTPVersion \ No newline at end of file + self assert: requestLine method equals: #GET. + self assert: requestLine uriPathQueryFragment equals: '/foo/bar/xyz.txt'. + self assert: requestLine version equals: ZnConstants defaultHTTPVersion \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnRequestLineTest.class/instance/testWriting.st b/repository/Zinc-Tests.package/ZnRequestLineTest.class/instance/testWriting.st index e0c550ec..807ef9bb 100644 --- a/repository/Zinc-Tests.package/ZnRequestLineTest.class/instance/testWriting.st +++ b/repository/Zinc-Tests.package/ZnRequestLineTest.class/instance/testWriting.st @@ -3,4 +3,4 @@ testWriting | requestLine string | requestLine := ZnRequestLine method: 'GET' uri: '/foo/bar/xyz.txt'. string := String streamContents: [ :stream | requestLine writeOn: stream ]. - self assert: string = ('GET /foo/bar/xyz.txt HTTP/1.1', String crlf) \ No newline at end of file + self assert: string equals: 'GET /foo/bar/xyz.txt HTTP/1.1' , String crlf \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnRequestTest.class/instance/testBasicAuthenticate.st b/repository/Zinc-Tests.package/ZnRequestTest.class/instance/testBasicAuthenticate.st index 1c213b5c..7cff09d4 100644 --- a/repository/Zinc-Tests.package/ZnRequestTest.class/instance/testBasicAuthenticate.st +++ b/repository/Zinc-Tests.package/ZnRequestTest.class/instance/testBasicAuthenticate.st @@ -3,11 +3,11 @@ testBasicAuthenticate | request | request := ZnRequest new. request setBasicAuthenticationUsername: 'user' password: 'secret'. - self assert: (request headers at: 'Authorization') = 'Basic dXNlcjpzZWNyZXQ='. - self assert: request basicAuthentication asArray equals: #( 'user' 'secret' ). + self assert: (request headers at: 'Authorization') equals: 'Basic dXNlcjpzZWNyZXQ='. + self assert: request basicAuthentication asArray equals: #('user' 'secret'). request setBasicAuthenticationUsername: 'user' password: ''. - self assert: (request headers at: 'Authorization') = 'Basic dXNlcjo='. - self assert: request basicAuthentication asArray equals: #( 'user' '' ). + self assert: (request headers at: 'Authorization') equals: 'Basic dXNlcjo='. + self assert: request basicAuthentication asArray equals: #('user' ''). request setBasicAuthenticationUsername: 'user' password: ':colons:'. - self assert: (request headers at: 'Authorization') = 'Basic dXNlcjo6Y29sb25zOg=='. - self assert: request basicAuthentication asArray equals: #( 'user' ':colons:' ). \ No newline at end of file + self assert: (request headers at: 'Authorization') equals: 'Basic dXNlcjo6Y29sb25zOg=='. + self assert: request basicAuthentication asArray equals: #('user' ':colons:') \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnResponseTest.class/instance/testAbsoluteCreated.st b/repository/Zinc-Tests.package/ZnResponseTest.class/instance/testAbsoluteCreated.st index a4da6327..242bda9f 100644 --- a/repository/Zinc-Tests.package/ZnResponseTest.class/instance/testAbsoluteCreated.st +++ b/repository/Zinc-Tests.package/ZnResponseTest.class/instance/testAbsoluteCreated.st @@ -3,8 +3,8 @@ testAbsoluteCreated | response uri | uri := 'http://www.example.com:8888/something/else/foo.txt'. response := ZnResponse created: uri asZnUrl. - self assert: response code = 201. + self assert: response code equals: 201. self assert: response hasHeaders. - self assert: (response headers at: 'Location') = uri. + self assert: (response headers at: 'Location') equals: uri. self assert: response hasEntity. self assert: (response entity contents includesSubstring: uri) \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnResponseTest.class/instance/testAbsoluteRedirect.st b/repository/Zinc-Tests.package/ZnResponseTest.class/instance/testAbsoluteRedirect.st index ca245e16..75dca68b 100644 --- a/repository/Zinc-Tests.package/ZnResponseTest.class/instance/testAbsoluteRedirect.st +++ b/repository/Zinc-Tests.package/ZnResponseTest.class/instance/testAbsoluteRedirect.st @@ -3,9 +3,9 @@ testAbsoluteRedirect | response uri | uri := 'http://foo.com:8080/something/else/foo.txt?key=123'. response := ZnResponse redirect: uri asZnUrl. - self assert: response code = 302. + self assert: response code equals: 302. self assert: response isRedirect. self assert: response hasHeaders. - self assert: (response headers at: 'Location') = uri. + self assert: (response headers at: 'Location') equals: uri. self assert: response hasEntity. - self assert: (response entity contents includesSubstring: uri) + self assert: (response entity contents includesSubstring: uri) \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnResponseTest.class/instance/testCreated.st b/repository/Zinc-Tests.package/ZnResponseTest.class/instance/testCreated.st index f8d677a2..9845a0f8 100644 --- a/repository/Zinc-Tests.package/ZnResponseTest.class/instance/testCreated.st +++ b/repository/Zinc-Tests.package/ZnResponseTest.class/instance/testCreated.st @@ -3,8 +3,8 @@ testCreated | response uri | uri := '/something/else/foo.txt'. response := ZnResponse created: uri. - self assert: response code = 201. + self assert: response code equals: 201. self assert: response hasHeaders. - self assert: (response headers at: 'Location') = uri. + self assert: (response headers at: 'Location') equals: uri. self assert: response hasEntity. self assert: (response entity contents includesSubstring: uri) \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnResponseTest.class/instance/testNotFound.st b/repository/Zinc-Tests.package/ZnResponseTest.class/instance/testNotFound.st index 4ed3b444..785de031 100644 --- a/repository/Zinc-Tests.package/ZnResponseTest.class/instance/testNotFound.st +++ b/repository/Zinc-Tests.package/ZnResponseTest.class/instance/testNotFound.st @@ -2,7 +2,7 @@ testing testNotFound | response | response := ZnResponse notFound: 'http:///secret.txt'. - self assert: response code = 404. + self assert: response code equals: 404. self assert: (response headers includesKey: 'Server'). self assert: (response headers includesKey: 'Date'). self assert: (response entity contents includesSubstring: 'secret.txt') \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnResponseTest.class/instance/testRedirect.st b/repository/Zinc-Tests.package/ZnResponseTest.class/instance/testRedirect.st index 0524e5f2..a5724d6c 100644 --- a/repository/Zinc-Tests.package/ZnResponseTest.class/instance/testRedirect.st +++ b/repository/Zinc-Tests.package/ZnResponseTest.class/instance/testRedirect.st @@ -3,16 +3,16 @@ testRedirect | response uri | uri := '/something/else/foo.txt'. response := ZnResponse redirect: uri. - self assert: response code = 302. - self assert: response code = 302. + self assert: response code equals: 302. + self assert: response code equals: 302. self assert: response hasHeaders. - self assert: (response headers at: 'Location') = uri. + self assert: (response headers at: 'Location') equals: uri. self assert: response hasEntity. self assert: (response entity contents includesSubstring: uri). response := ZnResponse redirect: uri asZnUrl. - self assert: response code = 302. - self assert: response code = 302. + self assert: response code equals: 302. + self assert: response code equals: 302. self assert: response hasHeaders. - self assert: (response headers at: 'Location') = uri. + self assert: (response headers at: 'Location') equals: uri. self assert: response hasEntity. self assert: (response entity contents includesSubstring: uri) \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnServerTest.class/instance/testAuthorizationFailed.st b/repository/Zinc-Tests.package/ZnServerTest.class/instance/testAuthorizationFailed.st index 052b51e7..4e5fbdb7 100644 --- a/repository/Zinc-Tests.package/ZnServerTest.class/instance/testAuthorizationFailed.st +++ b/repository/Zinc-Tests.package/ZnServerTest.class/instance/testAuthorizationFailed.st @@ -1,9 +1,15 @@ testing testAuthorizationFailed - self withServerDo: [ :server | | response | - server authenticator: (ZnBasicAuthenticator username: 'foo' password: 'secret'). - response := ZnEasy get: (server localUrl addPathSegment: 'echo'; yourself). - self assert: (response headers contentType = ZnMimeType textPlain). - self assert: (response statusLine code = 401). - self assert: ((response headers at: 'WWW-Authenticate') includesSubstring: 'Basic'). - self assert: ((response headers at: 'WWW-Authenticate') includesSubstring: 'Zinc') ] \ No newline at end of file + self + withServerDo: [ :server | + | response | + server authenticator: (ZnBasicAuthenticator username: 'foo' password: 'secret'). + response := ZnEasy + get: + (server localUrl + addPathSegment: 'echo'; + yourself). + self assert: response headers contentType equals: ZnMimeType textPlain. + self assert: response statusLine code equals: 401. + self assert: ((response headers at: 'WWW-Authenticate') includesSubstring: 'Basic'). + self assert: ((response headers at: 'WWW-Authenticate') includesSubstring: 'Zinc') ] \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnServerTest.class/instance/testAuthorizationSuccessful.st b/repository/Zinc-Tests.package/ZnServerTest.class/instance/testAuthorizationSuccessful.st index f4936588..3b96e599 100644 --- a/repository/Zinc-Tests.package/ZnServerTest.class/instance/testAuthorizationSuccessful.st +++ b/repository/Zinc-Tests.package/ZnServerTest.class/instance/testAuthorizationSuccessful.st @@ -1,9 +1,17 @@ testing testAuthorizationSuccessful - self withServerDo: [ :server | | response | - server authenticator: (ZnBasicAuthenticator username: 'foo' password: 'secret'). - response := ZnEasy get: (server localUrl addPathSegments: #('echo' 'foo'); yourself) username: 'foo' password: 'secret'. - self assert: (response headers contentType = ZnMimeType textPlain). - self assert: (response statusLine code = 200). - self assert: (response entity string includesSubstring: 'Zinc'). - self assert: (response entity string includesSubstring: 'foo') ] \ No newline at end of file + self + withServerDo: [ :server | + | response | + server authenticator: (ZnBasicAuthenticator username: 'foo' password: 'secret'). + response := ZnEasy + get: + (server localUrl + addPathSegments: #('echo' 'foo'); + yourself) + username: 'foo' + password: 'secret'. + self assert: response headers contentType equals: ZnMimeType textPlain. + self assert: response statusLine code equals: 200. + self assert: (response entity string includesSubstring: 'Zinc'). + self assert: (response entity string includesSubstring: 'foo') ] \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnServerTest.class/instance/testDefault.st b/repository/Zinc-Tests.package/ZnServerTest.class/instance/testDefault.st index 19053e90..879cf031 100644 --- a/repository/Zinc-Tests.package/ZnServerTest.class/instance/testDefault.st +++ b/repository/Zinc-Tests.package/ZnServerTest.class/instance/testDefault.st @@ -1,16 +1,14 @@ testing testDefault | port server initialDefaultServer wasRunning | - wasRunning := ZnServer default - ifNil: [ false ] - ifNotNil: [ ZnServer default isRunning ]. + wasRunning := ZnServer default ifNil: [ false ] ifNotNil: [ ZnServer default isRunning ]. initialDefaultServer := ZnServer stopDefault. self assert: ZnServer default isNil. port := self port. server := ZnServer startDefaultOn: port. self assert: ZnServer default notNil. - self assert: ZnServer default == server. - self assert: ZnServer default port = port. + self assert: ZnServer default identicalTo: server. + self assert: ZnServer default port equals: port. self assert: ZnServer default isRunning. self assert: (ZnServer managedServers includes: server). ZnServer stopDefault. @@ -20,8 +18,8 @@ testDefault server := ZnServer startDefaultOn: port. "Starting the default again is actually a restart" ZnServer startDefaultOn: port. - self assert: ZnServer default == server. + self assert: ZnServer default identicalTo: server. ZnServer stopDefault. ZnServer adoptAsDefault: initialDefaultServer. - self assert: initialDefaultServer == ZnServer default. + self assert: initialDefaultServer identicalTo: ZnServer default. wasRunning ifTrue: [ ZnServer default start ] \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnServerTest.class/instance/testEcho.st b/repository/Zinc-Tests.package/ZnServerTest.class/instance/testEcho.st index 36829c5b..2b9e47b5 100644 --- a/repository/Zinc-Tests.package/ZnServerTest.class/instance/testEcho.st +++ b/repository/Zinc-Tests.package/ZnServerTest.class/instance/testEcho.st @@ -1,9 +1,15 @@ testing testEcho - self withServerDo: [ :server | | response | - response := ZnEasy get: (server localUrl addPathSegments: #('echo' 'foo'); yourself). - self assert: (response contentType = ZnMimeType textPlain). - self assert: (response statusLine code = 200). - self assert: (response entity contents includesSubstring: 'Zinc'). - self assert: (response entity contents includesSubstring: 'foo'). - self assert: (response entity contents includesSubstring: server printString) ] \ No newline at end of file + self + withServerDo: [ :server | + | response | + response := ZnEasy + get: + (server localUrl + addPathSegments: #('echo' 'foo'); + yourself). + self assert: response contentType equals: ZnMimeType textPlain. + self assert: response statusLine code equals: 200. + self assert: (response entity contents includesSubstring: 'Zinc'). + self assert: (response entity contents includesSubstring: 'foo'). + self assert: (response entity contents includesSubstring: server printString) ] \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnServerTest.class/instance/testEchoBinary.st b/repository/Zinc-Tests.package/ZnServerTest.class/instance/testEchoBinary.st index 30efeef5..ddc53060 100644 --- a/repository/Zinc-Tests.package/ZnServerTest.class/instance/testEchoBinary.st +++ b/repository/Zinc-Tests.package/ZnServerTest.class/instance/testEchoBinary.st @@ -1,10 +1,17 @@ testing testEchoBinary - self withServerDo: [ :server | | response entityIn entityOut | - server reader: [ :stream | ZnRequest readBinaryFrom: stream ]. - entityIn := ZnEntity with: 'ABC' type: 'text/plain'. - response := ZnEasy put: (server localUrl addPathSegment: 'echo'; yourself) data: entityIn. - self assert: (response contentType = ZnMimeType textPlain). - self assert: (response statusLine code = 200). - entityOut := ZnEntity with: entityIn string asByteArray type: entityIn contentType. - self assert: (response entity contents includesSubstring: entityOut printString) ] \ No newline at end of file + self + withServerDo: [ :server | + | response entityIn entityOut | + server reader: [ :stream | ZnRequest readBinaryFrom: stream ]. + entityIn := ZnEntity with: 'ABC' type: 'text/plain'. + response := ZnEasy + put: + (server localUrl + addPathSegment: 'echo'; + yourself) + data: entityIn. + self assert: response contentType equals: ZnMimeType textPlain. + self assert: response statusLine code equals: 200. + entityOut := ZnEntity with: entityIn string asByteArray type: entityIn contentType. + self assert: (response entity contents includesSubstring: entityOut printString) ] \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnServerTest.class/instance/testEchoLocalInterface.st b/repository/Zinc-Tests.package/ZnServerTest.class/instance/testEchoLocalInterface.st index a572c713..d1ab926d 100644 --- a/repository/Zinc-Tests.package/ZnServerTest.class/instance/testEchoLocalInterface.st +++ b/repository/Zinc-Tests.package/ZnServerTest.class/instance/testEchoLocalInterface.st @@ -1,17 +1,16 @@ testing testEchoLocalInterface | server response | - (server := ZnServer on: self port) - bindingAddress: NetNameResolver loopBackAddress. - [ - server start. - self - assert: server isRunning & server isListening - description: ('Failed to start server on port {1}. Is there one already?' format: { server port }). - response := ZnEasy get: (server localUrl addPathSegments: #('echo' 'foo'); yourself). - self assert: (response contentType = ZnMimeType textPlain). - self assert: (response statusLine code = 200). - self assert: (response entity contents includesSubstring: 'Zinc'). - self assert: (response entity contents includesSubstring: 'foo') - ] + (server := ZnServer on: self port) bindingAddress: NetNameResolver loopBackAddress. + [ server start. + self assert: server isRunning & server isListening description: ('Failed to start server on port {1}. Is there one already?' format: {server port}). + response := ZnEasy + get: + (server localUrl + addPathSegments: #('echo' 'foo'); + yourself). + self assert: response contentType equals: ZnMimeType textPlain. + self assert: response statusLine code equals: 200. + self assert: (response entity contents includesSubstring: 'Zinc'). + self assert: (response entity contents includesSubstring: 'foo') ] ensure: [ server stop ] \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnServerTest.class/instance/testGetUnicodeUtf8.st b/repository/Zinc-Tests.package/ZnServerTest.class/instance/testGetUnicodeUtf8.st index 32406b81..77ea2bab 100644 --- a/repository/Zinc-Tests.package/ZnServerTest.class/instance/testGetUnicodeUtf8.st +++ b/repository/Zinc-Tests.package/ZnServerTest.class/instance/testGetUnicodeUtf8.st @@ -1,10 +1,16 @@ testing testGetUnicodeUtf8 - self withServerDo: [ :server | | response html | - response := ZnEasy get: (server localUrl addPathSegment: 'unicode'; yourself). - self assert: (response contentType = ZnMimeType textHtml). - self assert: (response statusLine code = 200). - self assert: response contentType isCharSetUTF8. - html := response entity contents. - self assert: (html includesSubstring: 'Unicode'). - 0 to: 16r024F do: [ :each | self assert: (html includes: each asCharacter) ] ] \ No newline at end of file + self + withServerDo: [ :server | + | response html | + response := ZnEasy + get: + (server localUrl + addPathSegment: 'unicode'; + yourself). + self assert: response contentType equals: ZnMimeType textHtml. + self assert: response statusLine code equals: 200. + self assert: response contentType isCharSetUTF8. + html := response entity contents. + self assert: (html includesSubstring: 'Unicode'). + 0 to: 16r024F do: [ :each | self assert: (html includes: each asCharacter) ] ] \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnServerTest.class/instance/testOSAssignedPort.st b/repository/Zinc-Tests.package/ZnServerTest.class/instance/testOSAssignedPort.st index e9dcc1e3..a94c3bae 100644 --- a/repository/Zinc-Tests.package/ZnServerTest.class/instance/testOSAssignedPort.st +++ b/repository/Zinc-Tests.package/ZnServerTest.class/instance/testOSAssignedPort.st @@ -1,16 +1,15 @@ testing testOSAssignedPort - | server | + | server | server := ZnServer on: 0. self assert: server port equals: 0. - [ - | response | - server start. - self assert: server port > 0. - response := ZnEasy get: server localUrl / #echo / #foo. - self assert: (response contentType = ZnMimeType textPlain). - self assert: (response statusLine code = 200). - self assert: (response entity contents includesSubstring: 'Zinc'). - self assert: (response entity contents includesSubstring: 'foo'). - self assert: (response entity contents includesSubstring: server printString) ] - ensure: [ server stop ] \ No newline at end of file + [ | response | + server start. + self assert: server port > 0. + response := ZnEasy get: server localUrl / #echo / #foo. + self assert: response contentType equals: ZnMimeType textPlain. + self assert: response statusLine code equals: 200. + self assert: (response entity contents includesSubstring: 'Zinc'). + self assert: (response entity contents includesSubstring: 'foo'). + self assert: (response entity contents includesSubstring: server printString) ] + ensure: [ server stop ] \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnServerTest.class/instance/testSession.st b/repository/Zinc-Tests.package/ZnServerTest.class/instance/testSession.st index 616b5661..6569794b 100644 --- a/repository/Zinc-Tests.package/ZnServerTest.class/instance/testSession.st +++ b/repository/Zinc-Tests.package/ZnServerTest.class/instance/testSession.st @@ -1,15 +1,19 @@ testing testSession - self withServerDo: [ :server | | client sessionId | - client := ZnClient new url: (server localUrl addPathSegment: #session); yourself. - self assert: client session cookieJar cookies isEmpty. - client get. - self assert: client isSuccess. - self assert: client session cookieJar cookies size = 1. - sessionId := client session cookieJar cookies anyOne value. - self assert: (client contents includesSubstring: sessionId). - client get. - self assert: client isSuccess. - self assert: client session cookieJar cookies size = 1. - self assert: client session cookieJar cookies anyOne value equals: sessionId. - self assert: (client contents includesSubstring: sessionId) ] + self + withServerDo: [ :server | + | client sessionId | + client := ZnClient new + url: (server localUrl addPathSegment: #session); + yourself. + self assert: client session cookieJar cookies isEmpty. + client get. + self assert: client isSuccess. + self assert: client session cookieJar cookies size equals: 1. + sessionId := client session cookieJar cookies anyOne value. + self assert: (client contents includesSubstring: sessionId). + client get. + self assert: client isSuccess. + self assert: client session cookieJar cookies size equals: 1. + self assert: client session cookieJar cookies anyOne value equals: sessionId. + self assert: (client contents includesSubstring: sessionId) ] \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnServerTest.class/instance/testSessionExpired.st b/repository/Zinc-Tests.package/ZnServerTest.class/instance/testSessionExpired.st index 7eb0c347..94e415dd 100644 --- a/repository/Zinc-Tests.package/ZnServerTest.class/instance/testSessionExpired.st +++ b/repository/Zinc-Tests.package/ZnServerTest.class/instance/testSessionExpired.st @@ -1,17 +1,21 @@ testing testSessionExpired - self withServerDo: [ :server | | client sessionId | - client := ZnClient new url: (server localUrl addPathSegment: #session); yourself. - self assert: client session cookieJar cookies isEmpty. - client get. - self assert: client isSuccess. - self assert: client session cookieJar cookies size = 1. - sessionId := client session cookieJar cookies anyOne value. - self assert: (client contents includesSubstring: sessionId). - "Kill the server session as if it was expired" - server sessionManager removeSessionWithId: sessionId. - "The client still presents the old session id but should get a new one" - client get. - self assert: client isSuccess. - self assert: client session cookieJar cookies size = 1. - self deny: client session cookieJar cookies anyOne value = sessionId ] + self + withServerDo: [ :server | + | client sessionId | + client := ZnClient new + url: (server localUrl addPathSegment: #session); + yourself. + self assert: client session cookieJar cookies isEmpty. + client get. + self assert: client isSuccess. + self assert: client session cookieJar cookies size equals: 1. + sessionId := client session cookieJar cookies anyOne value. + self assert: (client contents includesSubstring: sessionId). + "Kill the server session as if it was expired" + server sessionManager removeSessionWithId: sessionId. + "The client still presents the old session id but should get a new one" + client get. + self assert: client isSuccess. + self assert: client session cookieJar cookies size equals: 1. + self deny: client session cookieJar cookies anyOne value equals: sessionId ] \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnServerTest.class/instance/testSessionRoute.st b/repository/Zinc-Tests.package/ZnServerTest.class/instance/testSessionRoute.st index c9081b90..f10114cb 100644 --- a/repository/Zinc-Tests.package/ZnServerTest.class/instance/testSessionRoute.st +++ b/repository/Zinc-Tests.package/ZnServerTest.class/instance/testSessionRoute.st @@ -1,18 +1,22 @@ testing testSessionRoute - self withServerDo: [ :server | | client sessionId | - server route: 'r1'. - self assert: server route equals: 'r1'. - client := ZnClient new url: (server localUrl addPathSegment: #session); yourself. - self assert: client session cookieJar cookies isEmpty. - client get. - self assert: client isSuccess. - self assert: client session cookieJar cookies size = 1. - sessionId := client session cookieJar cookies anyOne value. - self assert: (client contents includesSubstring: sessionId). - self assert: (sessionId endsWith: '.r1'). - client get. - self assert: client isSuccess. - self assert: client session cookieJar cookies size = 1. - self assert: client session cookieJar cookies anyOne value equals: sessionId. - self assert: (client contents includesSubstring: sessionId) ] + self + withServerDo: [ :server | + | client sessionId | + server route: 'r1'. + self assert: server route equals: 'r1'. + client := ZnClient new + url: (server localUrl addPathSegment: #session); + yourself. + self assert: client session cookieJar cookies isEmpty. + client get. + self assert: client isSuccess. + self assert: client session cookieJar cookies size equals: 1. + sessionId := client session cookieJar cookies anyOne value. + self assert: (client contents includesSubstring: sessionId). + self assert: (sessionId endsWith: '.r1'). + client get. + self assert: client isSuccess. + self assert: client session cookieJar cookies size equals: 1. + self assert: client session cookieJar cookies anyOne value equals: sessionId. + self assert: (client contents includesSubstring: sessionId) ] \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnStatusLineTest.class/instance/testReading.st b/repository/Zinc-Tests.package/ZnStatusLineTest.class/instance/testReading.st index 73f3ad46..c29c97c2 100644 --- a/repository/Zinc-Tests.package/ZnStatusLineTest.class/instance/testReading.st +++ b/repository/Zinc-Tests.package/ZnStatusLineTest.class/instance/testReading.st @@ -1,8 +1,8 @@ testing testReading | statusLine string | - string := 'HTTP/1.1 200 OK', String crlf. + string := 'HTTP/1.1 200 OK' , String crlf. statusLine := ZnStatusLine readFrom: string readStream. - self assert: statusLine code = 200. - self assert: statusLine reason = 'OK'. - self assert: statusLine version = ZnConstants defaultHTTPVersion \ No newline at end of file + self assert: statusLine code equals: 200. + self assert: statusLine reason equals: 'OK'. + self assert: statusLine version equals: ZnConstants defaultHTTPVersion \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnStatusLineTest.class/instance/testWriting.st b/repository/Zinc-Tests.package/ZnStatusLineTest.class/instance/testWriting.st index 65ebf000..8661b8ee 100644 --- a/repository/Zinc-Tests.package/ZnStatusLineTest.class/instance/testWriting.st +++ b/repository/Zinc-Tests.package/ZnStatusLineTest.class/instance/testWriting.st @@ -3,4 +3,4 @@ testWriting | statusLine string | statusLine := ZnStatusLine ok. string := String streamContents: [ :stream | statusLine writeOn: stream ]. - self assert: string = ('HTTP/1.1 200 OK', String crlf) \ No newline at end of file + self assert: string equals: 'HTTP/1.1 200 OK' , String crlf \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnUserAgentSessionTest.class/instance/testAddCredential.st b/repository/Zinc-Tests.package/ZnUserAgentSessionTest.class/instance/testAddCredential.st index bdfc097c..214b9d08 100644 --- a/repository/Zinc-Tests.package/ZnUserAgentSessionTest.class/instance/testAddCredential.st +++ b/repository/Zinc-Tests.package/ZnUserAgentSessionTest.class/instance/testAddCredential.st @@ -4,4 +4,4 @@ testAddCredential session := ZnUserAgentSession new. count := session credentials size. session addCredential: self dummyCredential. - self assert: ((session credentials size) = (count + 1)) \ No newline at end of file + self assert: session credentials size equals: count + 1 \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testBase64.st b/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testBase64.st index 38ccca53..a88d36bf 100644 --- a/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testBase64.st +++ b/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testBase64.st @@ -1,13 +1,13 @@ testing testBase64 | short long encoded legalCharactes | - legalCharactes := (String withAll: ($A to: $Z), ($a to: $z), ($0 to: $9)), '='. + legalCharactes := (String withAll: ($A to: $Z) , ($a to: $z) , ($0 to: $9)) , '='. short := String withAll: ((1 to: 16) collect: [ :each | 'abc' atRandom ]). encoded := ZnUtils encodeBase64: short. - self assert: (ZnUtils decodeBase64: encoded) = short. + self assert: (ZnUtils decodeBase64: encoded) equals: short. self assert: (encoded allSatisfy: [ :each | legalCharactes includes: each ]). "We don't want line breaks!" long := String withAll: ((1 to: 64) collect: [ :each | 'abc' atRandom ]). encoded := ZnUtils encodeBase64: long. - self assert: (ZnUtils decodeBase64: encoded) = long. - self assert: (encoded allSatisfy: [ :each | legalCharactes includes: each ]) + self assert: (ZnUtils decodeBase64: encoded) equals: long. + self assert: (encoded allSatisfy: [ :each | legalCharactes includes: each ]) \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testCapitalizeString.st b/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testCapitalizeString.st index c1c17191..0a227574 100644 --- a/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testCapitalizeString.st +++ b/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testCapitalizeString.st @@ -1,7 +1,7 @@ testing testCapitalizeString - self assert: (ZnUtils capitalizeString: 'content-type') = 'Content-Type'. - self assert: (ZnUtils capitalizeString: 'CONTENT-type') = 'Content-Type'. - self assert: (ZnUtils capitalizeString: 'content-TYPE') = 'Content-Type'. - self assert: (ZnUtils capitalizeString: 'WWW-Authenticate') = 'Www-Authenticate'. - self assert: (ZnUtils capitalizeString: 'Content-MD5') = 'Content-Md5'. \ No newline at end of file + self assert: (ZnUtils capitalizeString: 'content-type') equals: 'Content-Type'. + self assert: (ZnUtils capitalizeString: 'CONTENT-type') equals: 'Content-Type'. + self assert: (ZnUtils capitalizeString: 'content-TYPE') equals: 'Content-Type'. + self assert: (ZnUtils capitalizeString: 'WWW-Authenticate') equals: 'Www-Authenticate'. + self assert: (ZnUtils capitalizeString: 'Content-MD5') equals: 'Content-Md5' \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testHttpDate.st b/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testHttpDate.st index 6b474c33..d2087f9a 100644 --- a/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testHttpDate.st +++ b/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testHttpDate.st @@ -1,7 +1,13 @@ testing testHttpDate | timestamp string | - timestamp := (DateAndTime year: 2010 month: 9 day: 1 hour: 10 minute: 10 second: 10 offset: 0 seconds). + timestamp := DateAndTime + year: 2010 + month: 9 + day: 1 + hour: 10 + minute: 10 + second: 10 + offset: 0 seconds. string := ZnUtils httpDate: timestamp. - self assert: (string = 'Wed, 01 Sep 2010 10:10:10 GMT') - \ No newline at end of file + self assert: string equals: 'Wed, 01 Sep 2010 10:10:10 GMT' \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testParseHttpDate.st b/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testParseHttpDate.st index 30f71ea7..fd09b144 100644 --- a/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testParseHttpDate.st +++ b/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testParseHttpDate.st @@ -1,13 +1,13 @@ testing testParseHttpDate "RFC 822, updated by RFC 1123" - + | timeStamp | timeStamp := ZnUtils parseHttpDate: 'Tue, 13 Sep 2011 08:04:49 GMT'. - self assert: timeStamp dayOfMonth = 13. - self assert: timeStamp monthIndex = 9. - self assert: timeStamp year = 2011. - self assert: timeStamp hour = 8. - self assert: timeStamp minute = 4. - self assert: timeStamp second = 49. - self assert: timeStamp offset = Duration zero. \ No newline at end of file + self assert: timeStamp dayOfMonth equals: 13. + self assert: timeStamp monthIndex equals: 9. + self assert: timeStamp year equals: 2011. + self assert: timeStamp hour equals: 8. + self assert: timeStamp minute equals: 4. + self assert: timeStamp second equals: 49. + self assert: timeStamp offset equals: Duration zero \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testParseHttpDateAlternative1.st b/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testParseHttpDateAlternative1.st index 60966987..1c033a09 100644 --- a/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testParseHttpDateAlternative1.st +++ b/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testParseHttpDateAlternative1.st @@ -1,13 +1,13 @@ testing testParseHttpDateAlternative1 "ANSI C's asctime() format" - + | timeStamp | timeStamp := ZnUtils parseHttpDate: 'Tue Jan 01 00:00:01 2036'. - self assert: timeStamp dayOfMonth = 1. - self assert: timeStamp monthIndex = 1. - self assert: timeStamp year = 2036. - self assert: timeStamp hour = 0. - self assert: timeStamp minute = 0. - self assert: timeStamp second = 1. - self assert: timeStamp offset = Duration zero \ No newline at end of file + self assert: timeStamp dayOfMonth equals: 1. + self assert: timeStamp monthIndex equals: 1. + self assert: timeStamp year equals: 2036. + self assert: timeStamp hour equals: 0. + self assert: timeStamp minute equals: 0. + self assert: timeStamp second equals: 1. + self assert: timeStamp offset equals: Duration zero \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testParseHttpDateDashes.st b/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testParseHttpDateDashes.st index 4375f665..fa9e1795 100644 --- a/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testParseHttpDateDashes.st +++ b/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testParseHttpDateDashes.st @@ -1,13 +1,13 @@ testing testParseHttpDateDashes "RFC 850, obsoleted by RFC 1036" - + | timeStamp | timeStamp := ZnUtils parseHttpDate: 'Tuesday, 13-Sep-11 08:04:49 GMT'. - self assert: timeStamp dayOfMonth = 13. - self assert: timeStamp monthIndex = 9. - self assert: timeStamp year = 2011. - self assert: timeStamp hour = 8. - self assert: timeStamp minute = 4. - self assert: timeStamp second = 49. - self assert: timeStamp offset = Duration zero \ No newline at end of file + self assert: timeStamp dayOfMonth equals: 13. + self assert: timeStamp monthIndex equals: 9. + self assert: timeStamp year equals: 2011. + self assert: timeStamp hour equals: 8. + self assert: timeStamp minute equals: 4. + self assert: timeStamp second equals: 49. + self assert: timeStamp offset equals: Duration zero \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testParseHttpDateDashesAlternative1.st b/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testParseHttpDateDashesAlternative1.st index 3c46b64b..4b6bc179 100644 --- a/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testParseHttpDateDashesAlternative1.st +++ b/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testParseHttpDateDashesAlternative1.st @@ -1,13 +1,13 @@ testing testParseHttpDateDashesAlternative1 "RFC 850, obsoleted by RFC 1036" - + | timeStamp | timeStamp := ZnUtils parseHttpDate: 'Tue, 13-Sep-2011 08:04:49 GMT'. - self assert: timeStamp dayOfMonth = 13. - self assert: timeStamp monthIndex = 9. - self assert: timeStamp year = 2011. - self assert: timeStamp hour = 8. - self assert: timeStamp minute = 4. - self assert: timeStamp second = 49. - self assert: timeStamp offset = Duration zero \ No newline at end of file + self assert: timeStamp dayOfMonth equals: 13. + self assert: timeStamp monthIndex equals: 9. + self assert: timeStamp year equals: 2011. + self assert: timeStamp hour equals: 8. + self assert: timeStamp minute equals: 4. + self assert: timeStamp second equals: 49. + self assert: timeStamp offset equals: Duration zero \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testReadUpToEndBinary.st b/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testReadUpToEndBinary.st index 62b5d2c5..efa219c5 100644 --- a/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testReadUpToEndBinary.st +++ b/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testReadUpToEndBinary.st @@ -1,9 +1,7 @@ testing testReadUpToEndBinary | data | - data := ByteArray streamContents: [ :stream | - 1 to: 10000 do: [ :each | - stream nextPut: #(1 2 3) atRandom ] ]. - self assert: (ZnUtils readUpToEnd: data readStream limit: nil) = data. - self assert: (ZnUtils readUpToEnd: data readStream limit: 10000) = data. - self should: [ ZnUtils readUpToEnd: data readStream limit: 9999 ] raise: ZnEntityTooLarge + data := ByteArray streamContents: [ :stream | 1 to: 10000 do: [ :each | stream nextPut: #(1 2 3) atRandom ] ]. + self assert: (ZnUtils readUpToEnd: data readStream limit: nil) equals: data. + self assert: (ZnUtils readUpToEnd: data readStream limit: 10000) equals: data. + self should: [ ZnUtils readUpToEnd: data readStream limit: 9999 ] raise: ZnEntityTooLarge \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testReadUpToEndNonBinary.st b/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testReadUpToEndNonBinary.st index c3b3b44b..013c5d53 100644 --- a/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testReadUpToEndNonBinary.st +++ b/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testReadUpToEndNonBinary.st @@ -1,9 +1,7 @@ testing testReadUpToEndNonBinary | data | - data := String streamContents: [ :stream | - 1 to: 10000 do: [ :each | - stream nextPut: 'abc' atRandom ] ]. - self assert: (ZnUtils readUpToEnd: data readStream limit: nil) = data. - self assert: (ZnUtils readUpToEnd: data readStream limit: 10000) = data. - self should: [ ZnUtils readUpToEnd: data readStream limit: 9999 ] raise: ZnEntityTooLarge + data := String streamContents: [ :stream | 1 to: 10000 do: [ :each | stream nextPut: 'abc' atRandom ] ]. + self assert: (ZnUtils readUpToEnd: data readStream limit: nil) equals: data. + self assert: (ZnUtils readUpToEnd: data readStream limit: 10000) equals: data. + self should: [ ZnUtils readUpToEnd: data readStream limit: 9999 ] raise: ZnEntityTooLarge \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testStreamingBinary.st b/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testStreamingBinary.st index d8e7a67a..36d03fc8 100644 --- a/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testStreamingBinary.st +++ b/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testStreamingBinary.st @@ -1,11 +1,9 @@ testing testStreamingBinary | data in out | - data := ByteArray streamContents: [ :stream | - 1 to: 10000 do: [ :each | - stream nextPut: #(1 2 3) atRandom ] ]. + data := ByteArray streamContents: [ :stream | 1 to: 10000 do: [ :each | stream nextPut: #(1 2 3) atRandom ] ]. in := data readStream. out := WriteStream on: (ByteArray new: data size). ZnUtils streamFrom: in to: out size: data size. self assert: in atEnd. - self assert: out contents = data \ No newline at end of file + self assert: out contents equals: data \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testStreamingNonBinary.st b/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testStreamingNonBinary.st index 5dc8562a..2ee4734e 100644 --- a/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testStreamingNonBinary.st +++ b/repository/Zinc-Tests.package/ZnUtilsTest.class/instance/testStreamingNonBinary.st @@ -1,11 +1,9 @@ testing testStreamingNonBinary | data in out | - data := String streamContents: [ :stream | - 1 to: 10000 do: [ :each | - stream nextPut: 'abc' atRandom ] ]. + data := String streamContents: [ :stream | 1 to: 10000 do: [ :each | stream nextPut: 'abc' atRandom ] ]. in := data readStream. out := WriteStream on: (String new: data size). ZnUtils streamFrom: in to: out size: data size. self assert: in atEnd. - self assert: out contents = data \ No newline at end of file + self assert: out contents equals: data \ No newline at end of file From 8588b8b5c5266f3f728a39f559652ac5fcc69917 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Sat, 5 Feb 2022 11:24:02 +0100 Subject: [PATCH 09/30] Add Pharo 10 to the CI build matrix --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ec6d7e24..03282414 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - smalltalk: [ Pharo64-9.0, Pharo64-8.0, Pharo64-7.0 ] + smalltalk: [ Pharo64-10.0 , Pharo64-9.0 , Pharo64-8.0 , Pharo64-7.0 ] name: ${{ matrix.smalltalk }} steps: - uses: actions/checkout@v2 From 6698ff0a5b3348bfc53c6dac638f6e1f449241d7 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Sat, 5 Feb 2022 11:30:50 +0100 Subject: [PATCH 10/30] change CI target from Pharo64-10.0 to Pharo64-10 --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 03282414..cc3850a4 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - smalltalk: [ Pharo64-10.0 , Pharo64-9.0 , Pharo64-8.0 , Pharo64-7.0 ] + smalltalk: [ Pharo64-10 , Pharo64-9.0 , Pharo64-8.0 , Pharo64-7.0 ] name: ${{ matrix.smalltalk }} steps: - uses: actions/checkout@v2 From dd4e052e95b8a971a9fee4e9b41915195292d119 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Sat, 5 Feb 2022 11:58:01 +0100 Subject: [PATCH 11/30] Fix ZnHTTPSTests>>#testGetPharoVersion for Phar 10 --- .../ZnHTTPSTests.class/instance/testGetPharoVersion.st | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repository/Zinc-Zodiac-Tests.package/ZnHTTPSTests.class/instance/testGetPharoVersion.st b/repository/Zinc-Zodiac-Tests.package/ZnHTTPSTests.class/instance/testGetPharoVersion.st index 95091aa6..e9395f09 100644 --- a/repository/Zinc-Zodiac-Tests.package/ZnHTTPSTests.class/instance/testGetPharoVersion.st +++ b/repository/Zinc-Zodiac-Tests.package/ZnHTTPSTests.class/instance/testGetPharoVersion.st @@ -4,7 +4,7 @@ testGetPharoVersion self ensureSocketStreamFactory. self isNativeSSLPluginPresent ifFalse: [ ^ self ]. self runningOnWindowsInriaCI ifTrue: [ ^ self ]. - imageVersion := SystemVersion current type , SystemVersion current dottedMajorMinor. + imageVersion := SystemVersion current type , (SystemVersion current major = 10 ifTrue: [ '10' ] ifFalse: [ SystemVersion current dottedMajorMinor ]). "Something weird in the CI" url := ZnUrl new scheme: #https; host: 'ci.inria.fr'; From 32175cd92afff8f442928b11e647e89b0d20b3b2 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Sun, 6 Feb 2022 11:01:22 +0100 Subject: [PATCH 12/30] Restore ZnUrl>>#closePath back to using $/ instead of #/ --- .../ZnUrl.class/instance/closePath.st | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/closePath.st b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/closePath.st index efa69193..25fb8326 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/closePath.st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/closePath.st @@ -1,4 +1,4 @@ accessing - path closePath self isDirectoryPath - ifFalse: [ self addPathSegment: #/ ] \ No newline at end of file + ifFalse: [ self addPathSegment: $/ ] \ No newline at end of file From 86714ff3c926149b694e636fd758d75ca91c3f5e Mon Sep 17 00:00:00 2001 From: Christophe Demarey Date: Tue, 15 Feb 2022 15:20:34 +0100 Subject: [PATCH 13/30] use #assert:equals: --- .../instance/testWriting.st | 2 +- .../instance/testWritingOverflow.st | 2 +- .../instance/testInt8.st | 4 ++-- .../properties.json | 2 +- .../instance/testWriting.st | 2 +- .../instance/testWritingOverflow.st | 2 +- .../instance/testConvencienceMethods.st | 2 +- .../instance/testLatin2Encoder.st | 16 +++++++++------- .../instance/testNullEncoder.st | 7 ++++--- .../instance/testUTF8Encoder.st | 16 +++++++++++----- .../instance/testUTF8EncoderAuto.st | 9 ++++++--- .../instance/testUTF8EncoderByteCount.st | 11 ++++++----- .../instance/testReadStream.st | 10 +++++----- .../ZnMimeTypeTest.class/instance/testMatches.st | 2 +- .../instance/testDownloadSmallHTML.st | 4 ++-- .../instance/testGetAfterPost.st | 4 ++-- .../ZnClientTest.class/instance/testGetGeoIP.st | 2 +- .../instance/testRedirectWithCookies.st | 2 +- .../instance/testRedirectWithCustomHeader.st | 4 ++-- .../instance/testRelativeRedirect.st | 2 +- .../instance/testRelativeRedirect307.st | 2 +- .../instance/testRelativeRedirectUp.st | 2 +- .../instance/testUploadSmallDocument.st | 6 +++--- .../instance/testDispatcherDelegate.st | 12 ++++++------ .../ZnEntityTest.class/instance/testReading.st | 6 +++--- .../instance/testReadingBinary.st | 6 +++--- .../instance/testCookiesParsing.st | 4 ++-- .../ZnRequestTest.class/instance/testReading.st | 4 ++-- .../instance/testSlashdotGzipChunked.st | 6 +++--- 29 files changed, 83 insertions(+), 70 deletions(-) diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadWriteStreamTest.class/instance/testWriting.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadWriteStreamTest.class/instance/testWriting.st index 00c15f91..9c4b109c 100644 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadWriteStreamTest.class/instance/testWriting.st +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadWriteStreamTest.class/instance/testWriting.st @@ -5,4 +5,4 @@ testWriting bufferedStream := ZnBufferedReadWriteStream on: stringStream. 0 to: 9 do: [ :each | bufferedStream nextPut: (Character digitValue: each) ]. bufferedStream flush ]. - self assert: string = '0123456789' \ No newline at end of file + self assert: string equals: '0123456789' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadWriteStreamTest.class/instance/testWritingOverflow.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadWriteStreamTest.class/instance/testWritingOverflow.st index 97ef3b5c..21461017 100644 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadWriteStreamTest.class/instance/testWritingOverflow.st +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadWriteStreamTest.class/instance/testWritingOverflow.st @@ -8,4 +8,4 @@ testWritingOverflow bufferedStream nextPutAll: '0123'; nextPutAll: '4567'; nextPutAll: '89'. bufferedStream nextPutAll: '0123456789'; nextPutAll: '0123456789'. bufferedStream flush ]. - self assert: string = '0123456789012345678901234567890123456789' \ No newline at end of file + self assert: string equals: '0123456789012345678901234567890123456789' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedStreamByteTest.class/instance/testInt8.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedStreamByteTest.class/instance/testInt8.st index 8373791b..7674dabd 100644 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedStreamByteTest.class/instance/testInt8.st +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedStreamByteTest.class/instance/testInt8.st @@ -9,6 +9,6 @@ testInt8 self assert: readStream int8 equals: 123. self assert: readStream peek equals: 123. self assert: readStream uint8 equals: 123. - self deny: readStream peek = 123. - self deny: readStream peek = -123. + self deny: readStream peek equals: 123. + self deny: readStream peek equals: -123. self assert: readStream int8 equals: -123 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedStreamByteTest.class/properties.json b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedStreamByteTest.class/properties.json index defacb7f..1e9f4420 100644 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedStreamByteTest.class/properties.json +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedStreamByteTest.class/properties.json @@ -1,5 +1,5 @@ { - "commentStamp" : "SvenVanCaekenberghe 4/19/2018 14:14", + "commentStamp" : "", "super" : "TestCase", "category" : "Zinc-Character-Encoding-Tests", "classinstvars" : [ ], diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTest.class/instance/testWriting.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTest.class/instance/testWriting.st index a8e34771..9e38e5e0 100644 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTest.class/instance/testWriting.st +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTest.class/instance/testWriting.st @@ -5,4 +5,4 @@ testWriting bufferedStream := ZnBufferedWriteStream on: stringStream. 0 to: 9 do: [ :each | bufferedStream nextPut: (Character digitValue: each) ]. bufferedStream flush ]. - self assert: string = '0123456789' \ No newline at end of file + self assert: string equals: '0123456789' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTest.class/instance/testWritingOverflow.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTest.class/instance/testWritingOverflow.st index 9c4d64a5..0905b4a3 100644 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTest.class/instance/testWritingOverflow.st +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedWriteStreamTest.class/instance/testWritingOverflow.st @@ -8,4 +8,4 @@ testWritingOverflow bufferedStream nextPutAll: '0123'; nextPutAll: '4567'; nextPutAll: '89'. bufferedStream nextPutAll: '0123456789'; nextPutAll: '0123456789'. bufferedStream flush ]. - self assert: string = '0123456789012345678901234567890123456789' \ No newline at end of file + self assert: string equals: '0123456789012345678901234567890123456789' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testConvencienceMethods.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testConvencienceMethods.st index 838c461e..eac2d5f0 100644 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testConvencienceMethods.st +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testConvencienceMethods.st @@ -4,7 +4,7 @@ testConvencienceMethods encoder := ZnUTF8Encoder new. string := 'élève en Français'. self assert: (encoder decodeBytes: (encoder encodeString: string)) equals: string. - self assert: (encoder encodedByteCountForString: string) = 20. + self assert: (encoder encodedByteCountForString: string) equals: 20. #( 'ccc' 'ççç' 'c' 'ç' 'çc' 'cç' ) do: [ :each | self assert: (encoder decodeBytes: (encoder encodeString: each)) equals: each ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testLatin2Encoder.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testLatin2Encoder.st index 73a959c0..b07bd412 100644 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testLatin2Encoder.st +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testLatin2Encoder.st @@ -1,14 +1,16 @@ testing testLatin2Encoder "Example characters taken from http://en.wikipedia.org/wiki/Latin2" - + | encoder inputBytes outputBytes inputString outputString | encoder := ZnCharacterEncoder newForEncoding: 'latin2'. - inputString := String - with: (16r0154 asCharacter) with: (16r0110 asCharacter) - with: ( 16r0155 asCharacter) with: (16r0111 asCharacter). - inputBytes := #(192 208 224 240) asByteArray. + inputString := String + with: 16r0154 asCharacter + with: 16r0110 asCharacter + with: 16r0155 asCharacter + with: 16r0111 asCharacter. + inputBytes := #( 192 208 224 240 ) asByteArray. outputBytes := self encodeString: inputString with: encoder. - self assert: outputBytes = inputBytes. + self assert: outputBytes equals: inputBytes. outputString := self decodeBytes: inputBytes with: encoder. - self assert: outputString = inputString \ No newline at end of file + self assert: outputString equals: inputString \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testNullEncoder.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testNullEncoder.st index cbad2592..189f6e6c 100644 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testNullEncoder.st +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testNullEncoder.st @@ -1,8 +1,9 @@ testing testNullEncoder + | encoder bytes string | encoder := ZnNullEncoder new. bytes := self encodeString: 'abc' with: encoder. - self assert: bytes = #(97 98 99) asByteArray. - string := self decodeBytes: #(65 66 67) asByteArray with: encoder. - self assert: string = 'ABC' \ No newline at end of file + self assert: bytes equals: #( 97 98 99 ) asByteArray. + string := self decodeBytes: #( 65 66 67 ) asByteArray with: encoder. + self assert: string equals: 'ABC' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testUTF8Encoder.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testUTF8Encoder.st index de0aa6d0..8f477235 100644 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testUTF8Encoder.st +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testUTF8Encoder.st @@ -1,12 +1,18 @@ testing testUTF8Encoder + "The examples are taken from http://en.wikipedia.org/wiki/UTF-8#Description" - + | encoder inputBytes outputBytes inputString outputString | encoder := ZnUTF8Encoder new. - inputString := String with: $$ with: (16r00A2 asCharacter) with: (16r20AC asCharacter) with: (16r024B62 asCharacter). - inputBytes := #(16r24 16rC2 16rA2 16rE2 16r82 16rAC 16rF0 16rA4 16rAD 16rA2) asByteArray. + inputString := String + with: $$ + with: 16r00A2 asCharacter + with: 16r20AC asCharacter + with: 16r024B62 asCharacter. + inputBytes := #( 16r24 16rC2 16rA2 16rE2 16r82 16rAC 16rF0 16rA4 + 16rAD 16rA2 ) asByteArray. outputBytes := self encodeString: inputString with: encoder. - self assert: outputBytes = inputBytes. + self assert: outputBytes equals: inputBytes. outputString := self decodeBytes: inputBytes with: encoder. - self assert: outputString = inputString \ No newline at end of file + self assert: outputString equals: inputString \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testUTF8EncoderAuto.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testUTF8EncoderAuto.st index 9fec90b4..4c29f8c2 100644 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testUTF8EncoderAuto.st +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testUTF8EncoderAuto.st @@ -1,8 +1,11 @@ testing testUTF8EncoderAuto + | encoder inputString bytes outputString | encoder := ZnUTF8Encoder new. - inputString := String withAll: ((1 to: 3072) collect: [ :each | Character value: each ]). - bytes := self encodeString: inputString with: encoder. + inputString := String withAll: + ((1 to: 3072) collect: [ :each | + Character value: each ]). + bytes := self encodeString: inputString with: encoder. outputString := self decodeBytes: bytes with: encoder. - self assert: inputString = outputString \ No newline at end of file + self assert: inputString equals: outputString \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testUTF8EncoderByteCount.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testUTF8EncoderByteCount.st index 02e5bbc7..5c1646ef 100644 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testUTF8EncoderByteCount.st +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterEncoderTest.class/instance/testUTF8EncoderByteCount.st @@ -1,8 +1,9 @@ testing -testUTF8EncoderByteCount +testUTF8EncoderByteCount + | encoder | encoder := ZnUTF8Encoder new. - self assert: (encoder encodedByteCountFor: $$) = 1. - self assert: (encoder encodedByteCountFor: (16r00A2 asCharacter)) = 2. - self assert: (encoder encodedByteCountFor: (16r20AC asCharacter)) = 3. - self assert: (encoder encodedByteCountFor: (16r024B62 asCharacter)) = 4 \ No newline at end of file + self assert: (encoder encodedByteCountFor: $$) equals: 1. + self assert: (encoder encodedByteCountFor: 16r00A2 asCharacter) equals: 2. + self assert: (encoder encodedByteCountFor: 16r20AC asCharacter) equals: 3. + self assert: (encoder encodedByteCountFor: 16r024B62 asCharacter) equals: 4 \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testReadStream.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testReadStream.st index 71b6d83b..5966a335 100644 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testReadStream.st +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testReadStream.st @@ -4,15 +4,15 @@ testReadStream stream := ZnCharacterReadStream on: 'ABC' asByteArray readStream. self deny: stream atEnd. self deny: stream isBinary. - self assert: stream next = $A. + self assert: stream next equals: $A. self deny: stream atEnd. - self assert: stream peek = $B. + self assert: stream peek equals: $B. self deny: stream atEnd. - self assert: stream peek = $B. + self assert: stream peek equals: $B. self deny: stream atEnd. - self assert: stream next = $B. + self assert: stream next equals: $B. self deny: stream atEnd. - self assert: stream next = $C. + self assert: stream next equals: $C. self assert: stream atEnd. self assert: stream next isNil. self assert: stream peek isNil \ No newline at end of file diff --git a/repository/Zinc-Resource-Meta-Tests.package/ZnMimeTypeTest.class/instance/testMatches.st b/repository/Zinc-Resource-Meta-Tests.package/ZnMimeTypeTest.class/instance/testMatches.st index 12721b0d..4ebe1335 100644 --- a/repository/Zinc-Resource-Meta-Tests.package/ZnMimeTypeTest.class/instance/testMatches.st +++ b/repository/Zinc-Resource-Meta-Tests.package/ZnMimeTypeTest.class/instance/testMatches.st @@ -7,5 +7,5 @@ testMatches ( 'text/plain;charset=utf-8' 'text/plain' ) ( 'text/plain' 'text/plain;charset=utf-8' ) ( 'text/plain;charset=utf-8' 'text/plain;charset=ascii' ) ) do: [ :each | - self deny: each first asZnMimeType = each second asZnMimeType. + self deny: each first asZnMimeType equals: each second asZnMimeType. self assert: (each first asZnMimeType matches: each second asZnMimeType) ] \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnClientTest.class/instance/testDownloadSmallHTML.st b/repository/Zinc-Tests.package/ZnClientTest.class/instance/testDownloadSmallHTML.st index 0265b59c..e46a10d6 100644 --- a/repository/Zinc-Tests.package/ZnClientTest.class/instance/testDownloadSmallHTML.st +++ b/repository/Zinc-Tests.package/ZnClientTest.class/instance/testDownloadSmallHTML.st @@ -7,7 +7,7 @@ testDownloadSmallHTML url: self smallHtmlUrl; downloadTo: ZnFileSystemUtils defaultDirectoryPath. self assert: client isSuccess. - self assert: client response contentType = ZnMimeType textHtml. + self assert: client response contentType equals: ZnMimeType textHtml. ZnFileSystemUtils readStreamFor: self smallHtmlUrl pathSegments last do: [ :stream | self assert: (stream upToEnd includesSubstring: 'Small') ]. @@ -17,7 +17,7 @@ testDownloadSmallHTML url: self smallHtmlUrl; downloadTo: self smallHtmlUrl pathSegments last. self assert: client isSuccess. - self assert: client response contentType = ZnMimeType textHtml. + self assert: client response contentType equals: ZnMimeType textHtml. ZnFileSystemUtils readStreamFor: self smallHtmlUrl pathSegments last do: [ :stream | self assert: (stream upToEnd includesSubstring: 'Small') ]. diff --git a/repository/Zinc-Tests.package/ZnClientTest.class/instance/testGetAfterPost.st b/repository/Zinc-Tests.package/ZnClientTest.class/instance/testGetAfterPost.st index 242ddc54..b4b9455d 100644 --- a/repository/Zinc-Tests.package/ZnClientTest.class/instance/testGetAfterPost.st +++ b/repository/Zinc-Tests.package/ZnClientTest.class/instance/testGetAfterPost.st @@ -21,10 +21,10 @@ testGetAfterPost entity: (ZnEntity text: 'One two three'); post. self assert: client isSuccess. - self assert: client contents = 'OK for one'. + self assert: client contents equals: 'OK for one'. client url: 'two'; get. self assert: client isSuccess. - self assert: client contents = 'OK for two'. + self assert: client contents equals: 'OK for two'. client close ] \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnClientTest.class/instance/testGetGeoIP.st b/repository/Zinc-Tests.package/ZnClientTest.class/instance/testGetGeoIP.st index 7a6feb42..64bed6ee 100644 --- a/repository/Zinc-Tests.package/ZnClientTest.class/instance/testGetGeoIP.st +++ b/repository/Zinc-Tests.package/ZnClientTest.class/instance/testGetGeoIP.st @@ -14,5 +14,5 @@ testGetGeoIP ifFail: [ ^ self fail ]; get. self assert: result isDictionary. - self assert: (result at: #country) = 'BE'. + self assert: (result at: #country) equals: 'BE'. client close \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnClientTest.class/instance/testRedirectWithCookies.st b/repository/Zinc-Tests.package/ZnClientTest.class/instance/testRedirectWithCookies.st index b697f528..cc231c1b 100644 --- a/repository/Zinc-Tests.package/ZnClientTest.class/instance/testRedirectWithCookies.st +++ b/repository/Zinc-Tests.package/ZnClientTest.class/instance/testRedirectWithCookies.st @@ -16,5 +16,5 @@ testRedirectWithCookies url: server localUrl; addPath: 'one'; post. self assert: client isSuccess. - self assert: client contents = 'OK!'. + self assert: client contents equals: 'OK!'. client close ] \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnClientTest.class/instance/testRedirectWithCustomHeader.st b/repository/Zinc-Tests.package/ZnClientTest.class/instance/testRedirectWithCustomHeader.st index 47781e37..0d36845c 100644 --- a/repository/Zinc-Tests.package/ZnClientTest.class/instance/testRedirectWithCustomHeader.st +++ b/repository/Zinc-Tests.package/ZnClientTest.class/instance/testRedirectWithCustomHeader.st @@ -1,6 +1,6 @@ testing testRedirectWithCustomHeader - self withServerDo: [ :server | | client cookie | + self withServerDo: [ :server | | client | server onRequestRespond: [ :request | (request headers at: 'X-Custom' ifAbsent: [ nil ]) = 'The Secret' ifFalse: [ ZnResponse badRequest: request ] @@ -17,5 +17,5 @@ testRedirectWithCustomHeader headerAt: 'X-Custom' put: 'The Secret'; get. self assert: client isSuccess. - self assert: client contents = 'OK!'. + self assert: client contents equals: 'OK!'. client close ] \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnClientTest.class/instance/testRelativeRedirect.st b/repository/Zinc-Tests.package/ZnClientTest.class/instance/testRelativeRedirect.st index b5f6306d..e0d7fe0b 100644 --- a/repository/Zinc-Tests.package/ZnClientTest.class/instance/testRelativeRedirect.st +++ b/repository/Zinc-Tests.package/ZnClientTest.class/instance/testRelativeRedirect.st @@ -12,5 +12,5 @@ testRelativeRedirect url: server localUrl; addPath: 'one'; post. self assert: client isSuccess. - self assert: client contents = 'OK!'. + self assert: client contents equals: 'OK!'. client close ] \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnClientTest.class/instance/testRelativeRedirect307.st b/repository/Zinc-Tests.package/ZnClientTest.class/instance/testRelativeRedirect307.st index 6662fec5..852c7012 100644 --- a/repository/Zinc-Tests.package/ZnClientTest.class/instance/testRelativeRedirect307.st +++ b/repository/Zinc-Tests.package/ZnClientTest.class/instance/testRelativeRedirect307.st @@ -14,5 +14,5 @@ testRelativeRedirect307 entity: (ZnEntity text: 'BODY'); post. self assert: client isSuccess. - self assert: client contents = 'OK!'. + self assert: client contents equals: 'OK!'. client close ] \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnClientTest.class/instance/testRelativeRedirectUp.st b/repository/Zinc-Tests.package/ZnClientTest.class/instance/testRelativeRedirectUp.st index f5bb5294..75751911 100644 --- a/repository/Zinc-Tests.package/ZnClientTest.class/instance/testRelativeRedirectUp.st +++ b/repository/Zinc-Tests.package/ZnClientTest.class/instance/testRelativeRedirectUp.st @@ -12,5 +12,5 @@ testRelativeRedirectUp url: server localUrl; addPath: #('a' 'b' 'c.txt'); post. self assert: client isSuccess. - self assert: client contents = 'OK!'. + self assert: client contents equals: 'OK!'. client close ] \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnClientTest.class/instance/testUploadSmallDocument.st b/repository/Zinc-Tests.package/ZnClientTest.class/instance/testUploadSmallDocument.st index 25ce488b..75548d50 100644 --- a/repository/Zinc-Tests.package/ZnClientTest.class/instance/testUploadSmallDocument.st +++ b/repository/Zinc-Tests.package/ZnClientTest.class/instance/testUploadSmallDocument.st @@ -10,12 +10,12 @@ testUploadSmallDocument url: server localUrl; addPath: 'echo'; uploadEntityFrom: path. - self assert: client request entity contentType = ZnMimeType textPlain. + self assert: client request entity contentType equals: ZnMimeType textPlain. client contentType: ZnMimeType textPlain. "Not needed, just test the code path" - self assert: client request entity contentType = ZnMimeType textPlain. + self assert: client request entity contentType equals: ZnMimeType textPlain. client post. self assert: client isSuccess. - self assert: client entity contentType = ZnMimeType textPlain. + self assert: client entity contentType equals: ZnMimeType textPlain. self assert: (client contents includesSubstring: contents). client close. ZnFileSystemUtils deleteIfExists: 'small.txt' ] \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnDispatcherDelegateTest.class/instance/testDispatcherDelegate.st b/repository/Zinc-Tests.package/ZnDispatcherDelegateTest.class/instance/testDispatcherDelegate.st index e1acb6c5..1fd8ca7f 100644 --- a/repository/Zinc-Tests.package/ZnDispatcherDelegateTest.class/instance/testDispatcherDelegate.st +++ b/repository/Zinc-Tests.package/ZnDispatcherDelegateTest.class/instance/testDispatcherDelegate.st @@ -8,15 +8,15 @@ testDispatcherDelegate client := ZnClient new. client get: (server localUrl addPathSegment: 'missing'; yourself). - self assert: (client response contentType = ZnMimeType textPlain). - self assert: (client response status = 404). + self assert: client response contentType equals: ZnMimeType textPlain. + self assert: client response status equals: 404. client get: server localUrl. - self assert: (client response contentType = ZnMimeType textHtml). - self assert: (client response status = 200). + self assert: client response contentType equals: ZnMimeType textHtml. + self assert: client response status equals: 200. client get: (server localUrl addPathSegment: 'hello'; yourself). - self assert: (client response contentType = ZnMimeType textHtml). - self assert: (client response status = 200). + self assert: client response contentType equals: ZnMimeType textHtml. + self assert: client response status equals: 200. client close ] \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnEntityTest.class/instance/testReading.st b/repository/Zinc-Tests.package/ZnEntityTest.class/instance/testReading.st index f1c539ae..c8320e2c 100644 --- a/repository/Zinc-Tests.package/ZnEntityTest.class/instance/testReading.st +++ b/repository/Zinc-Tests.package/ZnEntityTest.class/instance/testReading.st @@ -7,6 +7,6 @@ testReading usingType: ZnMimeType textPlain andLength: contents size. self assert: entity contents isString. - self assert: entity string = contents. - self assert: entity contentLength = contents size. - self assert: entity contentType = ZnMimeType textPlain \ No newline at end of file + self assert: entity string equals: contents. + self assert: entity contentLength equals: contents size. + self assert: entity contentType equals: ZnMimeType textPlain \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnEntityTest.class/instance/testReadingBinary.st b/repository/Zinc-Tests.package/ZnEntityTest.class/instance/testReadingBinary.st index d9eac218..bc56d20a 100644 --- a/repository/Zinc-Tests.package/ZnEntityTest.class/instance/testReadingBinary.st +++ b/repository/Zinc-Tests.package/ZnEntityTest.class/instance/testReadingBinary.st @@ -7,6 +7,6 @@ testReadingBinary usingType: ZnMimeType textPlain andLength: contents size. self deny: entity contents isString. - self assert: entity contents = contents asByteArray. - self assert: entity contentLength = contents size. - self assert: entity contentType = ZnMimeType textPlain \ No newline at end of file + self assert: entity contents equals: contents asByteArray. + self assert: entity contentLength equals: contents size. + self assert: entity contentType equals: ZnMimeType textPlain \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnRequestTest.class/instance/testCookiesParsing.st b/repository/Zinc-Tests.package/ZnRequestTest.class/instance/testCookiesParsing.st index dfc85652..91ce7023 100644 --- a/repository/Zinc-Tests.package/ZnRequestTest.class/instance/testCookiesParsing.st +++ b/repository/Zinc-Tests.package/ZnRequestTest.class/instance/testCookiesParsing.st @@ -13,8 +13,8 @@ testCookiesParsing testCookie2 := cookies detect: [ :each | each name = 'testCookie2' ]. self assert: testCookie1 notNil. - self assert: testCookie1 value = '123'. + self assert: testCookie1 value equals: '123'. self assert: testCookie2 notNil. - self assert: testCookie2 value = '321'. + self assert: testCookie2 value equals: '321'. diff --git a/repository/Zinc-Tests.package/ZnRequestTest.class/instance/testReading.st b/repository/Zinc-Tests.package/ZnRequestTest.class/instance/testReading.st index cfdafe81..cf873189 100644 --- a/repository/Zinc-Tests.package/ZnRequestTest.class/instance/testReading.st +++ b/repository/Zinc-Tests.package/ZnRequestTest.class/instance/testReading.st @@ -6,7 +6,7 @@ testReading 'Agent: SUnit', String crlf, String crlf. request := ZnRequest readFrom: input readStream. - self assert: request method = #GET. + self assert: request method equals: #GET. self assert: request hasHeaders. - self assert: (request headers at: 'Host') = 'foo.com'. + self assert: (request headers at: 'Host') equals: 'foo.com'. self assert: request hasEntity not diff --git a/repository/Zinc-Tests.package/ZnResponseTest.class/instance/testSlashdotGzipChunked.st b/repository/Zinc-Tests.package/ZnResponseTest.class/instance/testSlashdotGzipChunked.st index 63adf269..c72f3c6a 100644 --- a/repository/Zinc-Tests.package/ZnResponseTest.class/instance/testSlashdotGzipChunked.st +++ b/repository/Zinc-Tests.package/ZnResponseTest.class/instance/testSlashdotGzipChunked.st @@ -12,9 +12,9 @@ testSlashdotGzipChunked value: ZnNullEncoder new during: [ ZnResponse readFrom: stream ] ] ensure: [ stream close ]. response isRedirect ifTrue: [ ^ self ]. - self assert: response code = 200. + self assert: response code equals: 200. self assert: ((response headers at: 'Content-Type') beginsWith: 'text/html'). - self assert: (response headers at: 'Content-Encoding' ifAbsent: [ 'gzip' ]) = 'gzip'. - self assert: (response headers at: 'Transfer-Encoding' ifAbsent: [ 'chunked' ]) = 'chunked'. + self assert: (response headers at: 'Content-Encoding' ifAbsent: [ 'gzip' ]) equals: 'gzip'. + self assert: (response headers at: 'Transfer-Encoding' ifAbsent: [ 'chunked' ]) equals: 'chunked'. contents := response entity contents. self assert: ((contents includesSubstring: 'Slashdot') or: [ contents includesSubstring: 'refresh' ]) From 8f12b1e56bfcf4cb0df281ecdf2c2fda6321d132 Mon Sep 17 00:00:00 2001 From: Christophe Demarey Date: Tue, 15 Feb 2022 14:04:35 +0100 Subject: [PATCH 14/30] avoid symbols instead of blocks --- .../ZnCharacterStreamTest.class/instance/testNextLine.st | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testNextLine.st b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testNextLine.st index 3b930af7..a9c2a803 100644 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testNextLine.st +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnCharacterStreamTest.class/instance/testNextLine.st @@ -9,7 +9,7 @@ testNextLine stream := ZnCharacterReadStream on: ({ $a. Character cr. $b. Character lf. - $c } collect: #charCode) readStream. + $c } collect: [:each | each charCode]) readStream. self assert: stream nextLine equals: 'a'. self assert: stream nextLine equals: 'b'. self assert: stream nextLine equals: 'c'. From d1a0e05f55b70212a69f0a264934a47063ddcb48 Mon Sep 17 00:00:00 2001 From: Christophe Demarey Date: Tue, 15 Feb 2022 14:52:31 +0100 Subject: [PATCH 15/30] fix method category --- .../ZnNewLineWriterStream.class/instance/flush.st | 2 +- .../ZnNewLineWriterStream.class/properties.json | 2 +- .../ZnChunkedReadStream.class/instance/reset.st | 2 +- .../ZnCredential.class/class/findHandlerFor..st | 2 +- .../ZnLimitedReadStream.class/instance/reset.st | 2 +- .../Zinc-HTTP.package/ZnLimitedReadStream.class/properties.json | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/instance/flush.st b/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/instance/flush.st index d1c76a54..524c2642 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/instance/flush.st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/instance/flush.st @@ -1,3 +1,3 @@ -accessing +flushing flush ^ stream flush \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/properties.json b/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/properties.json index f7cc7645..64e62d13 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/properties.json +++ b/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/properties.json @@ -1,5 +1,5 @@ { - "commentStamp" : "SvenVanCaekenberghe 11/7/2018 13:55", + "commentStamp" : "", "super" : "WriteStream", "category" : "Zinc-Character-Encoding-Core", "classinstvars" : [ ], diff --git a/repository/Zinc-HTTP.package/ZnChunkedReadStream.class/instance/reset.st b/repository/Zinc-HTTP.package/ZnChunkedReadStream.class/instance/reset.st index 1a91c9f1..d27e5541 100644 --- a/repository/Zinc-HTTP.package/ZnChunkedReadStream.class/instance/reset.st +++ b/repository/Zinc-HTTP.package/ZnChunkedReadStream.class/instance/reset.st @@ -1,3 +1,3 @@ -accessing +initialization reset "We don't allow it" \ No newline at end of file diff --git a/repository/Zinc-HTTP.package/ZnCredential.class/class/findHandlerFor..st b/repository/Zinc-HTTP.package/ZnCredential.class/class/findHandlerFor..st index 11d77c97..a5fa3e40 100644 --- a/repository/Zinc-HTTP.package/ZnCredential.class/class/findHandlerFor..st +++ b/repository/Zinc-HTTP.package/ZnCredential.class/class/findHandlerFor..st @@ -1,4 +1,4 @@ -accessing class hierarchy +accessing - class hierarchy findHandlerFor: anAuthHeader | type i | i := anAuthHeader indexOf: Character space. diff --git a/repository/Zinc-HTTP.package/ZnLimitedReadStream.class/instance/reset.st b/repository/Zinc-HTTP.package/ZnLimitedReadStream.class/instance/reset.st index 1a91c9f1..d27e5541 100644 --- a/repository/Zinc-HTTP.package/ZnLimitedReadStream.class/instance/reset.st +++ b/repository/Zinc-HTTP.package/ZnLimitedReadStream.class/instance/reset.st @@ -1,3 +1,3 @@ -accessing +initialization reset "We don't allow it" \ No newline at end of file diff --git a/repository/Zinc-HTTP.package/ZnLimitedReadStream.class/properties.json b/repository/Zinc-HTTP.package/ZnLimitedReadStream.class/properties.json index b62845f8..f8fb05c3 100644 --- a/repository/Zinc-HTTP.package/ZnLimitedReadStream.class/properties.json +++ b/repository/Zinc-HTTP.package/ZnLimitedReadStream.class/properties.json @@ -1,5 +1,5 @@ { - "commentStamp" : "SvenVanCaekenberghe 7/15/2021 11:57", + "commentStamp" : "", "super" : "Object", "category" : "Zinc-HTTP-Streaming", "classinstvars" : [ ], From 086af05bd6b9d5c498ad18302af9b2d733e5ad7c Mon Sep 17 00:00:00 2001 From: Christophe Demarey Date: Tue, 15 Feb 2022 14:56:59 +0100 Subject: [PATCH 16/30] add encoding-specific error message --- .../ZnUTF16Encoder.class/instance/errorIncomplete.st | 3 +++ .../ZnUTF32Encoder.class/instance/errorIncomplete.st | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/instance/errorIncomplete.st create mode 100644 repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/instance/errorIncomplete.st diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/instance/errorIncomplete.st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/instance/errorIncomplete.st new file mode 100644 index 00000000..2ad4776c --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF16Encoder.class/instance/errorIncomplete.st @@ -0,0 +1,3 @@ +error handling +errorIncomplete + self error: 'Incomplete utf-16 encoding' \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/instance/errorIncomplete.st b/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/instance/errorIncomplete.st new file mode 100644 index 00000000..85b617cd --- /dev/null +++ b/repository/Zinc-Character-Encoding-Core.package/ZnUTF32Encoder.class/instance/errorIncomplete.st @@ -0,0 +1,3 @@ +error handling +errorIncomplete + self error: 'Incomplete utf-32 encoding' \ No newline at end of file From 06c36a10737b8599d9a7e43233415e63170ce30a Mon Sep 17 00:00:00 2001 From: Christophe Demarey Date: Tue, 15 Feb 2022 14:58:44 +0100 Subject: [PATCH 17/30] do not shadow i.v. --- .../instance/readInto.startingAt.count..st | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/readInto.startingAt.count..st b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/readInto.startingAt.count..st index a48e9632..c375e8c8 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/readInto.startingAt.count..st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnPositionableReadStream.class/instance/readInto.startingAt.count..st @@ -3,7 +3,7 @@ readInto: collection startingAt: offset count: requestedCount "Read requestedCount elements into collection starting at offset, returning the number of elements read, there could be less elements available." - 0 to: requestedCount - 1 do: [ :count | | object | - (object := self next) ifNil: [ ^ count ]. - collection at: offset + count put: object ]. + 0 to: requestedCount - 1 do: [ :aCount | | object | + (object := self next) ifNil: [ ^ aCount ]. + collection at: offset + aCount put: object ]. ^ requestedCount \ No newline at end of file From 2301f74c50739e9e04676ed92941cff018c3b541 Mon Sep 17 00:00:00 2001 From: Christophe Demarey Date: Tue, 15 Feb 2022 15:02:23 +0100 Subject: [PATCH 18/30] avoid references to Transcript --- .../ZnLogEvent.class/class/logToTranscript.st | 2 +- .../ZnMessage.class/instance/writeToTranscript.st | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/repository/Zinc-HTTP.package/ZnLogEvent.class/class/logToTranscript.st b/repository/Zinc-HTTP.package/ZnLogEvent.class/class/logToTranscript.st index bb817142..29bf870f 100644 --- a/repository/Zinc-HTTP.package/ZnLogEvent.class/class/logToTranscript.st +++ b/repository/Zinc-HTTP.package/ZnLogEvent.class/class/logToTranscript.st @@ -1,4 +1,4 @@ convenience logToTranscript self stopLoggingToTranscript. - ^ self announcer when: ZnLogEvent do: [ :event | Transcript crShow: event ]. \ No newline at end of file + ^ self announcer when: ZnLogEvent do: [ :event | self crTrace: event ]. \ No newline at end of file diff --git a/repository/Zinc-HTTP.package/ZnMessage.class/instance/writeToTranscript.st b/repository/Zinc-HTTP.package/ZnMessage.class/instance/writeToTranscript.st index 47e55be0..fc98f92e 100644 --- a/repository/Zinc-HTTP.package/ZnMessage.class/instance/writeToTranscript.st +++ b/repository/Zinc-HTTP.package/ZnMessage.class/instance/writeToTranscript.st @@ -2,6 +2,6 @@ writing writeToTranscript "Write the receiver on the Transcript like when sent or received over the network. Useful for debugging, obviously" - - self writeOn: Transcript. - Transcript flush \ No newline at end of file + + self + trace: (String streamContents: [ :stream | self writeOn: stream ]) \ No newline at end of file From fd9872770b53ceb770ab49ae494d908711a296ad Mon Sep 17 00:00:00 2001 From: Christophe Demarey Date: Tue, 15 Feb 2022 15:11:42 +0100 Subject: [PATCH 19/30] use environment instead of Smalltalk global --- .../ZnDigestAuthenticator.class/class/md5Hash..st | 9 +++++---- .../ZnClientTest.class/instance/testGetGeoIP.st | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/repository/Zinc-HTTP.package/ZnDigestAuthenticator.class/class/md5Hash..st b/repository/Zinc-HTTP.package/ZnDigestAuthenticator.class/class/md5Hash..st index 52f31f25..448fedb7 100644 --- a/repository/Zinc-HTTP.package/ZnDigestAuthenticator.class/class/md5Hash..st +++ b/repository/Zinc-HTTP.package/ZnDigestAuthenticator.class/class/md5Hash..st @@ -1,13 +1,14 @@ accessing md5Hash: aString - | hash | + | hash env| + env := self environment. "Answer hash of aString as lowercase 32 digit hex String." - Smalltalk at: #MD5 ifPresent: [ :cls | + env at: #MD5 ifPresent: [ :cls | ^ ((cls new initialize) hashStream: (aString asByteArray readStream)) hex ]. - hash := Smalltalk at: #CMD5Hasher ifPresent: [ :cls | + hash := env at: #CMD5Hasher ifPresent: [ :cls | cls hashMessage: aString ]. hash ifNil: [ - hash := Smalltalk at: #TCryptoRandom ifPresent: [ :cls | + hash := env at: #TCryptoRandom ifPresent: [ :cls | (cls basicNew perform: #md5HashMessage: with: aString) asInteger ] ]. hash ifNotNil: [ hash := hash hex asLowercase. diff --git a/repository/Zinc-Tests.package/ZnClientTest.class/instance/testGetGeoIP.st b/repository/Zinc-Tests.package/ZnClientTest.class/instance/testGetGeoIP.st index 7a6feb42..72c92031 100644 --- a/repository/Zinc-Tests.package/ZnClientTest.class/instance/testGetGeoIP.st +++ b/repository/Zinc-Tests.package/ZnClientTest.class/instance/testGetGeoIP.st @@ -7,7 +7,7 @@ testGetGeoIP queryAt: 'address' put: '81.83.7.35'; accept: ZnMimeType applicationJson; contentReader: [ :entity | - Smalltalk globals + self class environment at: #NeoJSONReader ifPresent: [ :parserClass | parserClass fromString: entity contents ] ifAbsent: [ ^ self ] ]; From f5089b7b4398718ea0a2a1b37de2dcb46b74ba1c Mon Sep 17 00:00:00 2001 From: Christophe Demarey Date: Tue, 15 Feb 2022 15:59:52 +0100 Subject: [PATCH 20/30] remove unused inst. var. --- .../ZnStaticFileDecoratorDelegate.class/properties.json | 1 - 1 file changed, 1 deletion(-) diff --git a/repository/Zinc-HTTP-Examples.package/ZnStaticFileDecoratorDelegate.class/properties.json b/repository/Zinc-HTTP-Examples.package/ZnStaticFileDecoratorDelegate.class/properties.json index f51e257c..50420f57 100644 --- a/repository/Zinc-HTTP-Examples.package/ZnStaticFileDecoratorDelegate.class/properties.json +++ b/repository/Zinc-HTTP-Examples.package/ZnStaticFileDecoratorDelegate.class/properties.json @@ -7,7 +7,6 @@ "classvars" : [ ], "instvars" : [ "delegate", - "path", "staticDelegate" ], "name" : "ZnStaticFileDecoratorDelegate", From ca3f04685001f52071670e9293aadbb1188d2f61 Mon Sep 17 00:00:00 2001 From: Christophe Demarey Date: Tue, 15 Feb 2022 16:12:40 +0100 Subject: [PATCH 21/30] update exception to avoid undeclared --- .../ZnFileSystemUtils.class/class/readStreamFor.do..st | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repository/Zinc-HTTP.package/ZnFileSystemUtils.class/class/readStreamFor.do..st b/repository/Zinc-HTTP.package/ZnFileSystemUtils.class/class/readStreamFor.do..st index e39d6b99..3c194a69 100644 --- a/repository/Zinc-HTTP.package/ZnFileSystemUtils.class/class/readStreamFor.do..st +++ b/repository/Zinc-HTTP.package/ZnFileSystemUtils.class/class/readStreamFor.do..st @@ -2,4 +2,4 @@ streams readStreamFor: fileName do: block ^ fileName asFileReference readStreamDo: block - ifAbsent: [ FileDoesNotExist signalWith: fileName asFileReference ] \ No newline at end of file + ifAbsent: [ FileDoesNotExistException signalWith: fileName asFileReference ] \ No newline at end of file From a11e788a40038dca63794243bc2267ddb9b33265 Mon Sep 17 00:00:00 2001 From: Christophe Demarey Date: Tue, 15 Feb 2022 16:02:52 +0100 Subject: [PATCH 22/30] call super tearDown at last --- .../ZnKeyValueStoreTest.class/instance/tearDown.st | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repository/Zinc-HTTP-Examples.package/ZnKeyValueStoreTest.class/instance/tearDown.st b/repository/Zinc-HTTP-Examples.package/ZnKeyValueStoreTest.class/instance/tearDown.st index d5726ba9..391f72d3 100644 --- a/repository/Zinc-HTTP-Examples.package/ZnKeyValueStoreTest.class/instance/tearDown.st +++ b/repository/Zinc-HTTP-Examples.package/ZnKeyValueStoreTest.class/instance/tearDown.st @@ -1,5 +1,5 @@ running tearDown - super tearDown. server stop. - client close \ No newline at end of file + client close. + super tearDown. From de00b7c34543763868d0eb7f4d018b9a0e39568c Mon Sep 17 00:00:00 2001 From: Christophe Demarey Date: Tue, 15 Feb 2022 16:04:36 +0100 Subject: [PATCH 23/30] remove useless method --- .../ZnCRLFReadStream.class/instance/initialize.st | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/instance/initialize.st diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/instance/initialize.st b/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/instance/initialize.st deleted file mode 100644 index d8693b7f..00000000 --- a/repository/Zinc-Character-Encoding-Core.package/ZnCRLFReadStream.class/instance/initialize.st +++ /dev/null @@ -1,5 +0,0 @@ -accessing -initialize - - super initialize. - next := nil. \ No newline at end of file From 01149618095ce68e7cd42cbcd6c0a8974dd974b5 Mon Sep 17 00:00:00 2001 From: Christophe Demarey Date: Tue, 15 Feb 2022 17:35:12 +0100 Subject: [PATCH 24/30] set buffer position when calling #setToEnd. See https://github.com/pharo-project/pharo/commit/68bf5c01a909b6780ee51bbb833dbf663bc22e20 --- .../ZnBufferedReadStream.class/instance/setToEnd.st | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/setToEnd.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/setToEnd.st index d26bd545..8c8d747c 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/setToEnd.st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/setToEnd.st @@ -1,4 +1,4 @@ accessing setToEnd - stream setToEnd \ No newline at end of file + self position: stream size \ No newline at end of file From 20694d746e491bbedb557e14ea3a6f7d0f755a62 Mon Sep 17 00:00:00 2001 From: Christophe Demarey Date: Wed, 16 Feb 2022 08:43:47 +0100 Subject: [PATCH 25/30] add #testSetToEnd --- .../instance/testSetToEnd.st | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTest.class/instance/testSetToEnd.st diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTest.class/instance/testSetToEnd.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTest.class/instance/testSetToEnd.st new file mode 100644 index 00000000..ec3e7959 --- /dev/null +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTest.class/instance/testSetToEnd.st @@ -0,0 +1,17 @@ +tests +testSetToEnd + | stream source | + source := '0123456789'. + stream := ZnBufferedReadStream on: source readStream. + stream sizeBuffer: source size. + + "Call setToEnd on new stream" + self assert: stream position equals: 0. + stream setToEnd. + self assert: stream position equals: source size. + + "Call setToEnd without after reading some elements" + stream position: 2. + self assert: (stream next: 4) equals: '2345'. + stream setToEnd. + self assert: stream position equals: source size. \ No newline at end of file From fdb75a4c61169fd998abd9718e6eef6b94b55d6a Mon Sep 17 00:00:00 2001 From: Christophe Demarey Date: Thu, 17 Feb 2022 11:31:25 +0100 Subject: [PATCH 26/30] avoid strong reference to Graphics-Files package --- .../ZnEasy.class/class/getImageOfType.fromUrl..st | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repository/Zinc-HTTP.package/ZnEasy.class/class/getImageOfType.fromUrl..st b/repository/Zinc-HTTP.package/ZnEasy.class/class/getImageOfType.fromUrl..st index 981badfb..7db39e69 100644 --- a/repository/Zinc-HTTP.package/ZnEasy.class/class/getImageOfType.fromUrl..st +++ b/repository/Zinc-HTTP.package/ZnEasy.class/class/getImageOfType.fromUrl..st @@ -8,4 +8,4 @@ getImageOfType: mimeType fromUrl: urlObject enforceAcceptContentType: true; get. "ImageReadWriter does automatic type detection" - ^ ImageReadWriter formFromStream: client entity readStream \ No newline at end of file + ^ (self environment at: #ImageReadWriter) formFromStream: client entity readStream \ No newline at end of file From c6f2f6174a3b0764987363d76a82165864ed8168 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Thu, 24 Feb 2022 14:17:46 +0100 Subject: [PATCH 27/30] Run ZnServerTest>>#testTooManyConcurrentConnections under #usingClassicSocketStreamsOnWindowsDo: --- .../testTooManyConcurrentConnections.st | 47 ++++++++++--------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/repository/Zinc-Tests.package/ZnServerTest.class/instance/testTooManyConcurrentConnections.st b/repository/Zinc-Tests.package/ZnServerTest.class/instance/testTooManyConcurrentConnections.st index dbac9b40..48b8bbb7 100644 --- a/repository/Zinc-Tests.package/ZnServerTest.class/instance/testTooManyConcurrentConnections.st +++ b/repository/Zinc-Tests.package/ZnServerTest.class/instance/testTooManyConcurrentConnections.st @@ -1,25 +1,26 @@ testing testTooManyConcurrentConnections - self withServerDo: [ :server | | client clients | - self deny: server debugMode. - server maximumNumberOfConcurrentConnections: 4. - clients := (1 to: 4) collect: [ :each | - ZnClient new - url: server localUrl; - addPathSegment: #random; - clientId: ('client-{1}' format: { each }); - enforceHttpSuccess; - get; - yourself ]. - client := ZnClient new - url: server localUrl; - addPathSegment: #random; - clientId: 'client-5'; - get; - yourself. - self assert: client response code equals: 503. - clients do: [ :each | - each get; close ]. - client get. - self assert: client isSuccess. - client close ] \ No newline at end of file + self usingClassicSocketStreamsOnWindowsDo: [ + self withServerDo: [ :server | | client clients | + self deny: server debugMode. + server maximumNumberOfConcurrentConnections: 4. + clients := (1 to: 4) collect: [ :each | + ZnClient new + url: server localUrl; + addPathSegment: #random; + clientId: ('client-{1}' format: { each }); + enforceHttpSuccess; + get; + yourself ]. + client := ZnClient new + url: server localUrl; + addPathSegment: #random; + clientId: 'client-5'; + get; + yourself. + self assert: client response code equals: 503. + clients do: [ :each | + each get; close ]. + client get. + self assert: client isSuccess. + client close ] ] \ No newline at end of file From 66612d464b73f3537badb7e4d178672888ced3a1 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Sun, 20 Mar 2022 14:14:30 +0100 Subject: [PATCH 28/30] Fix an edge case bug with ZnBufferedReadStream>>#upToEnd (reading from an empty stream returned nil instead of an empty collection). Thx to Johan Brichau for reporting this issue and suggesting a fix. Extend ZnBufferedReadStreamTest>>#testUpToEnd to cover this edge case. --- .../instance/upToEnd.st | 31 +++++++++---------- .../properties.json | 2 +- .../instance/testReadUpToEnd.st | 5 ++- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/upToEnd.st b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/upToEnd.st index 3a5db5cc..a0566f72 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/upToEnd.st +++ b/repository/Zinc-Character-Encoding-Core.package/ZnBufferedReadStream.class/instance/upToEnd.st @@ -3,23 +3,20 @@ upToEnd "Read elements until the stream is atEnd and return them as a collection." | streamSize result remaining | - "If the stream knows its size we can reduce overhead by allocating a buffer of the correct size. If the size is an over-estimate, #next: will copy the results in to a buffer of the correct size." - streamSize := [ self size ] - on: Error - do: [ 0 ]. - streamSize > 0 ifTrue: - [ result := self next: (streamSize - self position) ]. + streamSize := [ self size ] on: Error do: [ 0 ]. + result := streamSize > 0 + ifTrue: [ self next: (streamSize - self position) ] + ifFalse: [ self collectionSpecies new ]. "If the size is an under-estimate we're not at the end, get the rest and append to the result" - self atEnd ifFalse: - [ remaining := self collectionSpecies streamContents: [ :out | - [ self atEnd ] whileFalse: [ - position > limit - ifTrue: [ self nextBuffer ]. - out next: limit - position + 1 putAll: buffer startingAt: position. - position := limit + 1 ] ]. - result := result - ifNil: [ remaining ] - ifNotNil: [ result, remaining ] ]. - ^result \ No newline at end of file + ^ self atEnd + ifTrue: [ result ] + ifFalse: [ + remaining := self collectionSpecies streamContents: [ :out | + [ self atEnd ] whileFalse: [ + position > limit + ifTrue: [ self nextBuffer ]. + out next: limit - position + 1 putAll: buffer startingAt: position. + position := limit + 1 ] ]. + result := result , remaining ] \ No newline at end of file diff --git a/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/properties.json b/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/properties.json index 64e62d13..f7cc7645 100644 --- a/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/properties.json +++ b/repository/Zinc-Character-Encoding-Core.package/ZnNewLineWriterStream.class/properties.json @@ -1,5 +1,5 @@ { - "commentStamp" : "", + "commentStamp" : "SvenVanCaekenberghe 11/7/2018 13:55", "super" : "WriteStream", "category" : "Zinc-Character-Encoding-Core", "classinstvars" : [ ], diff --git a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTest.class/instance/testReadUpToEnd.st b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTest.class/instance/testReadUpToEnd.st index a8a07d6e..d9d87e57 100644 --- a/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTest.class/instance/testReadUpToEnd.st +++ b/repository/Zinc-Character-Encoding-Tests.package/ZnBufferedReadStreamTest.class/instance/testReadUpToEnd.st @@ -5,4 +5,7 @@ testReadUpToEnd stream sizeBuffer: 4. stream next: 2. self assert: stream upToEnd equals: '23456789'. - self assert: stream atEnd \ No newline at end of file + self assert: stream atEnd. + stream := ZnBufferedReadStream on: #[] readStream. + self assert: stream upToEnd equals: #[]. + self assert: stream atEnd. \ No newline at end of file From 8042884dea032b9250f18506fcdce3f029cc6e74 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Tue, 22 Mar 2022 10:04:06 +0100 Subject: [PATCH 29/30] Recategorise ZnStaticFileDecoratorDelegate>>#path: (typo) --- .../ZnStaticFileDecoratorDelegate.class/instance/path..st | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repository/Zinc-HTTP-Examples.package/ZnStaticFileDecoratorDelegate.class/instance/path..st b/repository/Zinc-HTTP-Examples.package/ZnStaticFileDecoratorDelegate.class/instance/path..st index d841858c..8c11590c 100644 --- a/repository/Zinc-HTTP-Examples.package/ZnStaticFileDecoratorDelegate.class/instance/path..st +++ b/repository/Zinc-HTTP-Examples.package/ZnStaticFileDecoratorDelegate.class/instance/path..st @@ -1,4 +1,4 @@ -accesing +accessing path: aString staticDelegate := ZnStaticFileServerDelegate new directory: aString asFileReference \ No newline at end of file From 0826e662ba4cddc074c1d19af8b076a14cc70b47 Mon Sep 17 00:00:00 2001 From: Torsten Bergmann Date: Tue, 22 Mar 2022 11:26:32 +0100 Subject: [PATCH 30/30] Fix some accessing categories, see https://github.com/pharo-project/pharo/issues/11027 --- .../ZnClient.class/instance/setBearerAuthentication..st | 4 ++-- .../ZnUrl.class/instance/path.st | 4 ++-- .../ZnUrl.class/instance/queryAt.add..st | 4 ++-- .../ZnUrl.class/instance/queryAt.put..st | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/repository/Zinc-HTTP.package/ZnClient.class/instance/setBearerAuthentication..st b/repository/Zinc-HTTP.package/ZnClient.class/instance/setBearerAuthentication..st index a56842b3..93335fd0 100644 --- a/repository/Zinc-HTTP.package/ZnClient.class/instance/setBearerAuthentication..st +++ b/repository/Zinc-HTTP.package/ZnClient.class/instance/setBearerAuthentication..st @@ -1,5 +1,5 @@ -accessing request +accessing - request setBearerAuthentication: token "Set the bearer token for authentication (e.g. OAuth 2.0) for the current request." - self request setBearerAuthentication: token \ No newline at end of file + self request setBearerAuthentication: token diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/path.st b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/path.st index df28397f..854b0d82 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/path.st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/path.st @@ -1,4 +1,4 @@ -accessing-path +accessing - path path self hasPath ifFalse: [ ^ String new ]. @@ -7,4 +7,4 @@ path do: [ :each | each = $/ ifFalse: [ stream nextPutAll: each ] ] - separatedBy: [ stream nextPut: $/ ] ] \ No newline at end of file + separatedBy: [ stream nextPut: $/ ] ] diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/queryAt.add..st b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/queryAt.add..st index 72e53dfa..ee452f83 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/queryAt.add..st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/queryAt.add..st @@ -1,7 +1,7 @@ -accessing-query +accessing - query queryAt: key add: value "Modify the receiver by adding a query variable key=value. If key already exists, value is added to it." query ifNil: [ query := ZnMultiValueDictionary new ]. - query at: key asString add: (value ifNotNil: [ value asString ]) \ No newline at end of file + query at: key asString add: (value ifNotNil: [ value asString ]) diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/queryAt.put..st b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/queryAt.put..st index 8a320ebd..d927a367 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/queryAt.put..st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/queryAt.put..st @@ -1,7 +1,7 @@ -accessing-query +accessing - query queryAt: key put: value "Modify the receiver by setting a query variable key=value. If key is already exists, it is overwritten." query ifNil: [ query := ZnMultiValueDictionary new ]. - query at: key asString put: (value ifNotNil: [ value asString ]) \ No newline at end of file + query at: key asString put: (value ifNotNil: [ value asString ])