@@ -23,28 +23,6 @@ RwProjectSpecificationV2 class >> label [
23
23
^ ' project specification '
24
24
]
25
25
26
- { #category : ' accessing' }
27
- RwProjectSpecificationV2 >> _repoType [
28
- " direct access to IV ... used by ="
29
-
30
- ^ repoType
31
- ]
32
-
33
- { #category : ' private' }
34
- RwProjectSpecificationV2 >> _validate [
35
- " ensure that the data structures within the receiver contain valid information:
36
- 1. platform implementation is responsible for validating platform structures"
37
-
38
- #(#'componentsPath' #'packagesPath' #'projectsPath' #'specsPath' #'projectName' #'specName' #'projectSpecPath')
39
- do: [ :messageName |
40
- (self perform: messageName)
41
- ifNil: [
42
- Error
43
- signal :
44
- ' The instance variable ' , messageName asString printString , ' cannot be nil' ] ].
45
- ^ true
46
- ]
47
-
48
26
{ #category : ' comparing' }
49
27
RwProjectSpecificationV2 >> = anObject [
50
28
| lazyEqual |
@@ -72,6 +50,28 @@ RwProjectSpecificationV2 >> = anObject [
72
50
and : [ self loadedCommitId = anObject loadedCommitId ] ] ] ] ] ] ] ] ] ]
73
51
]
74
52
53
+ { #category : ' accessing' }
54
+ RwProjectSpecificationV2 >> _repoType [
55
+ " direct access to IV ... used by ="
56
+
57
+ ^ repoType
58
+ ]
59
+
60
+ { #category : ' private' }
61
+ RwProjectSpecificationV2 >> _validate [
62
+ " ensure that the data structures within the receiver contain valid information:
63
+ 1. platform implementation is responsible for validating platform structures"
64
+
65
+ #(#'componentsPath' #'packagesPath' #'projectsPath' #'specsPath' #'projectName' #'specName' #'projectSpecPath')
66
+ do: [ :messageName |
67
+ (self perform: messageName)
68
+ ifNil: [
69
+ Error
70
+ signal :
71
+ ' The instance variable ' , messageName asString printString , ' cannot be nil' ] ].
72
+ ^ true
73
+ ]
74
+
75
75
{ #category : ' accessing' }
76
76
RwProjectSpecificationV2 >> comment [
77
77
^ comment ifNil: [ ^ ' ' ]
@@ -158,14 +158,25 @@ RwProjectSpecificationV2 >> packageConvention [
158
158
]
159
159
160
160
{ #category : ' accessing' }
161
- RwProjectSpecificationV2 >> packageConvention: aString [
161
+ RwProjectSpecificationV2 >> packageConvention: aStringOrNil [
162
162
"
163
163
RowanHybrid - [default] Class category is package name, method protocol with leading $* is case insensitive package name
164
164
Monticello - Class category is package name, method protocol with leading $* begins with case insensitive package name
165
165
Rowan - Class category and method protocol are not overloaded with packaging information
166
166
"
167
167
168
- packageConvention := aString
168
+ aStringOrNil
169
+ ifNil: [
170
+ packageConvention := nil .
171
+ ^ self ].
172
+ (#('RowanHybrid' 'Monticello' 'Rowan') includes: aStringOrNil)
173
+ ifFalse: [
174
+ self
175
+ error:
176
+ ' project specification packageConventions field is ' , aStringOrNil printString
177
+ , ' legal values are: nil, ' ' RowanHybrid' ' , ' ' Monticello' ' , or ' ' Rowan' ' ' ].
178
+
179
+ packageConvention := aStringOrNil
169
180
]
170
181
171
182
{ #category : ' accessing' }
@@ -220,17 +231,6 @@ RwProjectSpecificationV2 >> projectName: aString [
220
231
projectName := aString
221
232
]
222
233
223
- { #category : ' accessing' }
224
- RwProjectSpecificationV2 >> projectsPath [
225
-
226
- ^ projectsPath
227
- ]
228
-
229
- { #category : ' accessing' }
230
- RwProjectSpecificationV2 >> projectsPath: aString [
231
- projectsPath := aString
232
- ]
233
-
234
234
{ #category : ' accessing' }
235
235
RwProjectSpecificationV2 >> projectSpecPath [
236
236
@@ -254,6 +254,17 @@ RwProjectSpecificationV2 >> projectVersion: aStringOrVersion [
254
254
" noop for now"
255
255
]
256
256
257
+ { #category : ' accessing' }
258
+ RwProjectSpecificationV2 >> projectsPath [
259
+
260
+ ^ projectsPath
261
+ ]
262
+
263
+ { #category : ' accessing' }
264
+ RwProjectSpecificationV2 >> projectsPath: aString [
265
+ projectsPath := aString
266
+ ]
267
+
257
268
{ #category : ' accessing' }
258
269
RwProjectSpecificationV2 >> repoType [
259
270
^ repoType ifNil: [ repoType := #disk ]
@@ -264,7 +275,11 @@ RwProjectSpecificationV2 >> repoType: aSymbol [
264
275
" #disk, #git or #none"
265
276
266
277
(#(#'disk' #'git' #'none') includes: aSymbol asSymbol)
267
- ifFalse: [ self error: ' Unknown repo type ' , aSymbol asSymbol printString ].
278
+ ifFalse: [
279
+ self
280
+ error:
281
+ ' Unknown repo type ' , aSymbol asSymbol printString
282
+ , ' expecting ' ' disk' ' , ' ' git' ' , or ' ' none' ' ' ].
268
283
^ repoType := aSymbol asSymbol
269
284
]
270
285
0 commit comments