77 lines
2.7 KiB
Smalltalk
77 lines
2.7 KiB
Smalltalk
Class {
|
|
#name : #ConfigurationOfShortener,
|
|
#superclass : #Object,
|
|
#instVars : [
|
|
'project'
|
|
],
|
|
#classVars : [
|
|
'LastVersionLoad'
|
|
],
|
|
#category : #ConfigurationOfShortener
|
|
}
|
|
|
|
{ #category : #'development support' }
|
|
ConfigurationOfShortener class >> DevelopmentSupport [
|
|
|
|
"See the methods in the 'development support' category on the class-side of MetacelloBaseConfiguration. Decide what development support methods you would like to use and copy them the the class-side of your configuration."
|
|
<apiDocumentation>
|
|
]
|
|
|
|
{ #category : #private }
|
|
ConfigurationOfShortener class >> ensureMetacelloBaseConfiguration [
|
|
Smalltalk
|
|
at: #'ConfigurationOf'
|
|
ifAbsent: [
|
|
| repository version |
|
|
repository := MCHttpRepository
|
|
location: 'http://smalltalkhub.com/mc/dkh/metacello/main'
|
|
user: ''
|
|
password: ''.
|
|
repository
|
|
versionReaderForFileNamed: 'Metacello-Base-dkh.107'
|
|
do: [ :reader |
|
|
version := reader version.
|
|
version load.
|
|
version workingCopy repositoryGroup addRepository: repository ] ]
|
|
]
|
|
|
|
{ #category : #'development support' }
|
|
ConfigurationOfShortener class >> validate [
|
|
"Check the configuration for Errors, Critical Warnings, and Warnings (see class comment for MetacelloMCVersionValidator for more information).
|
|
Errors identify specification issues that will result in unexpected behaviour when you load the configuration.
|
|
Critical Warnings identify specification issues that may result in unexpected behavior when you load the configuration.
|
|
Warnings identify specification issues that are technically correct, but are worth take a look at."
|
|
|
|
"self validate"
|
|
|
|
<apiDocumentation>
|
|
self ensureMetacello.
|
|
^ ((Smalltalk at: #MetacelloToolBox) validateConfiguration: self debug: #() recurse: false) explore
|
|
]
|
|
|
|
{ #category : #accessing }
|
|
ConfigurationOfShortener >> customProjectAttributes [
|
|
"Edit to return a collection of any custom attributes e.g. for conditional loading: Array with: #'Condition1' with: #'Condition2.
|
|
For more information see: http://code.google.com/p/metacello/wiki/CustomProjectAttrributes "
|
|
|
|
^ #()
|
|
]
|
|
|
|
{ #category : #accessing }
|
|
ConfigurationOfShortener >> project [
|
|
^ project
|
|
ifNil: [
|
|
"Bootstrap Metacello if it is not already loaded"
|
|
self class ensureMetacello.
|
|
project := MetacelloMCProject new projectAttributes: self customProjectAttributes. "Create the Metacello project"
|
|
(Smalltalk at: #'MetacelloVersionConstructor') on: self project: project. "Construct the project"
|
|
project loadType: #'linear'. "change to #atomic if desired"
|
|
project ]
|
|
]
|
|
|
|
{ #category : #'symbolic versions' }
|
|
ConfigurationOfShortener >> stable: spec [
|
|
<symbolicVersion: #'stable'>
|
|
spec for: #common version: '1'
|
|
]
|