Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/GsDevKit/Grease
Browse files Browse the repository at this point in the history
  • Loading branch information
dalehenrich committed Apr 1, 2024
2 parents d7b88fe + 042a0a0 commit fc89d8b
Show file tree
Hide file tree
Showing 292 changed files with 1,600 additions and 311 deletions.
5 changes: 3 additions & 2 deletions repository/BaselineOfGrease.package/.filetree
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"noMethodMetaData" : true,
"separateMethodMetaAndSource" : false,
"useCypressPropertiesFile" : true }
"noMethodMetaData" : true,
"useCypressPropertiesFile" : true
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
baselines
baselineCommon: spec

spec
for: #common
do: [ spec blessing: #baseline.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
baselines
baselineGemStone: spec

spec
for: #'gemstone'
do: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ baselinePharo: spec
requires: #('Grease-Pharo100-Core');
includes: #('Grease-Tests-Pharo-Core') ];
package: 'Grease-Pharo100-Core' with: [ spec requires: #('Grease-Core') ];
package: 'Grease-Pharo90-Slime' with: [ spec requires: #('Grease-Core') ];
package: 'Grease-Tests-Slime' with: [ spec requires: #('Grease-Pharo90-Slime') ].
package: 'Grease-Pharo110-Slime' with: [ spec requires: #('Grease-Core') ];
package: 'Grease-Tests-Pharo-Slime' with: [ spec requires: #('Grease-Pharo110-Slime') ].

spec
group: 'Slime' with: #('Grease-Pharo90-Slime');
group: 'Slime Tests' with: #('Grease-Tests-Slime') ]
group: 'Slime' with: #('Grease-Pharo110-Slime');
group: 'Slime Tests' with: #('Grease-Tests-Pharo-Slime') ]
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,7 @@ baselineSqueak: spec
package: 'Grease-Tests-Squeak-Core'
with: [ spec requires: #('Grease-Tests-Core') ];
package: 'Grease-Tests-Squeak5-Core'
with: [ spec requires: #('Grease-Tests-Squeak-Core') ];
package: 'Grease-Slime'
with: [ spec requires: #('Refactoring-Core' 'Grease-Core') ];
package: 'Grease-Tests-Slime'
with: [ spec requires: #('Grease-Slime') ].
spec
group: 'Slime' with: #('Grease-Slime');
group: 'Slime Tests' with: #('Grease-Tests-Slime') ].
with: [ spec requires: #('Grease-Tests-Squeak-Core') ] ].
spec
for: #(#'squeak6.x')
do: [
Expand All @@ -52,11 +45,4 @@ baselineSqueak: spec
package: 'Grease-Tests-Squeak-Core'
with: [ spec requires: #('Grease-Tests-Core') ];
package: 'Grease-Tests-Squeak6-Core'
with: [ spec requires: #('Grease-Tests-Squeak-Core') ];
package: 'Grease-Slime'
with: [ spec requires: #('Refactoring-Core' 'Grease-Core') ];
package: 'Grease-Tests-Slime'
with: [ spec requires: #('Grease-Slime') ].
spec
group: 'Slime' with: #('Grease-Slime');
group: 'Slime Tests' with: #('Grease-Tests-Slime') ]
with: [ spec requires: #('Grease-Tests-Squeak-Core') ] ]
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
{
"category" : "BaselineOfGrease",
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "",
"instvars" : [
],
"name" : "BaselineOfGrease",
"pools" : [
],
"super" : "BaselineOf",
"type" : "normal" }
"category" : "BaselineOfGrease",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [ ],
"name" : "BaselineOfGrease",
"type" : "normal"
}
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
SystemOrganization addCategory: #BaselineOfGrease!
SystemOrganization addCategory: #'BaselineOfGrease-Manifest'!
3 changes: 1 addition & 2 deletions repository/BaselineOfGrease.package/properties.json
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
{
}
{ }
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ resolveWith: aDictionary
aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Pharo90-') ifAbsent: [
"try -Pharo100-"
aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Pharo100-') ifAbsent: [
"try -Squeak-"
aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Squeak-') ifAbsent: [
"try -Squeak5-"
aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Squeak5-') ifAbsent: [
"try -Squeak6-"
aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Squeak6-') ifAbsent: [
"specific for Grease-Slime"
aDictionary at: (each copyReplaceAll: 'Grease-Pharo-Slime' with: 'Grease-Slime') ifAbsent: [
self error: self name printString , ' depends on unknown package ' , each printString ] ] ] ] ] ] ] ] ] ] ] ] ]
"try -Pharo110-"
aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Pharo110-') ifAbsent: [
"try -Squeak-"
aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Squeak-') ifAbsent: [
"try -Squeak5-"
aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Squeak5-') ifAbsent: [
"try -Squeak6-"
aDictionary at: (each copyReplaceAll: '-Pharo-' with: '-Squeak6-') ifAbsent: [
"specific for Grease-Slime"
aDictionary at: (each copyReplaceAll: 'Grease-Pharo-Slime' with: 'Grease-Slime') ifAbsent: [
self error: self name printString , ' depends on unknown package ' , each printString ] ] ] ] ] ] ] ] ] ] ] ] ] ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
files
newTemporaryFile
"Create a new temporary file in the systems temp directory and answer its pathString.
It is the users responsibility to delete or move the file, it will not be cleaned up automatically
(unless the host system has a policy for it)."
^ self subclassResponsibility
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
files
newTemporaryFileNamed: aName
"Create a new temporary file in the systems temp directory and answer its pathString.
It is the users responsibility to delete or move the file, it will not be cleaned up automatically
(unless the host system has a policy for it)."
self subclassResponsibility

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
files
sizeOfFile: aString

