Skip to content

Commit

Permalink
Merge pull request #49 from pharo-rdbms/pharo_10
Browse files Browse the repository at this point in the history
Add Pharo 10 support
  • Loading branch information
tblanchard authored Apr 18, 2022
2 parents 4d5ebe4 + fdfb3ef commit 9318ee4
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 25 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
6 changes: 3 additions & 3 deletions .github/workflows/postgreSQL-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ jobs:
strategy:
fail-fast: false
matrix:
smalltalk: [ Pharo64-8.0, Pharo64-9.0 ]
rdbms: [ PostgreSQLv10, PostgreSQLv11, PostgreSQLv12, PostgreSQLv13 ]
smalltalk: [ Pharo64-8.0, Pharo64-9.0, Pharo64-10 ]
rdbms: [ PostgreSQLv10, PostgreSQLv11, PostgreSQLv12, PostgreSQLv13, PostgreSQLv14 ]
name: ${{ matrix.smalltalk }} + ${{ matrix.rdbms }}
steps:
- uses: actions/checkout@v2
Expand All @@ -22,7 +22,7 @@ jobs:
with:
smalltalk-image: ${{ matrix.smalltalk }}
- name: Load Image and Run Integration Tests
run: smalltalkci -s ${{ matrix.smalltalk }} .PostgreSQL.ston
run: smalltalkci -s ${{ matrix.smalltalk }} .smalltalkci/.PostgreSQL.ston
timeout-minutes: 15
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sqlite3-integration-tests.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-8.0, Pharo64-9.0 ]
smalltalk: [ Pharo64-8.0, Pharo64-9.0, Pharo64-10 ]
name: ${{ matrix.smalltalk }}
steps:
- uses: actions/checkout@v2
Expand All @@ -19,7 +19,7 @@ jobs:
with:
smalltalk-image: ${{ matrix.smalltalk }}
- name: Load Image and Run Integration Tests
run: smalltalkci -s ${{ matrix.smalltalk }} .SQLite3.ston
run: smalltalkci -s ${{ matrix.smalltalk }} .smalltalkci/.SQLite3.ston
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
timeout-minutes: 15
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unit-tests.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-8.0, Pharo64-9.0 ]
smalltalk: [ Pharo64-8.0, Pharo64-9.0, Pharo64-10 ]
name: ${{ matrix.smalltalk }}
steps:
- uses: actions/checkout@v2
Expand All @@ -17,7 +17,7 @@ jobs:
with:
smalltalk-image: ${{ matrix.smalltalk }}
- name: Load Image and Run Unit Tests
run: smalltalkci -s ${{ matrix.smalltalk }} $GITHUB_WORKSPACE/.unit.ston
run: smalltalkci -s ${{ matrix.smalltalk }} .smalltalkci/.unit.ston
timeout-minutes: 10
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions .PostgreSQL.ston → .smalltalkci/.PostgreSQL.ston
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ SmalltalkCISpec {
#loading : [
SCIMetacelloLoadSpec {
#baseline : 'Glorp',
#directory : '',
#directory : '..',
#load : [ 'Tests' ],
#platforms : [ #pharo ]
},
Expand All @@ -15,7 +15,7 @@ SmalltalkCISpec {
}
],
#postLoading : [
'scripts/setupP3AsDatabaseDriver.st'
'../scripts/setupP3AsDatabaseDriver.st'
],
#testing : {
#coverage : {
Expand Down
4 changes: 2 additions & 2 deletions .SQLite3.ston → .smalltalkci/.SQLite3.ston
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ SmalltalkCISpec {
#loading : [
SCIMetacelloLoadSpec {
#baseline : 'Glorp',
#directory : '',
#directory : '..',
#load : [ 'Tests' ],
#platforms : [ #pharo ]
},
Expand All @@ -15,7 +15,7 @@ SmalltalkCISpec {
}
],
#postLoading : [
'scripts/setupSQLite3AsDatabaseDriver.st'
'../scripts/setupSQLite3AsDatabaseDriver.st'
],
#testing : {
#coverage : {
Expand Down
2 changes: 1 addition & 1 deletion .unit.ston → .smalltalkci/.unit.ston
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ SmalltalkCISpec {
#loading : [
SCIMetacelloLoadSpec {
#baseline : 'Glorp',
#directory : '',
#directory : '..',
#load : [ 'CI' ],
#platforms : [ #pharo ]
}
Expand Down
8 changes: 7 additions & 1 deletion BaselineOfGlorp/BaselineOfGlorp.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ BaselineOfGlorp >> baseline: spec [
package: 'Glorp';
group: 'Core' with: 'Glorp';

package: 'Glorp-Unit-Tests' with: [ spec requires: 'Glorp' ];
package: 'Glorp-Unit-Tests' with: [ spec requires: 'Core' ];
group: 'Tests' with: 'Glorp-Unit-Tests';
group: 'CI' with: 'Glorp-Unit-Tests';

Expand All @@ -23,6 +23,12 @@ BaselineOfGlorp >> baseline: spec [

"This keeps backwards compatibility for people loading Glorp-Tests"
spec group: 'Glorp-Tests' with: 'Tests'
].
spec
for: #'pharo10.x'
do: [ spec
package: 'Glorp-Pharo10';
group: 'Core' with: 'Glorp-Pharo10'
]
]

Expand Down
7 changes: 7 additions & 0 deletions Glorp-Pharo10/String.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Extension { #name : #String }

{ #category : #'*Glorp-Pharo10' }
String >> convertToEncoding: encodingName [

^ self encodeWith: encodingName
]
1 change: 1 addition & 0 deletions Glorp-Pharo10/package.st
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Package { #name : #'Glorp-Pharo10' }
3 changes: 1 addition & 2 deletions Glorp/Dialect.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Class {
'lastSystemTime',
'lastServerTime'
],
#category : 'Glorp-Exceptions'
#category : #'Glorp-Exceptions'
}

{ #category : #dates }
Expand Down Expand Up @@ -249,7 +249,6 @@ Dialect class >> readFixedPointFrom: aString [
Dialect class >> reset [
"self reset"
lookedUpNames := nil.
identitySetClass := nil.
timestampClass := nil.
dialectName := nil
]
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) 2017-2021 Pharo RDBMS Contributors
Copyright (c) 2017-2022 Pharo RDBMS 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
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# GLORP

[![Unit Tests](https://github.com/pharo-rdbms/glorp/workflows/Unit%20Tests/badge.svg?branch=master)](https://github.com/pharo-rdbms/glorp/actions?query=workflow%3AUnit%20Tests)
[![PostgreSQL Tests](https://github.com/pharo-rdbms/glorp/workflows/PostgreSQL%20Integration%20Tests/badge.svg?branch=master)](https://github.com/pharo-rdbms/glorp/actions?query=workflow%3APostgreSQL%20Integration%20Tests)
[![SQLite3 Tests](https://github.com/pharo-rdbms/glorp/workflows/SQLite3%20Integration%20Tests/badge.svg?branch=master)](https://github.com/pharo-rdbms/glorp/actions?query=workflow%3ASQLite3%20Integration%20Tests)
[![Unit Tests](https://github.com/pharo-rdbms/glorp/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/pharo-rdbms/glorp/actions/workflows/unit-tests.yml)
[![PostgreSQL Integration Tests](https://github.com/pharo-rdbms/glorp/actions/workflows/postgreSQL-integration-tests.yml/badge.svg)](https://github.com/pharo-rdbms/glorp/actions/workflows/postgreSQL-integration-tests.yml)
[![SQLite3 Integration Tests](https://github.com/pharo-rdbms/glorp/actions/workflows/sqlite3-integration-tests.yml/badge.svg)](https://github.com/pharo-rdbms/glorp/actions/workflows/sqlite3-integration-tests.yml)
[![Coverage Status](https://codecov.io/github/pharo-rdbms/glorp/coverage.svg?branch=master)](https://codecov.io/gh/pharo-rdbms/glorp/branch/master)

[![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)

## Generic Lightweight Object Relational Persistence (for Pharo)

Expand Down
12 changes: 6 additions & 6 deletions scripts/setup-PostgreSQL.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env bash

readonly DOCKER_IMAGE_VERSION=$(echo "$RDBMS" | cut --complement -c -11)
docker run -d -p 127.0.0.1:5432:5432 \
-e POSTGRES_PASSWORD=secret \
-e POSTGRES_USER=postgres \
-e POSTGRES_DB=test \
postgres:"$DOCKER_IMAGE_VERSION"
DOCKER_IMAGE_VERSION=$(echo "$RDBMS" | cut --complement -c -11)
docker run -d -p 127.0.0.1:5432:5432 \
-e POSTGRES_PASSWORD=secret \
-e POSTGRES_USER=postgres \
-e POSTGRES_DB=test \
postgres:"$DOCKER_IMAGE_VERSION"

0 comments on commit 9318ee4

Please sign in to comment.