From 54848b90c2e01231fa2c7722676b483126f55e78 Mon Sep 17 00:00:00 2001 From: Gabriel Omar Cotelli Date: Wed, 13 Sep 2023 14:31:34 -0300 Subject: [PATCH] Move NeoJSON extensions to its own package --- source/BaselineOfStargate/BaselineOfStargate.class.st | 4 ++-- .../NeoJSONObject.extension.st | 2 +- .../NeoJSONObjectMapping.extension.st | 6 +++--- source/Stargate-NeoJSON-Extensions/package.st | 1 + 4 files changed, 7 insertions(+), 6 deletions(-) rename source/{Stargate-Model => Stargate-NeoJSON-Extensions}/NeoJSONObject.extension.st (65%) rename source/{Stargate-Model => Stargate-NeoJSON-Extensions}/NeoJSONObjectMapping.extension.st (79%) create mode 100644 source/Stargate-NeoJSON-Extensions/package.st diff --git a/source/BaselineOfStargate/BaselineOfStargate.class.st b/source/BaselineOfStargate/BaselineOfStargate.class.st index b17e0a0..37183cc 100644 --- a/source/BaselineOfStargate/BaselineOfStargate.class.st +++ b/source/BaselineOfStargate/BaselineOfStargate.class.st @@ -38,8 +38,8 @@ BaselineOfStargate >> setUpCorePackages: spec [ group: 'Core' with: 'Stargate-Model'; group: 'Deployment' with: 'Stargate-Model'. - #( 'Stargate-Zinc-Extensions' 'Stargate-Teapot-Extensions' ) do: [ - :extensionPackageName | + #( 'Stargate-Zinc-Extensions' 'Stargate-Teapot-Extensions' + 'Stargate-NeoJSON-Extensions' ) do: [ :extensionPackageName | spec package: extensionPackageName with: [ spec requires: 'Stargate-Model' ]; diff --git a/source/Stargate-Model/NeoJSONObject.extension.st b/source/Stargate-NeoJSON-Extensions/NeoJSONObject.extension.st similarity index 65% rename from source/Stargate-Model/NeoJSONObject.extension.st rename to source/Stargate-NeoJSON-Extensions/NeoJSONObject.extension.st index e2d0898..1a43b1a 100644 --- a/source/Stargate-Model/NeoJSONObject.extension.st +++ b/source/Stargate-NeoJSON-Extensions/NeoJSONObject.extension.st @@ -1,6 +1,6 @@ Extension { #name : #NeoJSONObject } -{ #category : #'*Stargate-Model' } +{ #category : #'*Stargate-NeoJSON-Extensions' } NeoJSONObject >> selfLocation [ ^ self links self diff --git a/source/Stargate-Model/NeoJSONObjectMapping.extension.st b/source/Stargate-NeoJSON-Extensions/NeoJSONObjectMapping.extension.st similarity index 79% rename from source/Stargate-Model/NeoJSONObjectMapping.extension.st rename to source/Stargate-NeoJSON-Extensions/NeoJSONObjectMapping.extension.st index fe7cb7a..8b39437 100644 --- a/source/Stargate-Model/NeoJSONObjectMapping.extension.st +++ b/source/Stargate-NeoJSON-Extensions/NeoJSONObjectMapping.extension.st @@ -1,6 +1,6 @@ Extension { #name : #NeoJSONObjectMapping } -{ #category : #'*Stargate-Model' } +{ #category : #'*Stargate-NeoJSON-Extensions' } NeoJSONObjectMapping >> mapAsHypermediaControls: aBlock [ self @@ -8,13 +8,13 @@ NeoJSONObjectMapping >> mapAsHypermediaControls: aBlock [ getter: [ :object | ( ( aBlock cull: object ) collect: [ :assoc | assoc key -> assoc value printString ] ) asDictionary ] ] -{ #category : #'*Stargate-Model' } +{ #category : #'*Stargate-NeoJSON-Extensions' } NeoJSONObjectMapping >> mapProperty: propertyName getter: readBlock [ ^ self mapProperty: propertyName getter: readBlock setter: [ :object :value | ] ] -{ #category : #'*Stargate-Model' } +{ #category : #'*Stargate-NeoJSON-Extensions' } NeoJSONObjectMapping >> mapProperty: propertyName setter: writeBlock [ ^ self mapProperty: propertyName getter: [ :object | ] setter: writeBlock diff --git a/source/Stargate-NeoJSON-Extensions/package.st b/source/Stargate-NeoJSON-Extensions/package.st new file mode 100644 index 0000000..faeec10 --- /dev/null +++ b/source/Stargate-NeoJSON-Extensions/package.st @@ -0,0 +1 @@ +Package { #name : #'Stargate-NeoJSON-Extensions' }