self subclassResponsibility
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ version info
version
"Answer the Grease version"

^ (GRVersion major: 1 minor: 12 revision: 2)
^ (GRVersion major: 1 minor: 16 revision: 0)
yourself
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
encoding
base64Encode: aByteArray
^ (Base64MimeConverter mimeEncode: aByteArray readStream) contents
^ (Base64MimeConverter mimeEncode: aByteArray readStream) contents
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
file-library
files
contentsOfFile: aString binary: aBoolean
^ self fileStreamOn: aString do: [ :stream | stream contents ] binary: aBoolean
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
files
deleteFile: aPathString

GsFile removeServerFile: aPathString
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
file-library
files
directoriesIn: aPathString
"Answer a collection of absolute paths for all the directories (no files) in the directory given by aPathString
must not include directory names that start with ."
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
file-library
files
ensureExistenceOfFolder: aString
"creates a folder named aString in the default server directory"
ServerFileDirectory default assureExistenceOfPath: aString
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
file-library
files
fileExists: aString
^ GsFile existsOnServer: aString
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
file-library
files
filesIn: aPathString
"Return a collection of absolute paths for all the files (no directories) in the directory given by aPathString
must not include file names that start with ."
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
file-library
files
localNameOf: aFilename
^(ServerFileDirectory on: aFilename) localName
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
files
newTemporaryFile

^ self newTemporaryFileNamed: UUID new greaseString
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
files
newTemporaryFileNamed: aName

