diff --git a/src/ExoRepo/MetacelloPlatform.extension.st b/src/ExoRepo/MetacelloPlatform.extension.st new file mode 100644 index 0000000..e3c18fe --- /dev/null +++ b/src/ExoRepo/MetacelloPlatform.extension.st @@ -0,0 +1,24 @@ +Extension { #name : #MetacelloPlatform } + +{ #category : #'*ExoRepo' } +MetacelloPlatform >> extractTypeFromDescription: description [ + description == nil + ifTrue: [ ^ nil ]. + ((description beginsWith: '/') or: [ description second = $: ]) + ifTrue: [ ^ 'directory' ]. + (description beginsWith: 'dictionary://') + ifTrue: [ ^ 'dictionary' ]. + (description beginsWith: 'filetree://') + ifTrue: [ ^ 'filetree' ]. + (description beginsWith: 'tonel://') + ifTrue: [ ^ 'tonel' ]. + (description beginsWith: 'github://') + ifTrue: [ ^ 'github' ]. + (description beginsWith: 'gitorious://') + ifTrue: [ ^ 'gitorious' ]. + (description beginsWith: 'gitea://') + ifTrue: [ ^ 'gitea' ]. + (description beginsWith: 'bitbucket://') + ifTrue: [ ^ 'bitbucket' ]. + ^ 'http' +]