Skip to content

Commit

Permalink
Merge pull request #1501 from guillep/newmetacello
Browse files Browse the repository at this point in the history
No need of monticello dependency to get package repository
  • Loading branch information
jecisc authored Dec 31, 2023
2 parents b0f0198 + e369400 commit 2519778
Showing 1 changed file with 10 additions and 23 deletions.
33 changes: 10 additions & 23 deletions src/BaselineOfSpec2/BaselineOfSpec2.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,6 @@ BaselineOfSpec2 >> defaultRepositoryURL [
ifAbsent: [ 'github://pharo-spec/Spec' ]
]

{ #category : 'external projects' }
BaselineOfSpec2 >> packageRepository [

" Tries to determine a repository from which the baseline is being loaded. Useful for
refering other baselines in the same repository. "

^ (self class package mcWorkingCopy repositoryGroup repositories
reject: [:each | each = MCCacheRepository uniqueInstance])
ifNotEmpty: [ :repositories |
repositories
detect: [ :each | each description beginsWith: 'tonel://' ]
ifNone: [ repositories anyOne ] ]
ifEmpty: [ nil ]
]

{ #category : 'accessing' }
BaselineOfSpec2 >> project [
"Atomic loading is needed for Spec because we are moving classes of package and it breaks their subclasses.
Expand Down Expand Up @@ -103,18 +88,20 @@ We need to use atomic loading only during update of existing Spec upgrade"
{ #category : 'external projects' }
BaselineOfSpec2 >> specCore: spec [

spec baseline: 'SpecCore' with: [
spec
repository: (self packageRepositoryURL ifEmpty: [ self defaultRepositoryURL ]);
loads: #('Base' 'Tests') ]
spec baseline: 'SpecCore' with: [
spec
repository: ((self packageRepositoryURLForSpec: spec) ifEmpty: [
self defaultRepositoryURL ]);
loads: #( 'Base' 'Tests' ) ]
]

{ #category : 'external projects' }
BaselineOfSpec2 >> specCoreCode: spec [

spec baseline: 'SpecCoreCode' with: [
spec
repository: (self packageRepositoryURL ifEmpty: [ self defaultRepositoryURL ]);
spec baseline: 'SpecCoreCode' with: [
spec
repository: ((self packageRepositoryURLForSpec: spec) ifEmpty: [
self defaultRepositoryURL ]);
className: 'BaselineOfSpecCore';
loads: #('Code' 'CodeTests') ]
loads: #( 'Code' 'CodeTests' ) ]
]

0 comments on commit 2519778

Please sign in to comment.