-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #4: poised to login and attempt to execute a command
- Loading branch information
1 parent
2dc8ee8
commit db169b1
Showing
7 changed files
with
24 additions
and
66 deletions.
There are no files selected for viewing
14 changes: 3 additions & 11 deletions
14
..._stones-Tode.package/TDExternalSessionClient.class/instance/evaluateCommand.batchMode..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,9 @@ | ||
evaluation | ||
evaluateCommand: command batchMode: batchBool | ||
| stonString transcriptOop | | ||
stonString := self objectSerializer toString: command. | ||
batchBool | ||
ifFalse: [ transcriptOop := self session clientForwarderCache keyAtValue: Transcript ifAbsent: [ ] ]. | ||
[ | ||
(transcriptOop notNil and: [ batchBool not ]) | ||
ifTrue: [ self session clientForwarderCache at: transcriptOop put: self shell console ]. | ||
| stonString | | ||
stonString := (STON toString: command) encodeAsUTF8. | ||
^ self session | ||
executeStringExpectingStringNB: | ||
'(' , self todeServerAccessString , ' for: ' , self shell shellId asString , ') evaluateSTONCommand:' | ||
, stonString printString | ||
envId: self environmentId ] | ||
ensure: [ | ||
(session notNil and: [ transcriptOop notNil and: [ batchBool not ] ]) | ||
ifTrue: [ self session clientForwarderCache at: transcriptOop put: Transcript ] ] | ||
envId: self environmentId |
26 changes: 10 additions & 16 deletions
26
src/GsDevKit_stones-Tode.package/TDExternalSessionClient.class/instance/login.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,15 @@ | ||
session management | ||
login | ||
| sess gemNRS stoneNRS aUsername aPassword | | ||
| sess gemNRS stoneNRS sessionDescription | | ||
sessionDescription := self sessionDescription. | ||
gemNRS := GsNetworkResourceString | ||
gemNRSForNetLDI: sessionDescription netLDIPort | ||
onHost: sessionDescription gemHost. | ||
stoneNRS := GsNetworkResourceString | ||
stoneNRSForStoneName: sessionDescription stoneName | ||
onHost: sessionDescription stoneHost. | ||
sess := GsTsExternalSession | ||
gemNRS: gemNRS | ||
stoneNRS: stoneNRS | ||
username: aUsername | ||
password: aPassword. | ||
(sess loginWith: self sessionDescription) | ||
ifFalse: [ | ||
| gciError messageText | | ||
gciError := sess getAndClearLastError. | ||
messageText := gciError message. | ||
^ Error | ||
signal: | ||
messageText | ||
, ' For further information about login failures, check the gem log file' ]. | ||
self class addDependent: self. | ||
false | ||
ifTrue: [ sess enableGemTrace ]. | ||
^ sess | ||
username: sessionDescription userId | ||
password: sessionDescription password |
20 changes: 0 additions & 20 deletions
20
src/GsDevKit_stones-Tode.package/TDExternalSessionClient.class/instance/loginUsing..st
This file was deleted.
Oops, something went wrong.
7 changes: 2 additions & 5 deletions
7
src/GsDevKit_stones-Tode.package/TDExternalSessionClient.class/instance/session.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
session management | ||
session | ||
session | ||
ifNil: [ | ||
session := self login. | ||
self topezServerProxy ]. | ||
^ session | ||
session ifNil: [ session := self login ]. | ||
^ session |
3 changes: 3 additions & 0 deletions
3
...GsDevKit_stones-Tode.package/TDExternalSessionClient.class/instance/sessionDescription.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
sessionDescription | ||
^ self shell sessionDescription |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 5 additions & 6 deletions
11
src/GsDevKit_stones-Tode.package/TDShell.class/instance/postCopy.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
stash | ||
postCopy | ||
"windowStatus is shared" | ||
"windowStatus is shared" | ||
|
||
shellId := promptString := actionStack := inputStream := shellWindow := nil. | ||
topezClient := self topezClient copy | ||
shell: self; | ||
topezServerProxy; | ||
yourself | ||
shellId := promptString := actionStack := inputStream := shellWindow := nil. | ||
topezClient := self topezClient copy | ||
shell: self; | ||
yourself |