| fileName |
fileName := GRPlatform current pathSeparator,'tmp', GRPlatform current pathSeparator, aName.
(self fileExists: fileName) ifTrue: [ GRError new signal: 'A (temporary) file with name ', aName, ' already exists.' ].
^ (GsFile openWriteOnServer: fileName) pathName
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
file-library
files
pathSeparator
^ FileDirectory pathNameDelimiter asString
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
file-library
files
readFileStreamOn: aString do: aBlock binary: aBoolean
| stream dir file |
[
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
files
sizeOfFile: aPathString

^ GsFile sizeOfOnServer: aPathString
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
file-library
files
write: aStringOrByteArray toFile: aFileNameString inFolder: aFolderString
"writes aStringOrByteArray to a file named aFilenameString in the folder aFolderString"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
file-library
files
writeFileStreamOn: fileName do: aBlock binary: isBinary
| stream |
stream := BinaryOrTextFile open: fileName mode: 'w+b' onClient: false.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
files
newTemporaryFile

^ self newTemporaryFileNamed: UUID new greaseString
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
files
newTemporaryFileNamed: aName

| newFile |
newFile := FileLocator temp / aName.
newFile exists ifTrue: [ GRError new signal: 'A (temporary) file with name ', aName, ' already exists.' ].
^ newFile pathString
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ newTemporaryFileReference
It is the users responsibility to delete or move the file,
it will not be cleaned up automatically (unless the host system
has a policy for it)."
self
greaseDeprecatedApi: 'GRPlatform>>newTemporaryFileReference'
details: 'Use newTemporaryFile'.
^ self newTemporaryFileReferenceNamed: UUID new asString
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ newTemporaryFileReferenceNamed: aName
It is the users responsibility to delete or move the file,
it will not be cleaned up automatically (unless the host system
has a policy for it)."
self
greaseDeprecatedApi: 'GRPlatform>>newTemporaryFileReferenceNamed:'
details: 'Use newTemporaryFileNamed:'.
^ FileLocator temp / aName
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
files
sizeOfFile: aString

^ aString asFileReference size
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SystemOrganization addCategory: #'Grease-Pharo100-Core'!
self packageOrganizer ensurePackage: #'Grease-Pharo100-Core' withTags: #()!
5 changes: 5 additions & 0 deletions repository/Grease-Pharo110-Slime.package/.filetree
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"separateMethodMetaAndSource" : false,
"noMethodMetaData" : true,
"useCypressPropertiesFile" : true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
group

^ 'ANSI Compatibility'
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
initialization
initialize

super initialize.
self
replace: '``@expr1 and: [ | `@temp2 | ``@expr2 ] and: [ | `@temp3 | ``@expr3 ]'
with: '``@expr1 and: [ | `@temp2 | ``@expr2 and: [ | `@temp3 | ``@expr3 ] ]';
replace: '``@expr1 and: [ | `@temp2 | ``@expr2 ] and: [ | `@temp3 | ``@expr3 ] and: [ | `@temp4 | ``@expr4 ]'
with: '``@expr1 and: [ | `@temp2 | ``@expr2 and: [ | `@temp3 | ``@expr3 and: [ | `@temp4 | ``@expr4 ] ] ]';
replace: '``@expr1 and: [ | `@temp2 | ``@expr2 ] and: [ | `@temp3 | ``@expr3 ] and: [ | `@temp4 | ``@expr4 ] and: [ | `@temp5 | ``@expr5 ]'
with: '``@expr1 and: [ | `@temp2 | ``@expr2 and: [ | `@temp3 | ``@expr3 and: [ | `@temp4 | ``@expr4 and: [ | `@temp5 | ``@expr5 ] ] ] ]';
replace: '``@expr1 or: [ | `@temp2 | ``@expr2 ] or: [ | `@temp3 | ``@expr3 ]'
with: '``@expr1 or: [ | `@temp2 | ``@expr2 or: [ | `@temp3 | ``@expr3 ] ]';
replace: '``@expr1 or: [ | `@temp2 | ``@expr2 ] or: [ | `@temp3 | ``@expr3 ] or: [ | `@temp4 | ``@expr4 ]'
with: '``@expr1 or: [ | `@temp2 | ``@expr2 or: [ | `@temp3 | ``@expr3 or: [ | `@temp4 | ``@expr4 ] ] ]';
replace: '``@expr1 or: [ | `@temp2 | ``@expr2 ] or: [ | `@temp3 | ``@expr3 ] or: [ | `@temp4 | ``@expr4 ] or: [ | `@temp5 | ``@expr5 ]'
with: '``@expr1 or: [ | `@temp2 | ``@expr2 or: [ | `@temp3 | ``@expr3 or: [ | `@temp4 | ``@expr4 or: [ | `@temp5 | ``@expr5 ] ] ] ]';
replace: '``@expr1 or: [ | `@temp2 | ``@expr2 ] or: [ | `@temp3 | ``@expr3 ] or: [ | `@temp4 | ``@expr4 ] or: [ | `@temp5 | ``@expr5 ] or: [ | `@temp6 | ``@expr6 ]'
with: '``@expr1 or: [ | `@temp2 | ``@expr2 or: [ | `@temp3 | ``@expr3 or: [ | `@temp4 | ``@expr4 or: [ | `@temp5 | ``@expr5 or: [ | `@temp6 | ``@expr6 ] ] ] ] ]'
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
name

^ 'Booleans'
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
rationale

^ '#and:and: and #or:or: are not ANSI compatible.'
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"commentStamp" : "",
"super" : "GRSlimeTransformationRule",
"category" : "Grease-Pharo110-Slime",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [ ],
"name" : "GRAnsiBooleansRule",
"type" : "normal"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
group

^ 'ANSI Compatibility'
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
initialization
initialize

super initialize.
self
replace: 'Character value: ``@expr'
with: 'Character codePoint: ``@expr'.
self
replace: '`#source `{:node | node value isCharacter }` to: `#target'
byEvaluating: [ :node |
(node receiver value isCharacter and: [
node arguments first value isCharacter ])
ifTrue: [
RBLiteralNode value: (String streamContents: [ :stream |
node receiver value codePoint to: node arguments first value codePoint do: [ :code | stream nextPut: (Character codePoint: code) ] ]) ]
ifFalse: [ node ] ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
name

^ 'Characters'
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
rationale

^ 'Character value: 64 and $a to: $b is not ANSI compatible.'
Loading

0 comments on commit fc89d8b

Please sign in to comment.