Skip to content

Commit

Permalink
Merge pull request #150 from ba-st/pharo_10
Browse files Browse the repository at this point in the history
Pharo 10
  • Loading branch information
gcotelli authored Apr 8, 2022
2 parents 8b47458 + f208569 commit 6cdc622
Show file tree
Hide file tree
Showing 13 changed files with 316 additions and 319 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
*.st linguist-language=Smalltalk
*.st eol=lf
*.st text diff
2 changes: 1 addition & 1 deletion .github/workflows/loading-groups.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
fail-fast: false
matrix:
smalltalk: [ Pharo64-9.0, Pharo64-8.0 ]
smalltalk: [ Pharo64-10, Pharo64-9.0, Pharo64-8.0 ]
load-spec: [ deployment, dependent-sunit-extensions, tests, development, tools, examples, core, healthcheck, metrics, metrics-http, json-rpc, app-control, app-info, app-config, loggers ]
name: ${{ matrix.smalltalk }} + ${{ matrix.load-spec }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
smalltalk: [ Pharo64-9.0, Pharo64-8.0 ]
smalltalk: [ Pharo64-10, Pharo64-9.0, Pharo64-8.0 ]
name: ${{ matrix.smalltalk }}
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018-2021 Buenos Aires Smalltalk Contributors
Copyright (c) 2018-2022 Buenos Aires Smalltalk Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Stargate is a library supporting the creation of HTTP based RESTful APIs.
[![GitHub release](https://img.shields.io/github/release/ba-st/Stargate.svg)](https://github.com/ba-st/Stargate/releases/latest)
[![Pharo 8.0](https://img.shields.io/badge/Pharo-8.0-informational)](https://pharo.org)
[![Pharo 9.0](https://img.shields.io/badge/Pharo-9.0-informational)](https://pharo.org)
[![Pharo 10](https://img.shields.io/badge/Pharo-10-informational)](https://pharo.org)

Quick links

Expand Down
14 changes: 9 additions & 5 deletions source/BaselineOfStargate/BaselineOfStargate.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ BaselineOfStargate >> baseline: spec [
spec
group: 'CI' with: 'Tests';
group: 'Examples' with: #('Deployment' 'Stargate-Examples');
group: 'Tools' with: #('Teapot-Tools');
group: 'Tools' with: #('Hyperspace-Tools');
group: 'Development' with: #('Tests' 'Tools')
]
]
Expand All @@ -36,16 +36,20 @@ BaselineOfStargate >> setUpDependencies: spec [
project: 'Buoy-SUnit' copyFrom: 'Buoy' with: [ spec loads: 'Dependent-SUnit-Extensions' ].

spec
baseline: 'Hyperspace' with: [ spec repository: 'github://ba-st/Hyperspace:v2' ];
baseline: 'Hyperspace' with: [ spec repository: 'github://ba-st/Hyperspace:v3' ];
project: 'Hyperspace-Deployment' copyFrom: 'Hyperspace' with: [ spec loads: 'Deployment' ];
project: 'Hyperspace-Tools' copyFrom: 'Hyperspace' with: [ spec loads: 'Tools' ];
project: 'Hyperspace-SUnit'
copyFrom: 'Hyperspace'
with: [ spec loads: 'Dependent-SUnit-Extensions' ].

spec
baseline: 'ZincHTTPComponents' with: [ spec repository: 'github://svenvc/zinc' ];
project: 'Zinc-Core' copyFrom: 'ZincHTTPComponents' with: [ spec loads: 'Core' ].

spec
baseline: 'Teapot' with: [ spec repository: 'github://zeroflag/Teapot:v2.6.0/source' ];
project: 'Teapot-Deployment' copyFrom: 'Teapot' with: [ spec loads: 'Deployment' ];
project: 'Teapot-Tools' copyFrom: 'Teapot' with: [ spec loads: 'Tools' ].
project: 'Teapot-Deployment' copyFrom: 'Teapot' with: [ spec loads: 'Deployment' ].

spec
baseline: 'JSONWebToken' with: [ spec repository: 'github://noha/JSONWebToken:0.3/source' ];
Expand All @@ -72,7 +76,7 @@ BaselineOfStargate >> setUpDeploymentPackages: spec [
spec
package: 'Stargate-Model' with: [
spec requires:
#( 'Buoy-Deployment' 'Hyperspace-Deployment' 'Teapot-Deployment' 'JSONWebToken-Deployment' )
#( 'Buoy-Deployment' 'Hyperspace-Deployment' 'Zinc-Core' 'Teapot-Deployment' 'JSONWebToken-Deployment' )
];
group: 'Core' with: 'Stargate-Model';
group: 'Deployment' with: 'Stargate-Model'.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,35 +211,33 @@ PetOrdersRESTfulControllerTest >> testCannotUpdateComment [
{ #category : #'tests - comments' }
PetOrdersRESTfulControllerTest >> testCannotUpdateCommentWhenETagDoesNotMatch [

self
withJsonFromContentsIn: self createOrder
do: [ :order |
| response |

self
createCommentFor: order identifiedBy: 1 withContent: 'Hey!';
createCommentFor: order identifiedBy: 1 withContent: 'Mr. DJ'.

self
should: [ resourceController
updateOrderCommentBasedOn:
( self
requestToPUTComment: 'Hola!'
on: order links comments
at: 1
forOrder: 1
conditionalTo: '"XXX"' asETag )
within: self newHttpRequestContext
]
raise: HTTPClientError preconditionFailed.

response := self commentsRelatedTo: order.

self
assert: response isSuccess;
assert: response contentType equals: ZnMimeType textPlain;
assert: response contents equals: '- Hey!<n>- Mr. DJ' expandMacros
]
self withJsonFromContentsIn: self createOrder do: [ :order |
| response |

self
createCommentFor: order identifiedBy: 1 withContent: 'Hey!';
createCommentFor: order identifiedBy: 1 withContent: 'Mr. DJ'.

self
should: [
resourceController
updateOrderCommentBasedOn: ( self
requestToPUTComment: 'Hola!'
on: order links comments
at: 1
forOrder: 1
conditionalTo: '"XXX"' asEntityTag )
within: self newHttpRequestContext
]
raise: HTTPClientError preconditionFailed.

response := self commentsRelatedTo: order.

self
assert: response isSuccess;
assert: response contentType equals: ZnMimeType textPlain;
assert: response contents equals: '- Hey!<n>- Mr. DJ' expandMacros
]
]

{ #category : #'tests - comments' }
Expand Down
Loading

0 comments on commit 6cdc622

Please sign in to comment.