Skip to content

Commit

Permalink
Issue #4: create session description ... looks kosher
Browse files Browse the repository at this point in the history
  • Loading branch information
dalehenrich committed Jun 3, 2023
1 parent 56e19e9 commit ba7961b
Show file tree
Hide file tree
Showing 15 changed files with 36 additions and 77 deletions.
2 changes: 1 addition & 1 deletion rowan/components/Core.ston
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ RwSimpleProjectLoadComponentV2 {
'GsDevKit_stones-Core'
],
#comment : ''
}
}
2 changes: 1 addition & 1 deletion rowan/components/Tode.ston
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ RwSimpleProjectLoadComponentV2 {
'GsDevKit_stones-Tode'
],
#comment : 'Shared classes between GsDevKit_stones and Tode'
}
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
stone creation
createSessionDescripton: stoneSpec
| sessionDescriptionFile |
sessionDescriptionFile := stoneSpec todeSharedDirectory asFileReference / 'sessions'
/ stoneSpec stoneName.
sessionDescriptionFile ensureCreateFile
| sessionDescriptionFile description localHostName |
sessionDescriptionFile := stoneSpec todeSharedDirectory asFileReference
/ 'sessions' / stoneSpec stoneName.
localHostName := System hostname.
description := TDSessionDescription new
name: stoneSpec stoneName;
gemstoneVersion: stoneSpec gemstoneVersionString;
stoneHost: localHostName;
stoneName: stoneSpec stoneName;
gemHost: localHostName;
netLDI: stoneSpec stoneName , '_ldi';
netLDIPort: self netldiPort asString;
gemTask: 'gemnetobject';
userId: stoneSpec userId;
password: stoneSpec password;
backupDirectory: (stoneSpec rootDir / self backups) pathString;
snapshotDirectory: (stoneSpec rootDir / self snapshots) pathString;
yourself.
description exportTo: sessionDescriptionFile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ destroyStoneStructure: stoneSpec
"clean up the stone-specific tode meta data"

| sharedtodeDir stoneDir sessionsFile |
self halt.
sharedtodeDir := stoneSpec todeSharedDirectory asFileReference.
stoneDir := sharedtodeDir / 'stones' / stoneSpec stoneName.
stoneDir := sharedtodeDir / 'server' / 'stones' / stoneSpec stoneName.
stoneDir ensureDeleteAll.
sessionsFile := sharedtodeDir / 'sessions' / stoneSpec stoneName.
sessionsFile ensureDelete
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
accessing
exportTo: filepath
self exportTo: filepath extension: ''
exportTo: fileRef
fileRef
writeStreamDo: [ :fileStream | STON put: self onStreamPretty: fileStream ]

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
accessing
gemstoneVersion: aString
| tokens |
tokens := aString findTokens: '.'.
tokens size <= 2
ifTrue: [ self error: 'GemStone version must have a minimum of three version fields: ''3.2.0''' ].
aString asRwGemStoneVersionNumber. "validate that is a proper GemStone version"
gemstoneVersion := aString
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
ston
stonOn: stonWriter
stonWriter
writeObject: self
streamMap: [ :dictionary |
self stonInstVarNames
do: [ :each | dictionary at: each asSymbol put: (self instVarNamed: each) ] ]
| allInstanceVariableNames |
allInstanceVariableNames := self class allInstVarNames.
stonWriter
writeObject: self
streamMap: [ :dictionary |
self stonInstVarNames
do: [ :each |
dictionary
at: each asSymbol
put: (self instVarAt: (allInstanceVariableNames indexOf: each asSymbol)) ] ]

0 comments on commit ba7961b

Please sign in to comment.