More consistent variable names.
This commit is contained in:
parent
84b9128a00
commit
7d6c838863
@ -2,7 +2,7 @@ Class {
|
|||||||
#name : #ExoRepo,
|
#name : #ExoRepo,
|
||||||
#superclass : #Object,
|
#superclass : #Object,
|
||||||
#instVars : [
|
#instVars : [
|
||||||
'url'
|
'repository'
|
||||||
],
|
],
|
||||||
#category : #ExoRepo
|
#category : #ExoRepo
|
||||||
}
|
}
|
||||||
@ -12,24 +12,23 @@ ExoRepo >> load [
|
|||||||
"I load the configuration of this package using a external Gitea repository."
|
"I load the configuration of this package using a external Gitea repository."
|
||||||
"While more Git independient providers are implemented in Monticello, I will
|
"While more Git independient providers are implemented in Monticello, I will
|
||||||
use Iceberg to download the repository and load it from a local directory"
|
use Iceberg to download the repository and load it from a local directory"
|
||||||
| location localRepo repoName packageName |
|
| location localRepo repoName |
|
||||||
|
|
||||||
"Sometimes repoName and packageName are different, following Pharo's conventions.
|
"Sometimes repoName and packageName are different, following Pharo's conventions.
|
||||||
For example the repoName can be MyPackage, while packageName can be My-Package"
|
For example the repoName can be MyPackage, while packageName can be My-Package"
|
||||||
repoName := self repositoryName.
|
repoName := self repositoryName.
|
||||||
|
|
||||||
"Local and remote repo definition"
|
"Local and remote repo definition"
|
||||||
location := FileLocator localDirectory / 'iceberg' / (self provider) / repoName.
|
location := FileLocator localDirectory / 'iceberg' / (self provider) / repoName.
|
||||||
location exists ifFalse: [
|
location exists ifFalse: [
|
||||||
(IceRepositoryCreator new
|
(IceRepositoryCreator new
|
||||||
location: location;
|
location: location;
|
||||||
remote: (IceGitRemote url: self url asString, '.git');
|
remote: (IceGitRemote url: self repository asString, '.git');
|
||||||
createRepository)
|
createRepository)
|
||||||
register
|
register
|
||||||
].
|
].
|
||||||
"Package loading"
|
"Package loading"
|
||||||
localRepo := 'gitlocal://', location fullName.
|
localRepo := 'gitlocal://', location fullName.
|
||||||
Metacello new
|
^ Metacello new
|
||||||
repository: localRepo;
|
repository: localRepo;
|
||||||
baseline: repoName;
|
baseline: repoName;
|
||||||
load.
|
load.
|
||||||
@ -37,22 +36,22 @@ ExoRepo >> load [
|
|||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
ExoRepo >> provider [
|
ExoRepo >> provider [
|
||||||
self url ifNil: [ ^ nil ].
|
self repository ifNil: [ ^ nil ].
|
||||||
^ self url segments first
|
^ self repository segments first
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #accessing }
|
||||||
|
ExoRepo >> repository [
|
||||||
|
^ repository.
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #accessing }
|
||||||
|
ExoRepo >> repository: aString [
|
||||||
|
repository := aString asZnUrl
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
ExoRepo >> repositoryName [
|
ExoRepo >> repositoryName [
|
||||||
self url ifNil: [ ^ self ].
|
self repository ifNil: [ ^ self ].
|
||||||
^ self url segments last
|
^ self repository segments last
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #accessing }
|
|
||||||
ExoRepo >> url [
|
|
||||||
^ url.
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #accessing }
|
|
||||||
ExoRepo >> url: aString [
|
|
||||||
url := aString asZnUrl
|
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user