Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 20 additions & 7 deletions .github/workflows/loading-groups.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,31 @@
name: Baseline Groups

on: [push,pull_request,workflow_dispatch]

on:
- push
- pull_request
- workflow_dispatch
jobs:
group-loading:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
smalltalk: [ Pharo64-10 ]
load-spec: [ core, sqlite3, postgres, deployment, dependent-sunit-extensions, tests, tools, development ]
matrix:
smalltalk:
- Pharo64-10
- Pharo64-11
- Pharo64-12
- Pharo64-13
load-spec:
- core
- sqlite3
- postgres
- deployment
- dependent-sunit-extensions
- tests
- tools
- development
name: Baseline Groups / ${{ matrix.smalltalk }} + ${{ matrix.load-spec }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: hpi-swa/setup-smalltalkCI@v1
with:
smalltalk-image: ${{ matrix.smalltalk }}
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/markdown-lint.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
name: Markdown Lint
on: [push,pull_request,workflow_dispatch]
on:
- push
- pull_request
- workflow_dispatch
jobs:
remark-lint:
name: runner / markdownlint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: markdownlint
uses: reviewdog/action-markdownlint@v0.1
with:
Expand Down
17 changes: 11 additions & 6 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
name: Unit Tests

on: [push,pull_request,workflow_dispatch]

on:
- push
- pull_request
- workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
smalltalk: [ Pharo64-10 ]
smalltalk:
- Pharo64-10
- Pharo64-11
- Pharo64-12
- Pharo64-13
name: Unit Tests / ${{ matrix.smalltalk }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Smalltalk CI
uses: hpi-swa/setup-smalltalkCI@v1
with:
Expand All @@ -21,7 +26,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
timeout-minutes: 15
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v5
with:
name: Unit-Tests-${{matrix.smalltalk}}
token: ${{ secrets.CODECOV_TOKEN }}
3 changes: 2 additions & 1 deletion .project
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
'srcDirectory' : 'source'
'srcDirectory' : 'source',
'tags': [ 'Mercap' ]
}
3 changes: 0 additions & 3 deletions .properties

This file was deleted.

1 change: 1 addition & 0 deletions .smalltalkci/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
coverage/*
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) 2022 Mercap Software
Copyright (c) 2022-2025 Mercap Software

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
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ includes as dependencies: Stargate, Sagan, Kepler and Launchpad

[![GitHub release](https://img.shields.io/github/release/mercap/Persistent-API-Skeleton.svg)](https://github.com/mercap/Persistent-API-Skeleton/releases/latest)
[![Pharo 10](https://img.shields.io/badge/Pharo-10-informational)](https://pharo.org)
[![Pharo 11](https://img.shields.io/badge/Pharo-11-informational)](https://pharo.org)
[![Pharo 12](https://img.shields.io/badge/Pharo-12-informational)](https://pharo.org)
[![Pharo 13](https://img.shields.io/badge/Pharo-13-informational)](https://pharo.org)

## Quick links

Expand All @@ -24,7 +27,7 @@ includes as dependencies: Stargate, Sagan, Kepler and Launchpad

## Installation

To load the project in a Pharo image follow this [instructions](docs/how-to/how-to-load-in-pharo.md).
To load the project in a Pharo image follow these [instructions](docs/how-to/how-to-load-in-pharo.md).

## Contributing

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
Class {
#name : #APISkeletonCollectionExtensionsTest,
#superclass : #TestCase,
#category : #'API-Skeleton-Tests'
#name : 'APISkeletonCollectionExtensionsTest',
#superclass : 'TestCase',
#category : 'API-Skeleton-Tests',
#package : 'API-Skeleton-Tests'
}

{ #category : #tests }
{ #category : 'tests' }
APISkeletonCollectionExtensionsTest >> testAssociationArrayAsNeoJSON [

self assert: { 'a' -> 'b' } asNeoJSON a equals: 'b'
self assert: { 'a' -> 'b' } asNeoJSON a equals: 'b'
]

{ #category : #tests }
{ #category : 'tests' }
APISkeletonCollectionExtensionsTest >> testDictionaryAsNeoJSON [

self assert: { #key -> 'value' } asDictionary asNeoJSON key equals: 'value'
self assert: { #key -> 'value' } asDictionary asNeoJSON key equals: 'value'
]
Original file line number Diff line number Diff line change
@@ -1,45 +1,41 @@
Class {
#name : #APISkeletonHTTPClientErrorExtensionsTest,
#superclass : #TestCase,
#pools : [
'JRPCConstantsSharedPool'
],
#category : #'API-Skeleton-Tests'
#name : 'APISkeletonHTTPClientErrorExtensionsTest',
#superclass : 'TestCase',
#category : 'API-Skeleton-Tests',
#package : 'API-Skeleton-Tests'
}

{ #category : #tests }
{ #category : 'tests' }
APISkeletonHTTPClientErrorExtensionsTest >> testHTTPClientErrorAsJRPCResponse [

self
should: [ HTTPClientError badRequest signal: 'Bad Request' ]
raise: HTTPClientError badRequest
withExceptionDo: [ :error |
| response |

response := error asJRPCResponse.
self
assert: response isError;
assert: response error code equals: InternalError;
assert: response error message equals: 'Internal JSON-RPC error.';
assert: (response error data at: 'errorClass') equals: 'HTTPClientError';
assert: (response error data at: 'messageText') equals: 'Bad Request';
assert: (response error data at: 'code') equals: '400'
]
self
should: [ HTTPClientError badRequest signal: 'Bad Request' ]
raise: HTTPClientError badRequest
withExceptionDo: [ :error |
| response |
response := error asJRPCResponse.
self
assert: response isError;
assert: response error code equals: JRPCConstants internalErrorCode;
assert: response error message equals: 'Internal JSON-RPC error.';
assert: ( response error data at: 'errorClass' ) equals: 'HTTPClientError';
assert: ( response error data at: 'messageText' ) equals: 'Bad Request';
assert: ( response error data at: 'code' ) equals: '400'
]
]

{ #category : #tests }
{ #category : 'tests' }
APISkeletonHTTPClientErrorExtensionsTest >> testUnprocessableEntityAsJRPCResponse [

self
should: [ HTTPClientError unprocessableEntity signal: 'Invalid parameter format' ]
raise: HTTPClientError unprocessableEntity
withExceptionDo: [ :error |
| response |

response := error asJRPCResponse.
self
assert: response isError;
assert: response error code equals: InvalidParams;
assert: response error message equals: 'Invalid parameter format'
]
self
should: [ HTTPClientError unprocessableEntity signal: 'Invalid parameter format' ]
raise: HTTPClientError unprocessableEntity
withExceptionDo: [ :error |
| response |
response := error asJRPCResponse.
self
assert: response isError;
assert: response error code equals: JRPCConstants invalidParametersErrorCode;
assert: response error message equals: 'Invalid parameter format'
]
]
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
Class {
#name : #APISkeletonZnUrlExtensionsTest,
#superclass : #TestCase,
#category : #'API-Skeleton-Tests'
#name : 'APISkeletonZnUrlExtensionsTest',
#superclass : 'TestCase',
#category : 'API-Skeleton-Tests',
#package : 'API-Skeleton-Tests'
}

{ #category : #tests }
{ #category : 'tests' }
APISkeletonZnUrlExtensionsTest >> testNotEmpty [

self
assert: 'http://google.com' asUrl notEmpty;
deny: '' asUrl notEmpty
self
assert: 'http://google.com' asUrl notEmpty;
deny: '' asUrl notEmpty
]
Loading