Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
24 changes: 8 additions & 16 deletions .github/workflows/continuous.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,22 @@
name: CI

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

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the development branch
on:
push:
branches:
- '**'
pull_request:
types: [assigned, opened, synchronize, reopened]
on: [push, pull_request, workflow_dispatch]

jobs:
build:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
strategy:
fail-fast: false
matrix:
smalltalk: [ Pharo64-6.1, Pharo64-7.0, Pharo64-8.0, Pharo64-9.0 ]
smalltalk: [ Pharo32-6.1, Pharo32-7.0, Pharo32-8.0, Pharo64-9.0, Pharo64-10, Pharo64-11, Pharo64-12, Pharo64-13, Pharo64-14 ] # Pharo 6, 7, 8 64b currently fails in smalltalkCI :(
name: ${{ matrix.smalltalk }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- uses: hpi-swa/setup-smalltalkCI@v1
with:
smalltalk-version: ${{ matrix.smalltalk }}
smalltalk-image: ${{ matrix.smalltalk }}
- run: smalltalkci -s ${{ matrix.smalltalk }}
shell: bash
timeout-minutes: 15

timeout-minutes: 15
40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Used to save an artifact of the releases. Used to deploy a demo on Cyril's server
name: Release

on: [release]

jobs:
build:
runs-on: ubuntu-latest
env:
PROJECT_NAME: PrismCodeDisplayer-${{ matrix.smalltalk }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
strategy:
fail-fast: false
matrix:
smalltalk: [ Pharo32-6.1, Pharo32-7.0, Pharo32-8.0, Pharo64-9.0, Pharo64-10, Pharo64-11, Pharo64-12, Pharo64-13, Pharo64-14 ] # Pharo 6, 7, 8 64b currently fails in smalltalkCI :(
name: ${{ matrix.smalltalk }}
steps:
- uses: actions/checkout@v6

- uses: hpi-swa/setup-smalltalkCI@v1
with:
smalltalk-image: ${{ matrix.smalltalk }}
- run: smalltalkci -s ${{ matrix.smalltalk }}
shell: bash
timeout-minutes: 15

# Here we zip the result of the build to be able to keep the artefacts
- name: package
run: |
mv /home/runner/.smalltalkCI/_builds/* .
mv TravisCI.image $PROJECT_NAME.image
mv TravisCI.changes $PROJECT_NAME.changes
echo ${${{ matrix.smalltalk }}} | sed -e 's/.*\-//g ; s/\..*//g ; s/$/0/' > pharo.version
zip -r $PROJECT_NAME.zip $PROJECT_NAME.image $PROJECT_NAME.changes *.sources pharo.version
ls

- name: Release
uses: softprops/action-gh-release@v3
with:
files: ${{ env.PROJECT_NAME }}.zip
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ git log --pretty="* %s ([%h](https://github.com/DuneSt/PrismCodeDisplayer/commit
'Content' copyWithRegex: 'Merge pull request #[0-9]+ from [^/]+/[0-9]*' matchesReplacedWith: '') copyReplaceAll: '-' with: ' '
-->

> More recent releases have the changelog in the release

# [v1.1.1](https://github.com/DuneSt/PrismCodeDisplayer/compare/v1.1.0...v1.1.1) (2022-01-22)

## Infrastructure
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ You can find a demo at: [https://demos.ferlicot.fr/PrismDemo](https://demos.ferl

| Prism version | Compatible Pharo versions |
|--------------- |--------------------------- |
| v1.x.x | Pharo 61, 70, 80, 90 |
| development | Pharo 61, 70, 80, 90 |
| v1.x.x | Pharo 61 - 14 |
| development | Pharo 61 - 14 |

## Contact

If you have any question or problem do not hesitate to open an issue or contact cyril (a) ferlicot.me or guillaume.larcheveque (a) gmail.com
If you have any question or problem do not hesitate to open an issue or contact cyril (a) ferlicot.fr
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
I am a baseline of ChartJs for Seaside. Read more at: https://github.com/DuneSt/PrismCodeDisplayer
"
Class {
#name : #BaselineOfPrismCodeDisplayer,
#superclass : #BaselineOf,
#category : #BaselineOfPrismCodeDisplayer
#name : 'BaselineOfPrismCodeDisplayer',
#superclass : 'BaselineOf',
#category : 'BaselineOfPrismCodeDisplayer',
#package : 'BaselineOfPrismCodeDisplayer'
}

{ #category : #baseline }
{ #category : 'baseline' }
BaselineOfPrismCodeDisplayer >> baseline: spec [
<baseline>
spec
Expand Down Expand Up @@ -37,7 +38,7 @@ BaselineOfPrismCodeDisplayer >> baseline: spec [
group: 'tests' with: #('PrismCodeDisplayer-Core-Tests') ]
]

{ #category : #dependencies }
{ #category : 'dependencies' }
BaselineOfPrismCodeDisplayer >> materialDesignLite: spec [
spec
baseline: 'MaterialDesignLite'
Expand All @@ -46,19 +47,19 @@ BaselineOfPrismCodeDisplayer >> materialDesignLite: spec [
repository: 'github://DuneSt/MaterialDesignLite:v2.x.x/src' ]
]

{ #category : #dependencies }
{ #category : 'dependencies' }
BaselineOfPrismCodeDisplayer >> mocketry: spec [
spec baseline: 'Mocketry' with: [ spec repository: 'github://dionisiydk/Mocketry:v6.0.x' ]
]

{ #category : #accessing }
{ #category : 'accessing' }
BaselineOfPrismCodeDisplayer >> projectClass [
^ [ self class environment at: #MetacelloCypressBaselineProject ]
on: NotFound
do: [ super projectClass ]
]

{ #category : #dependencies }
{ #category : 'dependencies' }
BaselineOfPrismCodeDisplayer >> seaside3: spec [
spec
baseline: 'Seaside3'
Expand Down
2 changes: 1 addition & 1 deletion src/BaselineOfPrismCodeDisplayer/package.st
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Package { #name : #BaselineOfPrismCodeDisplayer }
Package { #name : 'BaselineOfPrismCodeDisplayer' }
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
A PrismComponentLinkStrategyTest is a test class for testing the behavior of PrismComponentLinkStrategy
"
Class {
#name : #PrismComponentLinkStrategyTest,
#superclass : #PrismComponentStrategyTest,
#category : #'PrismCodeDisplayer-Core-Tests'
#name : 'PrismComponentLinkStrategyTest',
#superclass : 'PrismComponentStrategyTest',
#category : 'PrismCodeDisplayer-Core-Tests',
#package : 'PrismCodeDisplayer-Core-Tests'
}

{ #category : #helpers }
{ #category : 'helpers' }
PrismComponentLinkStrategyTest >> actualClass [
^ PrismComponentLinkStrategy
]
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,23 @@
A PrismComponentStrategyTest is a test class for testing the behavior of PrismComponentStrategy
"
Class {
#name : #PrismComponentStrategyTest,
#superclass : #TestCase,
#category : #'PrismCodeDisplayer-Core-Tests'
#name : 'PrismComponentStrategyTest',
#superclass : 'TestCase',
#category : 'PrismCodeDisplayer-Core-Tests',
#package : 'PrismCodeDisplayer-Core-Tests'
}

{ #category : #testing }
{ #category : 'testing' }
PrismComponentStrategyTest class >> isAbstract [
^ self = PrismComponentStrategyTest
]

{ #category : #helpers }
{ #category : 'helpers' }
PrismComponentStrategyTest >> actualClass [
^ self subclassResponsibility
]

{ #category : #tests }
{ #category : 'tests' }
PrismComponentStrategyTest >> testIntervals [
| strat obj1 obj2 |
obj1 := Mock named: 'Test1'.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
A PrismComponentStyleStrategyTest is a test class for testing the behavior of PrismComponentStyleStrategy
"
Class {
#name : #PrismComponentStyleStrategyTest,
#superclass : #PrismComponentStrategyTest,
#category : #'PrismCodeDisplayer-Core-Tests'
#name : 'PrismComponentStyleStrategyTest',
#superclass : 'PrismComponentStrategyTest',
#category : 'PrismCodeDisplayer-Core-Tests',
#package : 'PrismCodeDisplayer-Core-Tests'
}

{ #category : #helpers }
{ #category : 'helpers' }
PrismComponentStyleStrategyTest >> actualClass [
^ PrismComponentStyleStrategy
]
19 changes: 10 additions & 9 deletions src/PrismCodeDisplayer-Core-Tests/PrismComponentUnitTest.class.st
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
Class {
#name : #PrismComponentUnitTest,
#superclass : #TestCase,
#category : #'PrismCodeDisplayer-Core-Tests'
#name : 'PrismComponentUnitTest',
#superclass : 'TestCase',
#category : 'PrismCodeDisplayer-Core-Tests',
#package : 'PrismCodeDisplayer-Core-Tests'
}

{ #category : #resources }
{ #category : 'resources' }
PrismComponentUnitTest >> codeDemoPrism [
^'
//this is a element decorated by a PrismComponentStyleStrategy
Expand Down Expand Up @@ -794,7 +795,7 @@ Prism.languages.js = Prism.languages.javascript;
'
]

{ #category : #tests }
{ #category : 'tests' }
PrismComponentUnitTest >> testHtmlResponse [
| method component res |
method := 'this a
Expand All @@ -817,7 +818,7 @@ testing'.
self assert: (res at: #start) equals: 2 "postion of line"
]

{ #category : #tests }
{ #category : 'tests' }
PrismComponentUnitTest >> testHtmlResponseWithProtectedCode [
| component res method |
method := '< this a
Expand All @@ -840,7 +841,7 @@ testing'.
self assert: (res at: #start) equals: 2 "postion of line"
]

{ #category : #tests }
{ #category : 'tests' }
PrismComponentUnitTest >> testPrismIntervalOfLine [
| string |
string := '123
Expand All @@ -851,7 +852,7 @@ PrismComponentUnitTest >> testPrismIntervalOfLine [
self assert: (string prismIntervalOfLine: 3) equals: (8 to: 9)
]

{ #category : #tests }
{ #category : 'tests' }
PrismComponentUnitTest >> testProtectCode [
"test to try to solve testHtmlResponseWithProtectedCode fail"

Expand All @@ -868,7 +869,7 @@ string for
testing' "postion of line"
]

{ #category : #tests }
{ #category : 'tests' }
PrismComponentUnitTest >> testSearchCode [
"test to try to solve testHtmlResponseWithProtectedCode fail"

Expand Down
2 changes: 1 addition & 1 deletion src/PrismCodeDisplayer-Core-Tests/package.st
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Package { #name : #'PrismCodeDisplayer-Core-Tests' }
Package { #name : 'PrismCodeDisplayer-Core-Tests' }
4 changes: 2 additions & 2 deletions src/PrismCodeDisplayer-Core/Color.extension.st
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Extension { #name : #Color }
Extension { #name : 'Color' }

{ #category : #'*PrismCodeDisplayer-Core' }
{ #category : '*PrismCodeDisplayer-Core' }
Color >> asRGBA: anAlpha [
^ String
streamContents: [ :s |
Expand Down
14 changes: 8 additions & 6 deletions src/PrismCodeDisplayer-Core/PrismAbstractDecoration.class.st
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
Class {
#name : #PrismAbstractDecoration,
#superclass : #WADecoration,
#category : #'PrismCodeDisplayer-Core-Component'
#name : 'PrismAbstractDecoration',
#superclass : 'WADecoration',
#category : 'PrismCodeDisplayer-Core-Component',
#package : 'PrismCodeDisplayer-Core',
#tag : 'Component'
}

{ #category : #accessing }
{ #category : 'accessing' }
PrismAbstractDecoration >> lineCount [
^ self decoratedComponent lineCount
]

{ #category : #action }
{ #category : 'action' }
PrismAbstractDecoration >> resetSortedObjectWithIntervals [
self decoratedComponent computeSortedObjectWithIntervals
]

{ #category : #accessing }
{ #category : 'accessing' }
PrismAbstractDecoration >> sourceCode [
^ self decoratedComponent sourceCode
]
10 changes: 6 additions & 4 deletions src/PrismCodeDisplayer-Core/PrismAbstractFilter.class.st
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
Class {
#name : #PrismAbstractFilter,
#superclass : #Object,
#category : #'PrismCodeDisplayer-Core-Component'
#name : 'PrismAbstractFilter',
#superclass : 'Object',
#category : 'PrismCodeDisplayer-Core-Component',
#package : 'PrismCodeDisplayer-Core',
#tag : 'Component'
}

{ #category : #accessing }
{ #category : 'accessing' }
PrismAbstractFilter class >> allRangesFrom: aString for: aPattern [
^ self subclassResponsibility
]
Loading