Fossil/repository/ConfigurationOfFossil/ConfigurationOfFossil.class.st

177 lines
5.4 KiB
Smalltalk
Raw Normal View History

2017-07-03 12:52:53 +00:00
"
I am ConfigurationOfFossil a Metacello configuration of Fossil.
Fossil is a small utility to query and eventually manage, Fossil repositories using their included standard JSON API.
For more information about this please visit:
http://smalltalkhub.com/#!/~Offray/Fossil
"
Class {
#name : #ConfigurationOfFossil,
#superclass : #Object,
#instVars : [
'project'
],
#classVars : [
'LastVersionLoad'
],
#category : #ConfigurationOfFossil
}
{ #category : #'development support' }
ConfigurationOfFossil 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 }
ConfigurationOfFossil class >> baseConfigurationClassIfAbsent: aBlock [
^Smalltalk
at: #'ConfigurationOf'
ifAbsent: [
self ensureMetacelloBaseConfiguration.
Smalltalk at: #'ConfigurationOf' ifAbsent: aBlock ].
]
{ #category : #private }
ConfigurationOfFossil class >> ensureMetacello [
(self baseConfigurationClassIfAbsent: []) ensureMetacello
]
{ #category : #private }
ConfigurationOfFossil 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 : #'metacello tool support' }
ConfigurationOfFossil class >> isMetacelloConfig [
"Answer true and the Metacello tools will operate on you"
^true
]
{ #category : #loading }
ConfigurationOfFossil class >> load [
"Load the #stable version defined for this platform. The #stable version is the version that is recommended to be used on this platform."
"self load"
<apiDocumentation>
^(self project version: #stable) load
]
{ #category : #loading }
ConfigurationOfFossil class >> loadBleedingEdge [
"Load the latest versions of the mcz files defined for this project. It is not likely that the #bleedingEdge has been tested."
"self loadBleedingEdge"
<apiDocumentation>
^(self project version: #bleedingEdge) load
]
{ #category : #loading }
ConfigurationOfFossil class >> loadDevelopment [
"Load the #development version defined for this platform. The #development version will change over time and is not expected to be stable."
"self loadDevelopment"
<apiDocumentation>
^(self project version: #development) load
]
{ #category : #accessing }
ConfigurationOfFossil class >> project [
^self new project
]
{ #category : #'development support' }
ConfigurationOfFossil 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 : #baselines }
ConfigurationOfFossil >> baseline1: spec [
<version: '1-baseline'>
spec for: #common do: [
spec
2019-06-11 14:02:24 +00:00
blessing: #baseline.
spec
repository: 'http://smalltalkhub.com/mc/Offray/Fossil/main'.
2017-07-03 12:52:53 +00:00
spec
baseline: 'NeoJSON' with: [ spec repository: 'github://svenvc/NeoJSON/repository' ].
2019-06-11 13:53:37 +00:00
spec package: 'Fossil' with: [ spec requires: #('NeoJSON') ]]
2017-07-03 12:52:53 +00:00
]
{ #category : #accessing }
ConfigurationOfFossil >> 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 }
ConfigurationOfFossil >> 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' }
ConfigurationOfFossil >> stable: spec [
<symbolicVersion: #'stable'>
2019-10-23 11:19:11 +00:00
spec for: #common version: '1.1'
]
{ #category : #versions }
ConfigurationOfFossil >> version11: spec [
<version: '1.1' imports: #('1-baseline')>
spec for: #common do: [
spec
blessing: #release;
project: 'NeoJSON' with: #'stable';
package: 'Fossil' with: 'Fossil-OffrayLuna.18']
2017-07-03 12:52:53 +00:00
]
{ #category : #versions }
ConfigurationOfFossil >> version1: spec [
<version: '1' imports: #('1-baseline')>
spec for: #common do: [
spec
blessing: #release;
2019-06-11 13:01:08 +00:00
project: 'NeoJSON' with: #'stable';
package: 'Fossil' with: 'Fossil-OffrayLuna.17']
2017-07-03 12:52:53 +00:00
]