Skip to content

Commit 452f043

Browse files
committed
Merge pull request #66 from GsDevKit/issue_58
release v2.4.3.1
2 parents 94e3743 + f436c90 commit 452f043

File tree

469 files changed

+3404
-823
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

469 files changed

+3404
-823
lines changed

.travis.yml

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
language: erlang
22

3+
notifications:
4+
webhooks:
5+
urls:
6+
- https://webhooks.gitter.im/e/c59e6bffa0b41a693676 # GsDevKit/chat (public)
7+
on_success: always # options: [always|never|change] default: always
8+
on_failure: always # options: [always|never|change] default: always
9+
on_start: false # default: false
10+
311
env:
412
- ST=GemStone-2.4.4.1
513
# - ST=GemStone-2.4.4.7

repository/BaselineOfZincHTTPComponents.package/BaselineOfZincHTTPComponents.class/instance/baseline..st

+14-8
Original file line numberDiff line numberDiff line change
@@ -121,22 +121,27 @@ baseline: spec
121121
configuration: 'GsPharo'
122122
with: [
123123
spec
124-
version: '0.9.2';
124+
version: '0.9.3';
125125
repository: 'http://seaside.gemtalksystems.com/ss/PharoCompat' ];
126-
configuration: 'Cryptography'
126+
baseline: 'Cryptography'
127127
with: [
128128
spec
129-
versionString: #'stable';
130-
repository: 'http://seaside.gemtalksystems.com/ss/Cryptography' ];
131-
baseline: 'NeoJSON'
129+
loads: #('Cryptography');
130+
repository: 'github://GsDevKit/Cryptography:master/repository' ];
131+
baseline: 'GsApplicationTools'
132132
with: [
133133
spec
134-
loads: 'Core';
135-
repository: 'github://GsDevKit/NeoJSON:master/repository' ];
134+
loads: #('Core');
135+
repository:
136+
'github://GsDevKit/gsApplicationTools:v1.?/repository' ];
137+
baseline: 'NeoJSON'
138+
with: [ spec repository: 'github://GsDevKit/NeoJSON:gs_master/repository' ];
136139
yourself.
137140
spec
138141
package: 'SocketStream';
139142
package: 'Zinc-FileSystem-Legacy' with: [ spec requires: #('GLASS1') ];
143+
package: 'Zinc-GemStone-Server-Tools'
144+
with: [ spec requires: #('GsApplicationTools') ];
140145
package: 'Zinc-WebSocket-Core'
141146
with: [ spec requires: #('Zinc-HTTP' 'Cryptography') ];
142147
package: 'Zinc-HTTP'
@@ -146,7 +151,8 @@ baseline: spec
146151
includes: #('SocketStream') ];
147152
package: 'Zinc-Tests' with: [ spec requires: #('GsPharo') ].
148153
spec
149-
group: 'CI' with: #('REST');
154+
group: 'Core' with: #('Zinc-GemStone-Server-Tools');
155+
group: 'CI' with: #('REST' 'WebSocket');
150156
yourself ].
151157
spec
152158
for: #'gs2.x'

repository/BaselineOfZincHTTPComponents.package/BaselineOfZincHTTPComponents.class/methodProperties.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"class" : {
33
},
44
"instance" : {
5-
"baseline:" : "dkh 11/17/2014 18:15" } }
5+
"baseline:" : "dkh 01/12/2015 10:56" } }

