Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Code cleanup: no unnecessary tabs, space and final dots
  • Loading branch information
astares committed Jan 6, 2023
commit 8d93bfab590116bfae6dd397a63e84fed7131280
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
@@ -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
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
utilities
separate: aString right: aCharacter
"Separate from the right side every 3 characters with aCharacter."

| size stream |
size := aString size.
stream := WriteStream on: (String new: 2 * size).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
actions
uppercase
"Use uppercase characters for numbers of base 10 and higher."

self characters: NumbersToCharactersUppercase
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ accessing
at: aKey add: aValue
"Add an association between aKey and aValue. Do not replace existing
values with the same key."

^ self privateAt: aKey put: aValue
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ adding
at: aKey add: aValue
"Add an association between aKey and aValue. Do not replace existing
values with the same key."

^ self privateAt: aKey put: aValue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ private
ordinalize: anInteger
^ (anInteger \\ 100 between: 11 and: 13)
ifTrue: [ 'th' ]
ifFalse: [
ifFalse: [
#('st' 'nd' 'rd')
at: anInteger \\ 10
at: anInteger \\ 10
ifAbsent: [ 'th' ] ]
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ grPackages
| packages package |
packages := Dictionary new.
self class selectors do: [ :each |
(each numArgs = 0 and: [ each ~= #grPackages ]) ifTrue: [
(each numArgs = 0 and: [ each ~= #grPackages ]) ifTrue: [
package := self perform: each.
packages at: package name put: package ] ].
packages do: [ :each | each resolveWith: packages ].
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
dependencies
resolveWith: aDictionary
dependencies := dependencies
dependencies := dependencies
collect: [ :each |
aDictionary at: each ifAbsent: [
"if Foo-Pharo-Bar fails try Foo-Pharo20-Bar and Foo-Pharo30-Bar"
(each indexOfSubCollection: '-Pharo-' startingAt: 1) ~= 0 ifTrue: [
(each indexOfSubCollection: '-Pharo-' startingAt: 1) ~= 0 ifTrue: [
"try -Pharo40-"
aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Pharo40-') ifAbsent: [
"try -Pharo50-"
Expand All @@ -16,7 +16,7 @@ resolveWith: aDictionary
"try -Pharo90-"
aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Pharo90-') ifAbsent: [
"try -Pharo100-"
aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Pharo100-') ifAbsent: [
aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Pharo100-') ifAbsent: [
"try -Squeak-"
aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Squeak-') ifAbsent: [
"try -Squeak5-"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
file library
asMethodReturningString: aByteArrayOrString named: aSymbol
"Generates the source of a method named aSymbol that returns aByteArrayOrString as a String.

This implementation answers a String formatted like so

aSymbol
^ aByteArrayOrString

Subclasses need to override this method if the dialect needs changes to support Unicode string literals"
^ String streamContents: [ :stream |
^ String streamContents: [ :stream |
stream
nextPutAll: aSymbol;
nextPut: Character cr.
stream
tab;
nextPutAll: '^ '''.
aByteArrayOrString greaseString do: [ :each |
aByteArrayOrString greaseString do: [ :each |
each = $' ifTrue: [ stream nextPut: $' ].
stream nextPut: each ].
stream nextPut: $' ]
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ bindingOf: aClass
The binding is the literal that get compiled into the method.
We need the binding to be updated when the class is changed.
The binding has to respond to #value.

This is mostly an issue on GemStone/S because when we hold on
to a class directly we will end up holding on to an old class version.

Dialects with namespaces will need to override this.

On VisualWorks this should like this
^ aClass fullyQualifiedReference"
^ Smalltalk associationAt: aClass name
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
file library
convertToSmalltalkNewlines: aString
"Convert any line endings (CR, CRLF, LF) to the default platform newline."
aString isNil

aString isNil
ifTrue: [ ^ nil ].
^ String streamContents: [ :writeStream |
| readStream |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
files
fileStreamOn: aString do: aBlock binary: aBoolean
self
self
greaseDeprecatedApi: 'GRPlatform>>#fileStreamOn:do:binary:'
details: 'Use readFileStreamOn:do:binary:'.
^ self readFileStreamOn: aString do: aBlock binary: aBoolean
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
processes
isProcessTerminated: aProcess
"Return a boolean indicating whether aProcess has been terminated."

self subclassResponsibility
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version info
label
"Answer a descriptive label string for the platform implementation"

self subclassResponsibility
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
files
localNameOf: aFilename
"Answer the local name of a file identified by an absolute file path.

Eg.
If the platform is Windwos and aFilename is 'C:\Windows\win32.dll' then it would answer 'win32.dll'.
If the platform is Unix and aFilename is '/usr/bin/vim' then it would answer 'vim'."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ newRandom
"Answers the random number generator to be used to create session and continuation keys. Make sure it is seeded. They only methods that will be sent to it are:
#nextInt: - should answer a random integer in the interval [1, anInteger]
#randomFrom: - should answer a random element from the given collection

Make sure that both methods are safe under heavy concurrent load.

Used by Gemstone/S traditional Randoms which cannot be persisted.
Used by Squeak to use a secure random when avaiable."
self subclassResponsibility
Loading