Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
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
62 changes: 33 additions & 29 deletions .github/workflows/Pharo11CI.yml → .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,33 @@
name: 'Pharo 11 CI'

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

on:
push:
branches:
- 'main'
pull_request:
types: [assigned, opened, synchronize, reopened]

jobs:
build:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
smalltalk: [ Pharo64-11 ]
runs-on: ${{ matrix.os }}
name: ${{ matrix.smalltalk }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: hpi-swa/setup-smalltalkCI@v1
with:
smalltalk-image: ${{ matrix.smalltalk }}
- name: Load in New Image and Run Tests
run: smalltalkci -s ${{ matrix.smalltalk }} ${{ matrix.ston }}
shell: bash
timeout-minutes: 15
name: 'CI'

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

on:
push:
branches:
- 'main'
pull_request:
types: [assigned, opened, synchronize, reopened]

jobs:
test:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
smalltalk: [ Pharo64-11, Pharo64-12, Pharo64-13 ]
ston: [ .smalltalkci.default.ston ]
runs-on: ${{ matrix.os }}
name: >
${{ matrix.smalltalk }} • ${{ matrix.os }}
steps:
- uses: actions/checkout@v3

- uses: hpi-swa/setup-smalltalkCI@v1
with:
smalltalk-image: ${{ matrix.smalltalk }}

- name: Run ${{ matrix.ston == '.smalltalkci.default.ston' && 'Full' || 'Core' }} tests
run: smalltalkci -s ${{ matrix.smalltalk }} ${{ matrix.ston }}
shell: bash
timeout-minutes: 30
29 changes: 0 additions & 29 deletions .github/workflows/Pharo12CI.yml

This file was deleted.

7 changes: 5 additions & 2 deletions .smalltalk.ston → .smalltalkci.default.ston
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@ SmalltalkCISpec {
#baseline : 'Pyramid',
#directory : 'src',
#onConflict : #useLoaded,
#onUpgrade : #useLoaded,
#onWarningLog : true,
#platforms : [ #pharo ]
}
],
#testing : {
#categories : [ 'Pyramid*' ],
#packages : [ 'Bloc-Serialization.*' ]
#packages : [ 'Bloc-Serialization.*' ],
#packages : [ 'Toplo-Serialization.*' ]
}
}
}
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
[![License](https://img.shields.io/github/license/openSmock/Pyramid.svg)](./LICENSE)
[![Pharo 11 CI](https://github.com/OpenSmock/Pyramid/actions/workflows/Pharo11CI.yml/badge.svg)](https://github.com/OpenSmock/Pyramid/actions/workflows/Pharo11CI.yml)
[![Pharo 12 CI](https://github.com/OpenSmock/Pyramid/actions/workflows/Pharo12CI.yml/badge.svg)](https://github.com/OpenSmock/Pyramid/actions/workflows/Pharo12CI.yml)
[![Pharo 11](https://img.shields.io/badge/Pharo-11-%23aac9ff.svg)](https://pharo.org/download)
[![Pharo 12](https://img.shields.io/badge/Pharo-12-%23aac9ff.svg)](https://pharo.org/download)
[![Pharo 13](https://img.shields.io/badge/Pharo-13-%23aac9ff.svg)](https://pharo.org/download)

[![License](https://img.shields.io/github/license/OpenSmock/Pyramid.svg)](./LICENSE)
[![Unit tests](https://github.com/OpenSmock/Pyramid/actions/workflows/CI.yml/badge.svg)](https://github.com/OpenSmock/Pyramid/actions/workflows/CI.yml)

# Pyramid

Expand Down Expand Up @@ -145,6 +148,8 @@ https://github.com/OpenSmock/Pyramid/assets/49183340/0c66a3ac-7bea-48c1-b1e8-0b0
- [STON](https://github.com/svenvc/ston) - serializer for Pharo objects to Smalltalk Object Notation format.
- [Stash](https://github.com/Nyan11/Stash) - serializer for Pharo objects to source code format.

**Pharo 12 compatibility:** On Pharo 12, [PharoBackwardCompatibility](https://github.com/jecisc/PharoBackwardCompatibility) is automatically loaded via the baseline to ensure compatibility.

## <img src="/assets/PyramidPinPtah.svg" width="75" height="75" align="bottom"> License

<picture>
Expand Down
13 changes: 10 additions & 3 deletions src/BaselineOfPyramid/BaselineOfPyramid.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ BaselineOfPyramid >> baseline: spec [

<baseline>
"Common baseline for all Pharo versions"
spec for: #common do: [ self baselineForCommon: spec ]
spec for: #common do: [ self baselineForCommon: spec ]
]

{ #category : #baselines }
Expand All @@ -19,6 +19,11 @@ BaselineOfPyramid >> baselineForCommon: spec [
spec preLoadDoIt: #preload:package:.
spec postLoadDoIt: #postload:package:.

"Pharo backward compatibility: to preserve running from previous versions of Pharo"
spec
baseline: 'PharoBackwardCompatibility'
with: [ spec repository: 'github://jecisc/PharoBackwardCompatibility:master/src' ].

"Dependencies"
self blocDependencies: spec.
self toploDependencies: spec.
Expand Down Expand Up @@ -79,7 +84,9 @@ BaselineOfPyramid >> preload: loader package: packageSpec [
{ #category : #packages }
BaselineOfPyramid >> pyramidPackages: spec [

spec package: 'Pyramid'.
spec
package: 'Pyramid'
with:[ spec requires: #( 'PharoBackwardCompatibility' ) ].
spec
package: 'Pyramid-IDE'
with: [ spec requires: #( 'Pyramid' ) ].
Expand All @@ -100,7 +107,7 @@ BaselineOfPyramid >> toploPackages: spec [

spec
package: 'Pyramid-Toplo'
with: [ spec requires: #( 'ToploSerialization') ].
with: [ spec requires: #( 'ToploSerialization' ) ].

spec
package: 'Pyramid-Toplo-Tests'
Expand Down
6 changes: 3 additions & 3 deletions src/Pyramid-Bloc/PyramidSaveModelVerifier.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ PyramidSaveModelVerifier class >> classPackageIsEqual [
PyramidSaveModelVerifier class >> methodIsValid [

^ self new
verifyBlock: [ :model | model savingMethodName isValidSelector ];
verifyBlock: [ :model |
model savingMethodName isValidSelector ];
showBlock: [ :view | view showMethodIsNotValidError ];
yourself.

yourself
]

{ #category : #constructor }
Expand Down
8 changes: 4 additions & 4 deletions src/Pyramid-Bloc/PyramidSavingService.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ PyramidSavingService class >> stash [
classifier: #'pyramid-serialized-bloc';
comment: [
'This class has been generated using Pyramid.<r><r><t>By: <1s><r><t><2s> <3s>'
expandMacrosWith: Author uniqueInstance fullName
expandMacrosWith: ''
with: Date today yyyymmdd
with: Time now print24 ];
pragma: 'pyStash';
Expand All @@ -81,9 +81,9 @@ PyramidSavingService class >> ston [
classifier: #'pyramid-serialized-bloc';
comment: [
'This class has been generated using Pyramid.<r><r><t>By: <1s><r><t><2s> <3s>'
expandMacrosWith: Author uniqueInstance fullName
with: Date today yyyymmdd
with: Time now print24 ];
expandMacrosWith: ''
with: Date today yyyymmdd
with: Time now print24 ];
pragma: 'pySTON';
serializeBlock: [ :collection |
'<1p>' expandMacrosWith:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ PyramidColorInputMultiLinesPresenterTest >> makeNewInput [
{ #category : #'as yet unclassified' }
PyramidColorInputMultiLinesPresenterTest >> triggerValueChangedOf: anInput [

anInput hexaInput hexInput textInput ensureInternalActions
decoratedGroup entries do: [ :bind | bind execute ]
]

{ #category : #'as yet unclassified' }
PyramidColorInputMultiLinesPresenterTest >> triggerValueChangedOfForPharo12AndBelow: anInput [

anInput hexaInput hexInput textInput contextKeyBindings keymaps do: [ :bind |
bind action value ]
]
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ PyramidColorInputSingleLinePresenterTest >> makeNewInput [
{ #category : #'as yet unclassified' }
PyramidColorInputSingleLinePresenterTest >> triggerValueChangedOf: anInput [

anInput hexInput textInput ensureInternalActions decoratedGroup
entries do: [ :bind | bind execute ]
]

{ #category : #'as yet unclassified' }
PyramidColorInputSingleLinePresenterTest >> triggerValueChangedOfForPharo12AndBelow: anInput [

anInput hexInput textInput contextKeyBindings keymaps do: [ :bind |
bind action value ]
]
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ PyramidColorInputSingleLineWithPickupButtonPresenterTest >> makeNewInput [
{ #category : #'as yet unclassified' }
PyramidColorInputSingleLineWithPickupButtonPresenterTest >> triggerValueChangedOf: anInput [

anInput singleLineInput hexInput textInput ensureInternalActions
decoratedGroup entries do: [ :bind | bind execute ]
]

{ #category : #'as yet unclassified' }
PyramidColorInputSingleLineWithPickupButtonPresenterTest >> triggerValueChangedOfForPharo12AndBelow: anInput [

anInput singleLineInput hexInput textInput contextKeyBindings keymaps do: [ :bind |
bind action value ]
]
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ PyramidCornerRadiiInputPresenterTest >> makeNewInput [
{ #category : #'as yet unclassified' }
PyramidCornerRadiiInputPresenterTest >> triggerValueChangedOf: anInput [

anInput inputArray inputArray ensureInternalActions
decoratedGroup entries do: [ :bind | bind execute ]
]

{ #category : #'as yet unclassified' }
PyramidCornerRadiiInputPresenterTest >> triggerValueChangedOfForPharo12AndBelow: anInput [

anInput inputArray inputArray contextKeyBindings keymaps do: [ :bind |
bind action value ]
]
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ PyramidHorizontalFrameConstraintsInputPresenterTest >> makeNewInput [
{ #category : #'as yet unclassified' }
PyramidHorizontalFrameConstraintsInputPresenterTest >> triggerValueChangedOf: anInput [

anInput inputRelative inputNumber ensureInternalActions
decoratedGroup entries do: [ :bind | bind execute ]
]

{ #category : #'as yet unclassified' }
PyramidHorizontalFrameConstraintsInputPresenterTest >> triggerValueChangedOfForPharo12AndBelow: anInput [

anInput inputRelative inputNumber contextKeyBindings keymaps do: [ :bind |
bind action value ]
]
7 changes: 7 additions & 0 deletions src/Pyramid-Tests/PyramidInsetsInputPresenterTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ PyramidInsetsInputPresenterTest >> makeNewInput [
{ #category : #'as yet unclassified' }
PyramidInsetsInputPresenterTest >> triggerValueChangedOf: anInput [

anInput inputArray inputArray ensureInternalActions decoratedGroup
entries do: [ :bind | bind execute ]
]

{ #category : #'as yet unclassified' }
PyramidInsetsInputPresenterTest >> triggerValueChangedOfForPharo12AndBelow: anInput [

anInput inputArray inputArray contextKeyBindings keymaps do: [ :bind |
bind action value ]
]
25 changes: 15 additions & 10 deletions src/Pyramid-Tests/PyramidLayoutBlocCommandTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,33 @@ PyramidLayoutBlocCommandTest >> command [

{ #category : #'as yet unclassified' }
PyramidLayoutBlocCommandTest >> targetContainers [

| flowLayoutVertical basicLayout proportionalLayout |

flowLayoutVertical := BlFlowLayout vertical.
basicLayout := BlBasicLayout new.
proportionalLayout := BlProportionalLayout new.

^ {
(PyramidCommandTestContainer
no: BlElement new
with: (BlElement new
layout: BlFlowLayout vertical;
layout: flowLayoutVertical;
yourself)
prop: BlFlowLayout vertical).
prop: flowLayoutVertical).
(PyramidCommandTestContainer
no: (BlElement new
layout: BlFlowLayout vertical;
layout: flowLayoutVertical;
yourself)
with: (BlElement new
layout: BlBasicLayout new;
layout: basicLayout;
yourself)
prop: BlBasicLayout new).
prop: basicLayout).
(PyramidCommandTestContainer
no: BlElement new
with: (BlElement new
layout: BlProportionalLayout new;
layout: proportionalLayout;
yourself)
prop: BlProportionalLayout new) }
prop: proportionalLayout) }
]

{ #category : #tests }
Expand Down Expand Up @@ -77,12 +82,12 @@ PyramidLayoutBlocCommandTest >> testHistory [
self argumentsForHistory do: [ :argument |
history canRedo ifTrue: [ history redo ].
targets do: [ :target |
self assert: (self command getValueFor: target) class equals: argument class ] ].
self assert: (self command getValueFor: target) class equals: argument class] ].

"Undo all"
self argumentsForHistory reverseDo: [ :argument |
targets do: [ :target |
self assert: (self command getValueFor: target) class equals: argument class ].
self assert: (self command getValueFor: target) class equals: argument class].
history canUndo ifTrue: [ history undo ] ].

"Redo all"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ PyramidNumberArrayInputPresenterTest >> makeNewInput [
{ #category : #'as yet unclassified' }
PyramidNumberArrayInputPresenterTest >> triggerValueChangedOf: anInput [

anInput inputArray ensureInternalActions decoratedGroup entries do: [
:bind | bind execute ]
]

{ #category : #'as yet unclassified' }
PyramidNumberArrayInputPresenterTest >> triggerValueChangedOfForPharo12AndBelow: anInput [

anInput inputArray contextKeyBindings keymaps do: [ :bind |
bind action value ]
]
7 changes: 7 additions & 0 deletions src/Pyramid-Tests/PyramidNumberInputPresenterTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ PyramidNumberInputPresenterTest >> makeNewInput [
{ #category : #'as yet unclassified' }
PyramidNumberInputPresenterTest >> triggerValueChangedOf: anInput [

anInput inputNumber ensureInternalActions decoratedGroup entries do: [
:bind | bind execute ]
]

{ #category : #'as yet unclassified' }
PyramidNumberInputPresenterTest >> triggerValueChangedOfForPharo12AndBelow: anInput [

anInput inputNumber contextKeyBindings keymaps do: [ :bind |
bind action value ]
]
7 changes: 7 additions & 0 deletions src/Pyramid-Tests/PyramidPointInputPresenterTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ PyramidPointInputPresenterTest >> makeNewInput [
{ #category : #'as yet unclassified' }
PyramidPointInputPresenterTest >> triggerValueChangedOf: anInput [

anInput inputX inputNumber ensureInternalActions decoratedGroup entries
do: [ :bind | bind execute ]
]

{ #category : #'as yet unclassified' }
PyramidPointInputPresenterTest >> triggerValueChangedOfForPharo12AndBelow: anInput [

anInput inputX inputNumber contextKeyBindings keymaps do: [ :bind |
bind action value ]
]
Loading
Loading