Skip to content

Commit

Permalink
Move Zinc extensions to its own package
Browse files Browse the repository at this point in the history
  • Loading branch information
gcotelli committed Sep 13, 2023
1 parent 8d07703 commit 499f70a
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 38 deletions.
68 changes: 38 additions & 30 deletions source/BaselineOfStargate/BaselineOfStargate.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,24 @@ BaselineOfStargate >> projectClass [
^ MetacelloCypressBaselineProject
]

{ #category : #baselines }
BaselineOfStargate >> setUpCorePackages: spec [

spec
package: 'Stargate-Model' with: [
spec requires:
#( 'Buoy-Deployment' 'Hyperspace-Deployment'
'Teapot-Deployment' 'JSONWebToken-Deployment' ) ];
group: 'Core' with: 'Stargate-Model';
group: 'Deployment' with: 'Stargate-Model'.

spec
package: 'Stargate-Zinc-Extensions'
with: [ spec requires: 'Stargate-Model' ];
group: 'Core' with: 'Stargate-Zinc-Extensions';
group: 'Deployment' with: 'Stargate-Zinc-Extensions'
]

{ #category : #baselines }
BaselineOfStargate >> setUpDependencies: spec [

Expand Down Expand Up @@ -69,62 +87,52 @@ BaselineOfStargate >> setUpDependencies: spec [
{ #category : #baselines }
BaselineOfStargate >> setUpDeploymentPackages: spec [

self setUpCorePackages: spec.
spec
package: 'Stargate-Model' with: [
spec requires:
#( 'Buoy-Deployment' 'Hyperspace-Deployment' 'Teapot-Deployment' 'JSONWebToken-Deployment' )
];
group: 'Core' with: 'Stargate-Model';
group: 'Deployment' with: 'Stargate-Model'.

spec
package: 'Stargate-HealthCheck' with: [ spec requires: 'Stargate-Model' ];
package: 'Stargate-HealthCheck' with: [ spec requires: 'Core' ];
group: 'HealthCheck' with: 'Stargate-HealthCheck';
group: 'Deployment' with: 'HealthCheck'.

spec
package: 'Stargate-Metrics' with: [ spec requires: 'Stargate-Model' ];
package: 'Stargate-Metrics' with: [ spec requires: 'Core' ];
group: 'Metrics' with: 'Stargate-Metrics';
group: 'Deployment' with: 'Metrics'.

spec
package: 'Stargate-Metrics-HTTP' with: [ spec requires: 'Stargate-Metrics' ];
package: 'Stargate-Metrics-HTTP'
with: [ spec requires: 'Stargate-Metrics' ];
group: 'Metrics-HTTP' with: 'Stargate-Metrics-HTTP';
group: 'Deployment' with: 'Metrics-HTTP'.

spec
package: 'Stargate-JSON-RPC' with: [ spec requires: #( 'Stargate-Model' 'JRPC-Deployment' ) ];
package: 'Stargate-JSON-RPC'
with: [ spec requires: #( 'Core' 'JRPC-Deployment' ) ];
group: 'JSON-RPC' with: 'Stargate-JSON-RPC';
group: 'Deployment' with: 'JSON-RPC'.

spec
package: 'Stargate-Application-Control' with: [ spec requires: #( 'Stargate-Model'
'JSON-RPC' ) ];
package: 'Stargate-Application-Control'
with: [ spec requires: #( 'Core' 'JSON-RPC' ) ];
group: 'Application-Control' with: 'Stargate-Application-Control';
group: 'Deployment' with: 'Application-Control'.

spec
package: 'Stargate-Application-Info' with: [ spec requires: 'Stargate-Model' ];
package: 'Stargate-Application-Info'
with: [ spec requires: 'Core' ];
group: 'Application-Info' with: 'Stargate-Application-Info';
group: 'Deployment' with: 'Application-Info'.

spec
package: 'Stargate-Application-Configuration'
with: [ spec requires: #( 'Stargate-Model' 'Launchpad-Deployment' ) ];
group: 'Application-Configuration' with: 'Stargate-Application-Configuration';
with: [ spec requires: #( 'Core' 'Launchpad-Deployment' ) ];
group: 'Application-Configuration'
with: 'Stargate-Application-Configuration';
group: 'Deployment' with: 'Application-Configuration'.

spec
package: 'Stargate-Loggers' with: [ spec requires: #( 'Stargate-Model' 'Launchpad-Deployment' ) ];
package: 'Stargate-Loggers'
with: [ spec requires: #( 'Core' 'Launchpad-Deployment' ) ];
group: 'Loggers' with: 'Stargate-Loggers';
group: 'Deployment' with: 'Loggers'.

spec
package: 'Stargate-API-Skeleton' with: [
package: 'Stargate-API-Skeleton' with: [
spec requires:
#( 'Metrics-HTTP' 'Application-Control' 'Application-Info' 'Application-Configuration'
'Launchpad-Deployment' 'ZTimestamp-Core' )
];
#( 'Metrics-HTTP' 'Application-Control' 'Application-Info'
'Application-Configuration' 'Launchpad-Deployment'
'ZTimestamp-Core' ) ];
group: 'Deployment' with: 'Stargate-API-Skeleton'
]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Extension { #name : #UUID }

{ #category : #'*Stargate-Model' }
{ #category : #'*Stargate-Zinc-Extensions' }
UUID >> neoJsonOn: neoJSONWriter [

neoJSONWriter writeString: self printString
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Extension { #name : #ZnHeaders }

{ #category : #'*Stargate-Model' }
{ #category : #'*Stargate-Zinc-Extensions' }
ZnHeaders >> at: headerName addSeparatedWithComma: aValue [

self at: headerName put: aValue ifPresentMerge: [ :existing :new | existing , ', ' , new ]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
Extension { #name : #ZnRequest }

{ #category : #'*Stargate-Model' }
{ #category : #'*Stargate-Zinc-Extensions' }
ZnRequest >> setUrlTemplate: urlTemplate [

self headers at: #'X-Stargate-URL-Template' put: urlTemplate asString
]

{ #category : #'*Stargate-Model' }
{ #category : #'*Stargate-Zinc-Extensions' }
ZnRequest >> urlTemplateIfAbsent: aBlock [

^ self headers at: #'X-Stargate-URL-Template' ifAbsent: aBlock
]

{ #category : #'*Stargate-Model' }
{ #category : #'*Stargate-Zinc-Extensions' }
ZnRequest >> withAcceptHeaderDo: aBlock ifAbsent: failBlock [

| headerValue |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Extension { #name : #ZnResponse }

{ #category : #'*Stargate-Model' }
{ #category : #'*Stargate-Zinc-Extensions' }
ZnResponse class >> forbidden [

^ self statusLine: ZnStatusLine forbidden
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Extension { #name : #ZnUrl }

{ #category : #'*Stargate-Model' }
{ #category : #'*Stargate-Zinc-Extensions' }
ZnUrl >> asWebOrigin [

^ WebOrigin basedOn: self
]

{ #category : #'*Stargate-Model' }
{ #category : #'*Stargate-Zinc-Extensions' }
ZnUrl >> hasValidOrigin [

^ WebOrigin hasValidOrigin: self
Expand Down
1 change: 1 addition & 0 deletions source/Stargate-Zinc-Extensions/package.st
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Package { #name : #'Stargate-Zinc-Extensions' }

0 comments on commit 499f70a

Please sign in to comment.