repository/BaselineOfZincHTTPComponents.package/monticello.meta/version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
(name 'BaselineOfZincHTTPComponents-dkh.10' message 'Issue #58: pull WebSockt from CI group ... interested in seeing how things are for NeoJSON and and zinc core' id '3b28664e-1ba7-4d76-aff5-e5c89eb2236b' date '11/17/2014' time '18:16:16' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.9' message 'Issue #60: reference GsDevKit/NeoJSON directory and only load Core, since NeoJSON tests are known not to pass: https://github.com/GsDevKit/NeoJSON/issues/3' id '73c88fdd-cbe7-4a5c-8485-923f314c6c44' date '11/17/2014' time '18:14:59' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.8' message 'Issue #58: re-enable websocket as part of CI ... this will take longer to get straightened out as both NeoJSON and WebSockets have issues' id '342aa976-a532-4d8b-a428-6e7cb9111a41' date '11/17/2014' time '18:03:43' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.7' message 'Issue #58: disable web-socket test load for ''CI'' until Cryptography load issue resolvedIssue #60: fix NeoJSON specification and add ''REST'' to ''CI'' group ... defer reference to GsDevKit/NeoJSON project until travis tests have been enabled ...' id 'fec29f56-7062-41a6-85d2-9d7a439559e4' date '11/17/2014' time '16:33:26' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.6' message 'Issue #58: cryptography configuration needed updating, so added stable version while I was at it ...' id '00296be5-2d30-418d-a474-2f373393e313' date '11/01/2014' time '13:00:26' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.5' message 'Issue #58: no stable version defined in the current Cryptography configuration...' id '67a67e96-6cf9-4c32-a87a-9e3d8bc3d647' date '11/01/2014' time '12:46:46' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.4' message 'Issue #58: create CI group to specifiy packages to be loaded by travis-ci for testing ... for GemStone that includes Zinc-WebSocket-Tests ... expect failures since Cryptography project is not up to snuff...yet' id '15af9af6-9829-412c-be6b-70cdc7fda24a' date '11/01/2014' time '12:28:52' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.3' message 'Issue #55: bump mcz version of the gs_master branch BaselineOfZincHTTPComponents, to avoid duplice mcz versions' id 'e175a78c-9a07-4da1-97a2-96eb0d40ba96' date '10/27/2014' time '15:10:49' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.2' message 'restore Zodiac packages and groups to configuration ... not ported to GemStone yet, see Issue #55 for details' id '6311a4fb-03de-42dc-81c7-b96971d30368' date '10/15/2014' time '11:55:57' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-JohanBrichau.1' message 'renamed BaselineOfZinc to BaselineOfZincHTTPComponents' id 'e022a66b-5bb4-47eb-b582-74a3ebaa1f9e' date '07/09/2014' time '21:16:19' author 'JohanBrichau' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())
1+
(name 'BaselineOfZincHTTPComponents-dkh.19' message 'Issue #69: fix mistake in tag spec for baseline ... start adding support for Rest transactional example' id 'b8134660-25eb-46d5-9cbb-b4c4fe2b21d7' date '01/12/2015' time '10:58:15' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.18' message 'Issue #58: change GsApplicationTools project reference back to: gsApplicationTools:v.1.?' id 'f297e739-5425-4c6e-8262-3039ca36e341' date '01/07/2015' time '16:20:29' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.17' message 'Issue #58: use dev branch for GsApplicationTools' id '72892950-b7c5-4a4c-b40a-5cfd0b98688a' date '01/06/2015' time '15:14:41' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.16' message 'Issue #58: mods to be minimally compatible with GsApplicationTools v1.0.0' id '34566c61-ca88-4eaf-b4ad-2149de6755fe' date '01/06/2015' time '11:59:55' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.15' message 'Issue #58: ZnSingleThreadedServer>>handleRequestProtected: don''t pass the exception ... debugMode doesn''t quite appy to GemStone ... need different granularity I think ... GsPharo 0.9.2 needs to be used' id '6f7305be-3dbd-40f9-a81f-3f920132534e' date '12/02/2014' time '16:29:14' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.14' message 'Issue #58: add dependency upon GsApplicationTools for Zinc-GemStone-Server-Tools, a new package which holds ZnServerStarter class needed by web socket tests ...' id 'e09422d2-1065-4ceb-8845-084f10a4c4f7' date '11/26/2014' time '13:39:44' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.13' message 'NeoJSON is on gs_master branch now' id 'f6fdee09-f8c6-4738-907c-215a6eae7bcf' date '11/22/2014' time '12:39:05' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.12' message 'Issue #58: load NeoJSON tests now ... they should be passing?' id '71ee4921-b3f1-4550-bec2-277fe6363086' date '11/20/2014' time '17:43:32' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.11' message 'Issue #58: switch Cryptography project to use GsDevKit/Cryptography project and add backin into CI group, since the project should now load without errors' id '7602ba2b-54cc-45de-a7ad-567191c9b1c5' date '11/18/2014' time '12:09:24' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.10' message 'Issue #58: pull WebSockt from CI group ... interested in seeing how things are for NeoJSON and and zinc core' id '3b28664e-1ba7-4d76-aff5-e5c89eb2236b' date '11/17/2014' time '18:16:16' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.9' message 'Issue #60: reference GsDevKit/NeoJSON directory and only load Core, since NeoJSON tests are known not to pass: https://github.com/GsDevKit/NeoJSON/issues/3' id '73c88fdd-cbe7-4a5c-8485-923f314c6c44' date '11/17/2014' time '18:14:59' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.8' message 'Issue #58: re-enable websocket as part of CI ... this will take longer to get straightened out as both NeoJSON and WebSockets have issues' id '342aa976-a532-4d8b-a428-6e7cb9111a41' date '11/17/2014' time '18:03:43' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.7' message 'Issue #58: disable web-socket test load for ''CI'' until Cryptography load issue resolvedIssue #60: fix NeoJSON specification and add ''REST'' to ''CI'' group ... defer reference to GsDevKit/NeoJSON project until travis tests have been enabled ...' id 'fec29f56-7062-41a6-85d2-9d7a439559e4' date '11/17/2014' time '16:33:26' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.6' message 'Issue #58: cryptography configuration needed updating, so added stable version while I was at it ...' id '00296be5-2d30-418d-a474-2f373393e313' date '11/01/2014' time '13:00:26' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.5' message 'Issue #58: no stable version defined in the current Cryptography configuration...' id '67a67e96-6cf9-4c32-a87a-9e3d8bc3d647' date '11/01/2014' time '12:46:46' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.4' message 'Issue #58: create CI group to specifiy packages to be loaded by travis-ci for testing ... for GemStone that includes Zinc-WebSocket-Tests ... expect failures since Cryptography project is not up to snuff...yet' id '15af9af6-9829-412c-be6b-70cdc7fda24a' date '11/01/2014' time '12:28:52' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.3' message 'Issue #55: bump mcz version of the gs_master branch BaselineOfZincHTTPComponents, to avoid duplice mcz versions' id 'e175a78c-9a07-4da1-97a2-96eb0d40ba96' date '10/27/2014' time '15:10:49' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-dkh.2' message 'restore Zodiac packages and groups to configuration ... not ported to GemStone yet, see Issue #55 for details' id '6311a4fb-03de-42dc-81c7-b96971d30368' date '10/15/2014' time '11:55:57' author 'dkh' ancestors ((name 'BaselineOfZincHTTPComponents-JohanBrichau.1' message 'renamed BaselineOfZinc to BaselineOfZincHTTPComponents' id 'e022a66b-5bb4-47eb-b582-74a3ebaa1f9e' date '07/09/2014' time '21:16:19' author 'JohanBrichau' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
as yet unclassified
2+
openConnectionToHost: host port: portNumber timeout: timeoutSeconds
3+
| socket |
4+
socket := SocketStreamSocket newTCPSocket.
5+
socket connectTo: host port: portNumber timeout: timeoutSeconds.
6+
^ (self on: socket)
7+
timeout: timeoutSeconds;
8+
yourself
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
as yet unclassified
22
close
3-
"Flush any data still not sent
3+
"Flush any data still not sent
44
and take care of the socket."
55

6-
self flush.
7-
socket close.
8-
self destroy.
6+
[ self flush ]
7+
ensure: [
8+
self socket close.
9+
self destroy ]
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
as yet unclassified
22
destroy
3-
"Destroy the receiver and its underlying socket. Does not attempt to flush the output buffers. For a graceful close use SocketStream>>close instead."
4-
socket ifNotNil: [socket close]
3+
"Destroy the receiver and its underlying socket. Does not attempt to flush the output buffers. For a graceful close use SocketStream>>close instead."
4+
5+
socket ifNotNil: [ self socket close ]
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
as yet unclassified
22
flush
3-
"If the other end is connected and we have something
3+
"If the other end is connected and we have something
44
to send, then we send it and reset the outBuffer."
55

6-
((outNextToWrite > 1) and: [socket isActive])
7-
ifTrue: [
8-
[socket sendData: outBuffer count: outNextToWrite - 1]
9-
on: ConnectionTimedOut
10-
do: [:ex | shouldSignal ifFalse: ["swallow"]].
11-
outNextToWrite := 1]
6+
(outNextToWrite > 1 and: [ self socket isActive ])
7+
ifTrue: [
8+
[ self socket sendData: outBuffer count: outNextToWrite - 1 ]
9+
on: ConnectionTimedOut
10+
do: [ :ex |
11+
shouldSignal
12+
ifFalse: [
13+
"swallow"
14+
] ].
15+
outNextToWrite := 1 ]
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
as yet unclassified
22
flushComet
3-
"Flushes the receiver and answer if the socket is still in a valid state and both ends are properly connected. Free the socket, as a side-effect if there is a problem."
4-
5-
| result |
6-
result := [ self flush. true ]
7-
on: NetworkError
8-
do: [ :err | false ].
9-
result := result and: [ self isConnected and: [ self isOtherEndConnected ] ].
10-
result ifFalse: [ socket destroy ].
11-
^ result
3+
"Flushes the receiver and answer if the socket is still in a valid state and both ends are properly connected. Free the socket, as a side-effect if there is a problem."
4+
5+
| result |
6+
result := [
7+
self flush.
8+
true ]
9+
on: NetworkError
10+
do: [ :err | false ].
11+
result := result and: [ self isConnected and: [ self isOtherEndConnected ] ].
12+
result
13+
ifFalse: [ self socket destroy ].
14+
^ result
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
as yet unclassified
22
isConnected
3-
"The stream is connected if the socket is."
3+
"The stream is connected if the socket is."
44

5-
^socket isConnected
5+
^ self socket isConnected
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
as yet unclassified
22
isDataAvailable
3-
"It the inbuffer is empty, we check the socket for data.
3+
"It the inbuffer is empty, we check the socket for data.
44
If it claims to have data available to read, we try to read
55
some once and recursively call this method again.
66
If something really was available it is now in the inBuffer.
77
This is because there has been spurious
88
dataAvailable when there really is no data to get."
9-
10-
self isInBufferEmpty ifFalse: [^true].
11-
^socket dataAvailable
12-
ifFalse: [false]
13-
ifTrue: [self receiveDataIfAvailable; isDataAvailable]
9+
10+
self isInBufferEmpty
11+
ifFalse: [ ^ true ].
12+
^ self socket dataAvailable
13+
ifFalse: [ false ]
14+
ifTrue: [
15+
self
16+
receiveDataIfAvailable;
17+
isDataAvailable ]
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
as yet unclassified
22
isOtherEndConnected
3-
^socket isConnected
3+
^ self socket isConnected
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
11
as yet unclassified
22
nextPutAllFlush: aCollection
3-
"Put a String or a ByteArray onto the stream.
3+
"Put a String or a ByteArray onto the stream.
44
You can use this if you have very large data - it avoids
55
copying into the buffer (and avoids buffer growing)
66
and also flushes any other pending data first."
77

8-
| toPut |
9-
toPut := binary ifTrue: [aCollection asByteArray] ifFalse: [aCollection asString].
10-
self flush. "first flush pending stuff, then directly send"
11-
socket isConnected ifTrue: [
12-
[socket sendData: toPut count: toPut size]
13-
on: ConnectionTimedOut
14-
do: [:ex | shouldSignal ifFalse: ["swallow"]]]
8+
| toPut |
9+
toPut := binary
10+
ifTrue: [ aCollection asByteArray ]
11+
ifFalse: [ aCollection asString ].
12+
self flush. "first flush pending stuff, then directly send"
13+
self socket isConnected
14+
ifTrue: [
15+
[ self socket sendData: toPut count: toPut size ]
16+
on: ConnectionTimedOut
17+
do: [ :ex |
18+
shouldSignal
19+
ifFalse: [
20+
"swallow"
21+
] ] ]
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
as yet unclassified
22
receiveAvailableData
3-
"Receive available data (as much as fits in the inBuffer)
3+
"Receive available data (as much as fits in the inBuffer)
44
but not waiting for more to arrive.
55
Return the position in the buffer where the
66
new data starts, regardless if anything
77
was read, see #adjustInBuffer."
8-
9-
recentlyRead := socket receiveAvailableDataInto: inBuffer startingAt: inNextToWrite.
10-
^self adjustInBuffer: recentlyRead
8+
9+
recentlyRead := self socket
10+
receiveAvailableDataInto: inBuffer
11+
startingAt: inNextToWrite.
12+
^ self adjustInBuffer: recentlyRead
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,31 @@
11
as yet unclassified
22
receiveData
3-
"Receive data with timeout if it has been set.
3+
"Receive data with timeout if it has been set.
44
If shouldSignal is false we use the Socket methods
55
that swallow those Exceptions, if it is true the
66
caller will have to handle those Exceptions.
77
Return the position in the buffer where the
88
new data starts, regardless if anything
99
was read, see #adjustInBuffer."
10-
11-
recentlyRead := shouldSignal ifTrue: [
12-
self shouldTimeout ifTrue: [
13-
socket receiveDataSignallingTimeout: timeout
14-
into: inBuffer startingAt: inNextToWrite]
15-
ifFalse: [
16-
socket receiveDataSignallingClosedInto: inBuffer
17-
startingAt: inNextToWrite]]
18-
ifFalse: [
19-
self shouldTimeout ifTrue: [
20-
"This case is tricky, if it times out and is swallowed
10+
11+
recentlyRead := shouldSignal
12+
ifTrue: [
13+
self shouldTimeout
14+
ifTrue: [
15+
self socket
16+
receiveDataSignallingTimeout: timeout
17+
into: inBuffer
18+
startingAt: inNextToWrite ]
19+
ifFalse: [ self socket receiveDataSignallingClosedInto: inBuffer startingAt: inNextToWrite ] ]
20+
ifFalse: [
21+
self shouldTimeout
22+
ifTrue: [
23+
"This case is tricky, if it times out and is swallowed
2124
how does other methods calling this method repeatedly
2225
get to know that? And what should they do?"
23-
socket receiveDataTimeout: timeout
24-
into: inBuffer startingAt: inNextToWrite]
25-
ifFalse: [
26-
socket receiveDataInto: inBuffer
27-
startingAt: inNextToWrite]].
28-
^self adjustInBuffer: recentlyRead
26+
self socket
27+
receiveDataTimeout: timeout
28+
into: inBuffer
29+
startingAt: inNextToWrite ]
30+
ifFalse: [ self socket receiveDataInto: inBuffer startingAt: inNextToWrite ] ].
31+
^ self adjustInBuffer: recentlyRead
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
as yet unclassified
22
receiveDataIfAvailable
3-
"Only used to check that there really is data to read
3+
"Only used to check that there really is data to read
44
from the socket after it signals dataAvailable.
55
It has been known to signal true and then still
66
not have anything to read. See also isDataAvailable.
77
Return the position in the buffer where the
88
new data starts, regardless if anything
99
was read, see #adjustInBuffer."
1010

11-
recentlyRead := socket receiveSomeDataInto: inBuffer startingAt: inNextToWrite.
12-
^self adjustInBuffer: recentlyRead
11+
recentlyRead := self socket
12+
receiveSomeDataInto: inBuffer
13+
startingAt: inNextToWrite.
14+
^ self adjustInBuffer: recentlyRead
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
as yet unclassified
22
socket: aSocket
3-
socket := aSocket
3+
socket := TransientStackValue value: aSocket
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
as yet unclassified
22
socket
3-
^socket
3+
^ socket value

0 commit comments

Comments
 (0)