X Tutup
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
514c8cd
More file ops (#139)
Jul 23, 2022
bef0ac1
added Pharo11 as experimental to CI builds, dropping tests and suppor…
Jul 23, 2022
52103f6
Remove pharo5.x from BaselineOfGrease
Jul 23, 2022
2a4832c
declare Grease version 1.10
Jul 23, 2022
b00facf
Add base 64 encoding support
marschall Aug 20, 2022
61c4c8d
Add more Pharo and Squeak implementations
marschall Aug 25, 2022
a0cbf94
Add #asMethodReturningString:named:
marschall Aug 21, 2022
d05db98
Add unit tests for string methods
marschall Aug 23, 2022
6c7f37d
Add GemStone implementation
marschall Aug 26, 2022
6106bc7
correct gemstone implementation of base64Encode
Aug 26, 2022
3760bc7
Merge pull request #140 from marschall/base64Encode
Aug 26, 2022
ae6a114
Avoid copies in GRPharoZnCodecStream
marschall Aug 21, 2022
c75b7d4
Add lost #asString
marschall Aug 29, 2022
97f4638
Fixes for Squeak 6
marschall Aug 31, 2022
a6140fe
Merge pull request #145 from marschall/squeak6-fixes
Sep 1, 2022
51eb6fa
Merge pull request #144 from marschall/GRPharoZnCodecStream-nextPutAll
Sep 1, 2022
63c9f37
Copy license file from Seaside repository
marschall Oct 19, 2022
2e0f80d
Merge pull request #151 from marschall/add-license-file
Nov 13, 2022
8d93bfa
Code cleanup: no unnecessary tabs, space and final dots
astares Jan 6, 2023
c5b7265
Merge pull request #153 from astares/152-Code-Cleanup-unncessarySepar…
Jan 21, 2023
bd1f46b
Add pharo 11 to baseline (also cleanup code critics on baseline)
Jan 21, 2023
3e21012
update github action CI spec
Jan 21, 2023
20fa768
Remove Manifest file again. Causes load issue on Squeak?
Jan 21, 2023
4c3a46b
Merge 3e2101200cd766d90d33047dc271e83090d94fc5
Jan 21, 2023
92748db
Merge pull request #155 from SeasideSt/pharo11
Jan 21, 2023
40af9b6
added coveralls
Jan 22, 2023
20488d2
add GITHUB-TOKEN for smalltalkCI
Jan 22, 2023
5d8ca63
remove GRPrinter>>packageNamesUnderTest
Jan 22, 2023
147ff34
only test categories
Jan 22, 2023
1615f97
use smalltalkCI branch with patch
Jan 22, 2023
ade5ebc
correct yml
Jan 22, 2023
86bdda4
Prevent installing code coverage wrappers where this breaks the tests
Jan 22, 2023
799ddb5
Merge ade5ebce2accd5e54cc7e30f9a9a794f987f87d0
Jan 22, 2023
7e1b559
platform method is used in tests where wrapping for code coverage tra…
Jan 22, 2023
0fea051
Fix wrappers
Jan 22, 2023
9511f4a
fix wrappers
Jan 22, 2023
3561050
try...
Jan 22, 2023
6f40abe
switch to codecov
Jan 23, 2023
f20aec6
add codecov badge
Jan 23, 2023
270f670
add ignore coverage to other packages as well
Jan 23, 2023
f28482f
also Squeak
Jan 23, 2023
191126a
more missing
Jan 23, 2023
45332f2
add Squeak 6 to build (experimental)
Feb 5, 2023
b9295e5
drop Squeak 5.2 and Squeak 5.1
Feb 5, 2023
bbcb179
Merge pull request #156 from SeasideSt/coveralls
Feb 5, 2023
09c5d67
deprecate `beginsWithSubCollection:` and `endsWithSubCollection:` in …
Feb 5, 2023
5a570b8
Fix testNotPortableCollectionsRule
Feb 5, 2023
8ff1ded
add greaseBeginsWith: and greaseEndsWith: to Pharo 7 and 9 as well
Feb 5, 2023
7584246
add greaseBeginsWith: and greaseEndsWith: to Squeak
Feb 5, 2023
a17f250
code style
Feb 5, 2023
3688183
Fix slime rule in Pharo 7 and 9
Feb 5, 2023
e6ba7bd
adapt slime rule in Squeak as well
Feb 5, 2023
955fa54
added deprecation message in Pharo 9 and Squeak 6
Feb 5, 2023
6d08b16
Merge pull request #157 from SeasideSt/emptySubCollectionMethods
Mar 4, 2023
7d0ca70
switch to gsdevkit_stones SmalltalkCI
Mar 26, 2023
659948d
remove use of own fork of smalltalkCI
Mar 26, 2023
15a78fa
Merge pull request #159 from SeasideSt/gsdevkit_stones
Mar 26, 2023
512aaeb
Debugger opening in Pharo: fix for use in Pharo 11 and remove old cod…
Mar 26, 2023
d0270d7
Merge 15a78fa006bc20c3d520b5cd687e02698d4f0ae4
Mar 26, 2023
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
44 changes: 12 additions & 32 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,50 +3,30 @@ name: smalltalkCI
on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-18.04
test:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
smalltalk: [ Pharo64-10, Pharo64-9.0, Pharo64-8.0, Pharo64-7.0, Pharo-6.1, GemStone64-3.6.3, GemStone64-3.5.7, GemStone64-3.4.5, GemStone64-3.3.9, GemStone64-3.2.17, GemStone64-3.1.0.6, Squeak64-5.3, Squeak64-5.2, Squeak64-5.1 ]
smalltalk: [ Pharo64-11, Pharo64-10, Pharo64-9.0, Pharo64-8.0, Pharo64-7.0, GemStone64-3.6.5, GemStone64-3.5.7, Squeak64-5.3 ]
experimental: [ false ]
include:
- smalltalk: Squeak64-trunk
- smalltalk: Squeak64-6.0
experimental: true
continue-on-error: ${{ matrix.experimental }}
name: ${{ matrix.smalltalk }}
steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%dT%H:%M:%S')"
- name: Log date
run: echo "${{ steps.date.outputs.date }}"
- name: Set default run status
run: echo "::set-output name=last_run_status::default" > last_run_status
- name: Restore last run status
id: last_run
uses: actions/cache@v2
with:
path: |
last_run_status
key: ${{ github.run_id }}-${{ matrix.smalltalk }}-${{ steps.date.outputs.date }}
restore-keys: |
${{ github.run_id }}-${{ matrix.smalltalk }}-
- name: Set last run status
id: last_run_status
run: cat last_run_status
- uses: actions/checkout@v2
with:
ref: ${{ github.event.workflow_dispatch.ref }}
- uses: hpi-swa/setup-smalltalkCI@v1
- uses: actions/checkout@v3
- uses: dalehenrich/setup-smalltalkCI@solo
with:
smalltalk-image: ${{ matrix.smalltalk }}
- name: Run tests
id: test_run
if: steps.last_run_status.outputs.last_run_status != 'success'
run: smalltalkci -s ${{ matrix.smalltalk }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
timeout-minutes: 20
- name: Save run status
if: steps.last_run_status.outputs.last_run_status != 'success'
run: echo "::set-output name=last_run_status::${{ steps.test_run.outcome }}" > last_run_status
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
name: ${{ matrix.smalltalk }}
12 changes: 11 additions & 1 deletion .smalltalk.ston
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,15 @@ SmalltalkCISpec {
#load : [ 'Tests' ],
#platforms : [ #gemstone ]
}
]
],
#testing : {
#defaultTimeout : 30,
#include : {
#classes : [ #SentButNotImplementedTest , #UndefinedSymbolsTest ]
},
#coverage : {
#packages: [ 'Grease*' ],
#format: #lcov
}
}
}
24 changes: 24 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# MIT License

