Skip to content

Commit a2c26e2

Browse files
authored
Merge pull request #88 from ba-st/gs64-pre-release
GS64: Pre-release updates
2 parents 16a3d09 + f5a18ff commit a2c26e2

File tree

17 files changed

+395
-19
lines changed

17 files changed

+395
-19
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: 'GS64 Components Loading'
2+
3+
on: [push,pull_request,workflow_dispatch]
4+
5+
jobs:
6+
component-loading:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
load-spec: [ Deployment, Dependent-SUnit-Extensions ]
12+
name: GS64 + ${{ matrix.load-spec }}
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: Load component in image
16+
uses: ba-st-actions/gs64-ci@v1
17+
with:
18+
project_name: 'Buoy'
19+
load_spec: 'Buoy-${{ matrix.load-spec }}'

.github/workflows/notify.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: Release Notifications
22

3-
on:
4-
release:
5-
types: [published]
3+
on: workflow_dispatch
64

75
jobs:
86
notify:

.github/workflows/unit-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Unit Tests
1+
name: Pharo Unit Tests
22

33
on: [push,pull_request,workflow_dispatch]
44

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,24 @@
55
This project aims to complement [Pharo](https://www.pharo.org) and [GS64](https://gemtalksystems.com/products/gs64/)
66
adding useful extensions.
77

8-
[![Unit Tests](https://github.com/ba-st/Buoy/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/ba-st/Buoy/actions/workflows/unit-tests.yml)
8+
[![Pharo - Unit Tests](https://github.com/ba-st/Buoy/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/ba-st/Buoy/actions/workflows/unit-tests.yml)
9+
[![GS64 - Unit Tests](https://github.com/ba-st/Buoy/actions/workflows/unit-tests-gs64.yml/badge.svg)](https://github.com/ba-st/Buoy/actions/workflows/unit-tests-gs64.yml)
910
[![Coverage Status](https://codecov.io/github/ba-st/Buoy/coverage.svg?branch=release-candidate)](https://codecov.io/gh/ba-st/Buoy/branch/release-candidate)
11+
1012
[![Baseline Groups](https://github.com/ba-st/Buoy/actions/workflows/loading-groups.yml/badge.svg)](https://github.com/ba-st/Buoy/actions/workflows/loading-groups.yml)
13+
[![GS64 Components](https://github.com/ba-st/Buoy/actions/workflows/loading-gs64-components.yml/badge.svg)](https://github.com/ba-st/Buoy/actions/workflows/loading-gs64-components.yml)
1114
[![Markdown Lint](https://github.com/ba-st/Buoy/actions/workflows/markdown-lint.yml/badge.svg)](https://github.com/ba-st/Buoy/actions/workflows/markdown-lint.yml)
1215

1316
[![GitHub release](https://img.shields.io/github/release/ba-st/Buoy.svg)](https://github.com/ba-st/Buoy/releases/latest)
17+
1418
[![Pharo 7.0](https://img.shields.io/badge/Pharo-7.0-informational)](https://pharo.org)
1519
[![Pharo 8.0](https://img.shields.io/badge/Pharo-8.0-informational)](https://pharo.org)
1620
[![Pharo 9.0](https://img.shields.io/badge/Pharo-9.0-informational)](https://pharo.org)
1721
[![Pharo 10](https://img.shields.io/badge/Pharo-10-informational)](https://pharo.org)
1822
[![Pharo 11](https://img.shields.io/badge/Pharo-11-informational)](https://pharo.org)
1923

24+
[![GS64 3.6.6](https://img.shields.io/badge/GS64-3.6.6-informational)](https://gemtalksystems.com/products/gs64/)
25+
2026
Quick links
2127

2228
- [**Explore the docs**](docs/README.md)
@@ -41,7 +47,7 @@ Quick links
4147

4248
## Installation
4349

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

4652
## Contributing
4753

docs/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ understanding over specific topics:
1818
required values, that can be unknown at the beginning of an execution.
1919
See the [related documentation.](reference/BindingsAndOptionals.md)
2020
- **Exception Handling**: Extensions to the [exception handling mechanics](reference/ExceptionHandling.md).
21-
- **Meta-programming**: Some abstractions like [namespaces](reference/Namespaces.md)
22-
and [interfaces](reference/Interfaces.md).
21+
- **Meta-programming**: Some abstractions like [namespaces](reference/Namespaces.md),
22+
[interfaces](reference/Interfaces.md) and extensions to the [Object model](reference/MOP.md).
2323
- **SUnit**: [Extensions to the SUnit framework](reference/SUnit.md).
2424

2525
---
2626

2727
To use the project as a dependency of your project, take a look at:
2828

29-
- [How to use Buoy as a dependency](how-to/how-to-use-as-dependency-in-pharo.md)
30-
- [Baseline groups reference](reference/Baseline-groups.md)
29+
- [Pharo: How to use Buoy as a dependency](how-to/how-to-use-as-dependency-in-pharo.md)
30+
- [Baseline groups & components reference](reference/Baseline-groups.md)

docs/reference/Baseline-groups.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# Baseline Groups
1+
# Baseline Groups & GS 64 Components
2+
3+
## Pharo Baseline Groups
24

35
Buoy includes the following groups in its Baseline that can be used as
46
loading targets:
@@ -11,3 +13,18 @@ loading targets:
1113
particular case it is the same as `Tests`
1214
- `Development` will load all the needed packages to develop and contribute to
1315
the project
16+
17+
- `GS64-Development` is an optional group that will load `Development` and all
18+
the packages required to develop changes applicable to GS64. Loading this package
19+
will make dirty other packages in the project but this is expected, just remember
20+
to cherry-pick the changes to commit and don't remove the changed methods in the
21+
Pharo package.
22+
23+
## GS64 Components
24+
25+
Buoy includes the following components in its Rowan configuration that can be
26+
used as loading targets:
27+
28+
- `Deployment` will load all the packages needed in a deployed application
29+
- `Tests` will load the test cases
30+
- `Dependent-SUnit-Extensions` will load extensions to SUnit

docs/reference/Collections.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,21 @@ Some examples
2020
#( #(1) #(3 1) #(2) ) minUsing: [:array | array first ] >>> 1
2121
```
2222

23+
### `Collection` extensions for GS64
24+
25+
- `anyOne` is just an alias of `any`
26+
- `collect:as:` evaluates a block with each of the receiver's elements as the
27+
argument collecting the result into an instance of the argument class.
28+
- `count:` counts the number of elements evaluating true for the argument block.
29+
- `detect:ifFound:` evaluates an action block if any of the elements match the
30+
condition block. If no elements match does nothing.
31+
- `detect:ifFound:ifNone:` evaluates an action block if any of the elements match
32+
the condition block. If no elements match evaluates the fail block.
33+
- `ifEmpty:ifNotEmpty:` evaluates one of two blocks depending on the collection emptiness.
34+
- `removeAll` removes all elements of the receiver.
35+
- `select:thenCollect:` filters the elements in the receiver using the condition
36+
block, collecting after the results evaluating the action block.
37+
2338
## `SequenceableCollection` extensions
2439

2540
- `copyFirst:` Copy the first `n` elements of the collection. If `n` is 0 it
@@ -67,6 +82,38 @@ Some examples
6782
6883
```
6984

85+
### `SequenceableCollection` extensions for GS64
86+
87+
- `copyAfter:` returns a copy of the receiver after the first occurrence
88+
of the argument up to the end, or empty if no element matches.
89+
- `endsWith:` returns true if the argument is a suffix of the receiver.
90+
- `writeStream` returns a write stream over the receiver.
91+
92+
## `Dictionary` extensions for GS64
93+
94+
- `at:ifPresent:ifAbsentPut:` lookups a value, if any matches evaluates a block,
95+
if no one matches put under the key the result o evaluating the second block.
96+
97+
## `String` extensions for GS64
98+
99+
- `expandMacros`
100+
- `expandMacrosWith:`
101+
- `expandMacrosWith:With:`
102+
- `expandMacrosWith:With:With:`
103+
- `expandMacrosWith:With:With:With:`
104+
- `expandMacrosWithArguments:`
105+
106+
These methods interpolate the receiver pattern using the provided arguments:
107+
108+
- `<r>` is replaced by `CR`
109+
- `<l>` is replaced by `LF`
110+
- `<n>` is replaced by the underlying OS line delimiter
111+
- `<t>` is replaced by `TAB`
112+
- `<Np>` is replaced by the `printString` of the nth argument
113+
- `<Ns>` is replaced by the string provided in the nth argument
114+
- `<N?trueString:falseString>` is replaced by `trueString` or `falseString`
115+
depending on the boolean provided in the nth argument.
116+
70117
## Circular Iterator
71118

72119
A `CircularIterator` provides an abstraction to iterate over a collection

docs/reference/MOP.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Meta Object Protocol
2+
3+
## `Symbol` extensions for GS64
4+
5+
- `value:` allows to use a unary symbol as a replacement for a unary block
6+
7+
## `Class` extensions for GS64
8+
9+
- `allLeafSubclasses` returns all the subclasses of the receiver that don't
10+
have further subclasses

docs/reference/Math.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
The easier way to create a percentage is to send the message `percent` to a
99
number. For example `5 percent` will create an object representing `5%`.
10-
There are two common cases also covered as instance creation methods (`0%` and
10+
There are two common cases also covered as instance creation methods (`0%` and
1111
`100%`):
1212

1313
```smalltalk
@@ -22,8 +22,8 @@ Percentage ratio: 1. "100%"
2222
Percentage ratio: 1/2 "50%"
2323
```
2424

25-
This percentages can be operated arithmetically with any number or other
26-
percentages. Try printing the following expressions:
25+
These percentages can be operated arithmetically with any number or other
26+
percentages. Try printing the following expressions:
2727

2828
```smalltalk
2929
20 percent * 5. "1"
@@ -53,5 +53,16 @@ create one is to send the message `perMille` to a number.
5353
12 perMille "12‰"
5454
```
5555

56+
## `Number` Extensions for GS64
57+
58+
- `isZero` returns true if the receiver equals 0
59+
- `nthRoot:` returns the nth root of the receiver
60+
- `round:` round the decimal part of the receiver to be limited to the desired
61+
number of decimal digits
62+
63+
## `Float` Extensions for GS64
64+
65+
- `isInfinite` returns true if the receiver is infinite
66+
5667
---
57-
Some definitions and examples are based on the ones in [Wikipedia](https://en.wikipedia.org/wiki/Percentage)
68+
Some definitions and examples are based on the ones on [Wikipedia](https://en.wikipedia.org/wiki/Percentage)

docs/reference/SUnit.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,23 @@
66
sequenceable collections have the same elements in the same order
77
- `assert:includes:` asserts that a collection includes an element
88
- `deny:includes:` denies that a collection includes an element
9-
- `should:raise:withMessageText:` asserts that a block raises an specific
9+
- `should:raise:withMessageText:` asserts that a block raises a specific
1010
exception including a specific message text
1111
- `withTheOnlyOneIn:do:` provides a facility to assert that a collection has
1212
only one element and evaluates a block with it
13+
14+
### `TestAsserter` extensions for GS64
15+
16+
- `assert:identicalTo:` asserts that an object is identical to another one
17+
- `deny:identicalTo:` denies that an object is identical to another one
18+
- `assertCollection:hasSameElements:` asserts that two collections have the
19+
same elements
20+
- `fail` will make the test fail
21+
- `should:raise:withExceptionDo:` asserts that a block raises a specific
22+
exception and evaluates the provided block with the signal
23+
24+
## `TestCase` extensions
25+
26+
- `runOnlyInGemStone64:` evaluates the block only if running in GS64
27+
- `runOnlyInPharo:` evaluates the block only if running in Pharo
28+
- `runOnlyInVAST:` evaluates the block only if running in VAST Platform

0 commit comments

Comments
 (0)