author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Wed, 19 Sep 2012 01:38:26 +0000 | |
changeset 20 | 8caf2f257260 |
parent 16 | 25ac697dc747 |
permissions | -rw-r--r-- |
11
d354ac2af7ec
Metacello package refactoring - phase 2~
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10
diff
changeset
|
1 |
"{ Package: 'stx:goodies/metacello/core' }" |
1 | 2 |
|
3 |
MetacelloScriptExecutor subclass:#MetacelloScriptApiExecutor |
|
4 |
instanceVariableNames:'' |
|
5 |
classVariableNames:'' |
|
6 |
poolDictionaries:'' |
|
7 |
category:'Metacello-Core-Scripts' |
|
8 |
! |
|
9 |
||
10 |
||
16
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
11 |
!MetacelloScriptApiExecutor methodsFor:'execution callback'! |
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
12 |
|
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
13 |
executeBlock: selectBlock do: projectSpecBlock |
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
14 |
(self projectSpecsFromRepositoryArg select: selectBlock) |
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
15 |
do: [ :projectSpec | projectSpecBlock value: (self applyArgsToProjectSpec: projectSpec copy) ] |
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
16 |
! |
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
17 |
|
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
18 |
executeCollection: aCollection do: projectSpecBlock |
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
19 |
self projectSpecsFromRepositoryArg |
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
20 |
do: [ :projectSpec | |
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
21 |
(aCollection includes: (MetacelloScriptEngine baseNameOf: projectSpec className)) |
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
22 |
ifTrue: [ projectSpecBlock value: (self applyArgsToProjectSpec: projectSpec copy) ] ] |
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
23 |
! |
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
24 |
|
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
25 |
executeString: aString do: projectSpecBlock |
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
26 |
self singleRoot: true. |
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
27 |
(projectSpecGenerator projectSpecCreationBlock value: aString) |
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
28 |
do: [ :projectSpec | projectSpec ifNotNil: [ projectSpecBlock value: (self applyArgsToProjectSpec: projectSpec copy) ] ] |
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
29 |
! |
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
30 |
|
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
31 |
projectSpecsFromRepositoryArg |
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
32 |
| spec repo projectSpecs | |
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
33 |
repositoryArg ifNil: [ ^ #() ]. |
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
34 |
spec := (projectSpecGenerator projectSpecCreationBlock value: 'xxx') first. |
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
35 |
repo := spec project createRepository: (spec project repositorySpec description: repositoryArg). |
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
36 |
projectSpecs := OrderedCollection new. |
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
37 |
((Gofer new disablePackageCache |
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
38 |
repository: repo; |
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
39 |
allResolved) collect: [ :resolvedReference | resolvedReference packageName ]) asSet |
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
40 |
do: [ :packageName | |
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
41 |
(projectSpecGenerator projectSpecCreationBlock value: (MetacelloScriptEngine baseNameOf: packageName)) |
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
42 |
do: [ :projectSpec | |
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
43 |
projectSpec className = packageName |
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
44 |
ifTrue: [ projectSpecs add: (self applyArgsToProjectSpec: projectSpec copy) ] ] ]. |
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
45 |
^ projectSpecs |
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
46 |
! ! |
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
47 |
|
1 | 48 |
!MetacelloScriptApiExecutor class methodsFor:'documentation'! |
49 |
||
50 |
version_SVN |
|
51 |
^ '$Id:: $' |
|
52 |
! ! |