-
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: checkpoint ... working on 'TDProjectCommandTests debug: #te…
…stProjectNew'
- Loading branch information
1 parent
858a9da
commit 3e31716
Showing
9 changed files
with
128 additions
and
13 deletions.
There are no files selected for viewing
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
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
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
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 @@ | ||
# Default stone /sys/stone/\<stone-name\> files | ||
|
||
The files in this directory are installed by the `/sys/default/bin/validateStoneSysNodes` script |
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,25 @@ | ||
TDRawGatewayNode{#name:'dirs',#contents:'| dirNode projectTool | | ||
dirNode := TDDirectoryNode new | ||
name: \'dirs\'; | ||
yourself. | ||
projectTool := self topez toolInstanceFor: \'project\'. | ||
(projectTool projectRegistrationDefinitionList | ||
select: [ :registration | registration hasGitBasedRepo or: [ registration hasGitRepository ] ]) | ||
collect: [ :registration | | ||
| diskPath | | ||
diskPath := registration hasGitRepository | ||
ifTrue: [ registration gitRootDirectory pathName ] | ||
ifFalse: [ | ||
| githubRepo | | ||
githubRepo := registration repository. | ||
(githubRepo class | ||
projectDirectoryFrom: githubRepo projectPath | ||
version: githubRepo projectVersion) pathName ]. | ||
dirNode | ||
addChildNode: | ||
(TDObjectGatewayNode new | ||
name: registration projectName; | ||
contents: \'ServerFileDirectory on: \' , diskPath printString; | ||
visitAsLeafNode: true; | ||
yourself) ]. | ||
^ dirNode'} |
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,7 @@ | ||
TDRawGatewayNode{#name:'homeComposition',#contents:'(TDComposedDirectoryNode | ||
pathComposedDirectoryNodeNamed: \'home\' | ||
topez: self topez) | ||
addPathNode: \'/sys/stone/home\'; | ||
addPathNode: \'/sys/local/server/home\'; | ||
addPathNode: \'/sys/default/server/home\' includes: #( \'tode\' \'utils\' ); | ||
yourself'} |
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,15 @@ | ||
TDRawGatewayNode{#name:'packages',#contents:'| dirNode monticelloTool | | ||
dirNode := TDDirectoryNode new | ||
name: \'packages\'; | ||
readMe: \'I have a listing of the packages loaded into this stone.\'; | ||
yourself. | ||
monticelloTool := self topez toolInstanceFor: \'mc\'. | ||
(monticelloTool mclist: \'\') | ||
collect: [ :each | | ||
dirNode | ||
addChildNode: | ||
(TDObjectNode new | ||
name: each packageName; | ||
basicContents: each; | ||
yourself) ]. | ||
^ dirNode'} |
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,7 @@ | ||
TDRawGatewayNode{#name:'projectComposition',#contents:'(TDComposedProjectEntryNode | ||
pathComposedDirectoryNodeNamed: \'home\' | ||
topez: self topez) | ||
addPathNode: \'/sys/stone/projects\'; | ||
addPathNode: \'/sys/local/server/projects\'; | ||
addPathNode: \'/sys/default/server/projects\'; | ||
yourself'} |
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,45 @@ | ||
TDRawGatewayNode{#name:'repos',#contents:'| dirNode projectTool monticelloTool | | ||
dirNode := TDDirectoryNode new | ||
name: \'repos\'; | ||
yourself. | ||
projectTool := self topez toolInstanceFor: \'project\'. | ||
monticelloTool := self topez toolInstanceFor: \'mc\'. | ||
(projectTool projectRegistrationDefinitionList | ||
select: [ :registration | registration hasGitBasedRepo or: [ registration hasFileTreeRepo ] ]) | ||
collect: [ :each | | ||
| node repos | | ||
repos := [ each repository ] | ||
on: Error | ||
do: [ :ignored | | ||
\"not a valid repository, so skip it\" | ||
nil ]. | ||
repos | ||
ifNotNil: [ | ||
node := TDObjectNode new | ||
name: each projectName; | ||
basicContents: repos; | ||
listBlock: [ :theNode | ((monticelloTool mrpackageNamesIn: theNode basicContents) at: 1) sorted ]; | ||
elementBlock: [ :theNode :elementName :absentBlock | | ||
| resolvedDict versionReferences info | | ||
info := monticelloTool mrpackageNamesIn: theNode basicContents. | ||
resolvedDict := info at: 3. | ||
versionReferences := resolvedDict | ||
at: elementName | ||
ifAbsent: [ absentBlock value ]. | ||
TDObjectNode new | ||
name: elementName; | ||
basicContents: versionReferences asArray; | ||
listBlock: [ :theNode | (theNode basicContents collect: [ :each | each name ]) sorted ]; | ||
elementBlock: [ :theNode :elementName :absentBlock | | ||
| versionReference | | ||
versionReference := theNode basicContents | ||
detect: [ :each | each name = elementName ] | ||
ifNone: absentBlock. | ||
TDObjectNode new | ||
name: versionReference name; | ||
basicContents: versionReference version; | ||
yourself ]; | ||
yourself ]; | ||
yourself. | ||
dirNode addChildNode: node ] ]. | ||
^ dirNode'} |