Copyright © 2001 –- 2009 Avi Bryant, Julian Fitzell
Copyright © 2007 –- 2009 Lukas Renggli, Michel Bany, Philippe Marschall
Copyright © Seaside Contributors https://github.com/SeasideSt/Seaside/wiki/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 in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Grease is widely adopted. Implementations exist already for all platforms that s

## Platform compatibility

The latest Grease version is supported on the Pharo and GemStone/S platforms and versions tested in the SmalltalkCI workflow in Github Actions: [![smalltalkCI](https://github.com/SeasideSt/Grease/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/SeasideSt/Grease/actions/workflows/ci.yml)
The latest Grease version is supported on the Pharo and GemStone/S platforms and versions tested in the SmalltalkCI workflow in Github Actions: [![smalltalkCI](https://github.com/SeasideSt/Grease/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/SeasideSt/Grease/actions/workflows/ci.yml) [![codecov](https://codecov.io/gh/SeasideSt/Grease/branch/master/graph/badge.svg?token=75NIYAHAGI)](https://codecov.io/gh/SeasideSt/Grease)

## Installation

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
baselines
baselinePharo: spec

spec
for: #(#'pharo5.x')
do: [ spec
package: 'Grease-Core' with: [ spec includes: #('Grease-Pharo30-Core') ];
package: 'Grease-Tests-Pharo-Core' with: [ spec requires: #('Grease-Tests-Core') ];
package: 'Grease-Tests-Core'
with: [ spec
requires: #('Grease-Pharo30-Core');
includes: #('Grease-Tests-Pharo-Core') ];
package: 'Grease-Pharo30-Core' with: [ spec requires: #('Grease-Core') ] ].

spec
for: #'pharo6.x'
do: [ spec
Expand All @@ -36,7 +25,7 @@ baselinePharo: spec

spec
for: #(#'pharo6.x' #'pharo7.x' #'pharo8.x')
do: [
do: [
spec
package: 'Grease-Pharo40-Slime' with: [ spec requires: #('Grease-Core') ];
package: 'Grease-Tests-Slime' with: [ spec requires: #('Grease-Pharo40-Slime') ].
Expand All @@ -46,7 +35,7 @@ baselinePharo: spec

spec
for: #(#'pharo9.x')
do: [
do: [
spec
package: 'Grease-Core' with: [ spec includes: #('Grease-Pharo90-Core') ];
package: 'Grease-Tests-Pharo-Core' with: [ spec requires: #('Grease-Tests-Core') ];
Expand All @@ -61,10 +50,10 @@ baselinePharo: spec
spec
group: 'Slime' with: #('Grease-Pharo90-Slime');
group: 'Slime Tests' with: #('Grease-Tests-Slime') ].

spec
for: #(#'pharo10.x')
do: [
for: #(#'pharo10.x' #'pharo11.x')
do: [
spec
package: 'Grease-Core' with: [ spec includes: #('Grease-Pharo100-Core') ];
package: 'Grease-Tests-Pharo-Core' with: [ spec requires: #('Grease-Tests-Core') ];
Expand All @@ -78,4 +67,4 @@ baselinePharo: spec

spec
group: 'Slime' with: #('Grease-Pharo90-Slime');
group: 'Slime Tests' with: #('Grease-Tests-Slime') ].
group: 'Slime Tests' with: #('Grease-Tests-Slime') ]
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
SystemOrganization addCategory: #BaselineOfGrease!
SystemOrganization addCategory: #'BaselineOfGrease-Manifest'!
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ instance creation
forEncoding: aString
"Answer a new codec instance for the given encoding name. Raise an WAUnsupportedEncodingError if the encoding name is not supported by this image."

self allSubclassesDo: [ :each |
self allSubclassesDo: [ :each |
(each supportsEncoding: aString)
ifTrue: [ ^ each basicForEncoding: aString ] ].
^ self unsupportedEncoding: aString
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
conversion
decoderFor: aReadStream
"Wrap aReadStream with an decoder for the codec of the receiver. Answer a read stream that delegates to and shares the state of aReadStream."
"Wrap aReadStream with an decoder for the codec of the receiver. Answer a read stream that delegates to and shares the state of aReadStream."

self subclassResponsibility
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
conversion
encoderFor: aWriteStream
"Wrap aWriteStream with an encoder for the codec of the receiver. Answer a write stream that delegates to and shares the state of aWriteStream."

self subclassResponsibility
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
instance creation
receiver: anObject selector: aSymbol
^ self basicNew
receiver: anObject selector: aSymbol
^ self basicNew
initializeWithReceiver: anObject
message: (GRUnboundMessage selector: aSymbol);
yourself
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
instance creation
receiver: anObject selector: aSymbol arguments: anArray
^ self basicNew
receiver: anObject selector: aSymbol arguments: anArray
^ self basicNew
initializeWithReceiver: anObject
message: (GRBoundMessage selector: aSymbol arguments: anArray);
yourself
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
accessing
argumentCount
"Answer the number of arguments that must be provided to the receiver when sending it."

^ message argumentCount
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
delegation
argumentCount
"Answer the number of arguments that must be provided when sending this message."

self subclassResponsibility
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ delegation
valueFor: receiver withArguments: anArray
"Send the message to receiver with the arguments in anArray. Answer the result.
Signal an error if the number of arguments does not match the selector."

^ self basicPerformFor: receiver withArguments: (self mergeArguments: anArray)
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ valueFor: receiver withPossibleArguments: anArray

| allArguments |
allArguments := self mergeArguments: anArray.

^ allArguments size < selector numArgs
ifTrue: [ self invalidArgumentCount ]
ifFalse: [ self basicPerformFor: receiver withArguments: (allArguments first: selector numArgs) ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
position: anInteger
^ stream position: anInteger
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
instance creation
block: aBlock next: aPrinter
^ self new
^ self new
block: aBlock;
next: aPrinter;
yourself
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
evaluating
use: anObject during: aBlock
"Set the dynamic value of the receiver to anObject during the evaluation of aBlock."

^ aBlock on: self do: [ :notification | notification resume: anObject ]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
evaluating
value
"Answer the dynamic value of the receiver."

^ self signal
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
conversion
decoderFor: aReadStream
decoderFor: aReadStream
"wrap to avoid String vs ByteArray issues"
^ GRNullCodecStream on: aReadStream
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
conversion
encoderFor: aWriteStream
encoderFor: aWriteStream
"wrap to avoid String vs ByteArray issues"
^ GRNullCodecStream on: aWriteStream
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
accessing
url
"The selfish method. Let's do it with ourselves."

^ self
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
accessing
accuracy: aFloat
"Round towards the nearest number that is a multiple of aFloat."

accuracy := aFloat
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ digitsOf: aNumber base: aBaseInteger
stream := WriteStream on: (String new: 10).
[ integer > 0 ] whileTrue: [
next := integer quo: aBaseInteger.
stream nextPut: (characters
stream nextPut: (characters
at: 1 + integer - (next * aBaseInteger)).
integer := next ].
^ stream contents reverse
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
accessing
infinite: aString
"The string that should be displayed if the number is positive or negative infinity."

infinite := aString
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ lengthOf: aNumber base: aBaseInteger
integer := aNumber truncated abs.
length := 1.
current := aBaseInteger.
[ current <= integer ] whileTrue: [
[ current <= integer ] whileTrue: [
length := length + 1.
current := current * aBaseInteger ].
^ length
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
accessing
nan: aString
"The string that should be displayed if the number is not a number."

nan := aString
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
accessing
precision: anInteger
"The number of digits to be printed in the fraction part."

precision := anInteger
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ printing
print: aNumber on: aStream
aNumber isNaN
ifTrue: [ ^ self printNaN: aNumber on: aStream ].
aNumber isInfinite
aNumber isInfinite
ifTrue: [ ^ self printInfinite: aNumber on: aStream ].
precision = 0
ifTrue: [ self printInteger: aNumber on: aStream ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ printDigitsOf: aNumber withLength: aLengthInteger on: aStream
| divisor current |
divisor := base raisedTo: aLengthInteger - index.
current := rest // divisor.
separator isNil ifFalse: [
separator isNil ifFalse: [
(index ~= 1 and: [ (aLengthInteger - index) \\ 3 = 2 ])
ifTrue: [ aStream nextPut: separator ] ].
aStream nextPut: (characters at: current + 1).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ printing
printInteger: aNumber on: aStream
| length |
length := self lengthOf: aNumber base: base.

(digits notNil and: [ padding notNil ])
ifTrue: [ self padLeft: padding to: (digits - length) on: aStream ].

self printDigitsOf: aNumber withLength: length on: aStream
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
utilities
separate: aString left: aCharacter on: aStream
"Separate from the left side every 3 characters with aCharacter."

| size |
size := aString size.
1 to: size do: [ :index |
Expand Down
Loading
X Tutup