Skip to content

Commit

Permalink
Merge branch 'dev-2.0' into cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
jecisc committed Nov 21, 2023
2 parents 48291cd + 97582ee commit a354b7f
Show file tree
Hide file tree
Showing 432 changed files with 4,557 additions and 4,075 deletions.
3 changes: 0 additions & 3 deletions .github/scripts/preLoading.st

This file was deleted.

3 changes: 0 additions & 3 deletions .github/scripts/preTesting.st

This file was deleted.

9 changes: 2 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,11 @@ jobs:
runs-on: ${{ matrix.os }}
name: ${{ matrix.smalltalk }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup smalltalkCI
uses: hpi-swa/setup-smalltalkCI@v1
with:
smalltalk-image: ${{ matrix.smalltalk }}
# - name: Load Image and Run Release Tests
# run: smalltalkci -s ${{ matrix.smalltalk }} .smalltalk.release.ston
# timeout-minutes: 10
# - name: Clean Up
# run: rm -Rf ${{ env.SMALLTALK_CI_BUILD }}
smalltalk-version: ${{ matrix.smalltalk }}
- name: Load Image and Run Tests
run: smalltalkci -s ${{ matrix.smalltalk }} ${{ matrix.ston }}
shell: bash
Expand Down
3 changes: 1 addition & 2 deletions .project
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
'srcDirectory' : '',
'tags' : [ #system ]
'srcDirectory' : ''
}
18 changes: 0 additions & 18 deletions .smalltalk.release.ston

This file was deleted.

12 changes: 2 additions & 10 deletions BaselineOfIceberg/BaselineOfIceberg.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ BaselineOfIceberg >> baseline: spec [

self tonel: spec.
self libgit: spec.
self ring2: spec.

spec
"iceberg"
Expand All @@ -31,7 +30,7 @@ BaselineOfIceberg >> baseline: spec [
package: 'Iceberg-TipUI' with: [ spec requires: #('Iceberg') ];
package: 'Iceberg-Memory' with: [ spec requires: #('Iceberg') ];
"tests"
package: 'Iceberg-Tests' with: [ spec requires: #('Iceberg' 'Iceberg-Memory' 'Ring2') ];
package: 'Iceberg-Tests' with: [ spec requires: #('Iceberg' 'Iceberg-Memory') ];
package: 'Iceberg-Tests-MetacelloIntegration' with: [ spec requires: #('Iceberg-Tests') ];
package: 'Iceberg-UI-Tests' with: [ spec requires: #('Iceberg-TipUI' 'Iceberg-Tests')];
package: 'Iceberg-Plugin-Migration-Tests' with: [ spec requires: #('Iceberg-Plugin-Migration' 'Iceberg-Tests') ];
Expand Down Expand Up @@ -77,7 +76,7 @@ BaselineOfIceberg >> libgit: spec [
baseline: 'LibGit'
with: [
spec
repository: 'github://pharo-vcs/libgit2-pharo-bindings:v3.0.8';
repository: 'github://pharo-vcs/libgit2-pharo-bindings:v3.0.9';
loads: 'default' ].
spec
project: 'LibGit-Tests'
Expand Down Expand Up @@ -125,13 +124,6 @@ BaselineOfIceberg >> resetKMRepository [
ifPresent: [ :class | class reset ]
]

{ #category : 'baseline' }
BaselineOfIceberg >> ring2: spec [
spec
baseline: 'Ring2'
with: [ spec repository: 'github://guillep/Ring2:v2.0.0/src' ]
]

{ #category : 'baseline' }
BaselineOfIceberg >> tonel: spec [
spec
Expand Down
21 changes: 11 additions & 10 deletions Iceberg-ArchitecturalRules/IceLibgitRuleBreakerRepository.class.st
Original file line number Diff line number Diff line change
@@ -1,47 +1,48 @@
Class {
#name : #IceLibgitRuleBreakerRepository,
#superclass : #IceLibgitRepository,
#category : 'Iceberg-ArchitecturalRules'
#name : 'IceLibgitRuleBreakerRepository',
#superclass : 'IceLibgitRepository',
#category : 'Iceberg-ArchitecturalRules',
#package : 'Iceberg-ArchitecturalRules'
}

{ #category : #tests }
{ #category : 'tests' }
IceLibgitRuleBreakerRepository >> testDefinedRepositoryAccessor [

<repositoryHandleAccessor>
^ handle
]

{ #category : #tests }
{ #category : 'tests' }
IceLibgitRuleBreakerRepository >> testMethodAccessHandleDirectly [

^ handle allBranches
]

{ #category : #tests }
{ #category : 'tests' }
IceLibgitRuleBreakerRepository >> testMethodAccessHandleDirectlyWithErrorHandler [

self handleLibgitError: [handle allBranches]
]

{ #category : #tests }
{ #category : 'tests' }
IceLibgitRuleBreakerRepository >> testMethodAccessHandleThroughAccessor [

^ self testDefinedRepositoryAccessor allBranches
]

{ #category : #tests }
{ #category : 'tests' }
IceLibgitRuleBreakerRepository >> testMethodAccessHandleThroughAccessorWithErrorHandler [

self handleLibgitError: [ self testDefinedRepositoryAccessor allBranches]
]

{ #category : #tests }
{ #category : 'tests' }
IceLibgitRuleBreakerRepository >> testMethodNotBreakingRule [

^ 1+1
]

{ #category : #tests }
{ #category : 'tests' }
IceLibgitRuleBreakerRepository >> testNonDefinedRepositoryAccessor [

^ handle
Expand Down
17 changes: 9 additions & 8 deletions Iceberg-ArchitecturalRules/IceShouldHandleLibgitErrors.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,19 @@ Otherwise, libgit errors may be thrown to the user and produce ugly effects. E.g
- Libgit errors are criptyc and can only be understood by reading the message text...
"
Class {
#name : #IceShouldHandleLibgitErrors,
#superclass : #ReAbstractRule,
#category : #'Iceberg-ArchitecturalRules'
#name : 'IceShouldHandleLibgitErrors',
#superclass : 'ReAbstractRule',
#category : 'Iceberg-ArchitecturalRules',
#package : 'Iceberg-ArchitecturalRules'
}

{ #category : #'testing-interest' }
{ #category : 'testing-interest' }
IceShouldHandleLibgitErrors class >> checksNode [

^ true
]

{ #category : #running }
{ #category : 'running' }
IceShouldHandleLibgitErrors >> check: aNode forCritiquesDo: aBlock [

"Detect strange case where method node is nil"
Expand All @@ -44,21 +45,21 @@ IceShouldHandleLibgitErrors >> check: aNode forCritiquesDo: aBlock [
ifFalse: [ aBlock cull: (self critiqueFor: aNode) ]
]

{ #category : #accessing }
{ #category : 'accessing' }
IceShouldHandleLibgitErrors >> group [

^ 'Architectural'
]

{ #category : #accessing }
{ #category : 'accessing' }
IceShouldHandleLibgitErrors >> libgitRepositoryHandleAccessorsForClass: aClass [

^ aClass allMethods
select:
[ :m | m pragmas anySatisfy: [ :p | p selector = IceLibgitRepository libgitRepositoryHandleAccessorPragmaSelector ] ]
]

{ #category : #accessing }
{ #category : 'accessing' }
IceShouldHandleLibgitErrors >> name [

^ 'Should manage errors when doing a libgit call'
Expand Down
25 changes: 13 additions & 12 deletions Iceberg-ArchitecturalRules/IceShouldHandleLibgitErrorsTest.class.st
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
Class {
#name : #IceShouldHandleLibgitErrorsTest,
#superclass : #TestCase,
#category : 'Iceberg-ArchitecturalRules'
#name : 'IceShouldHandleLibgitErrorsTest',
#superclass : 'TestCase',
#category : 'Iceberg-ArchitecturalRules',
#package : 'Iceberg-ArchitecturalRules'
}

{ #category : #rules }
{ #category : 'rules' }
IceShouldHandleLibgitErrorsTest class >> libgitRepositoryHandleAccessors [
self shouldBeImplemented.
]

{ #category : #tests }
{ #category : 'tests' }
IceShouldHandleLibgitErrorsTest >> check: aRule on: aMethod [

| lintRule |
Expand All @@ -18,7 +19,7 @@ IceShouldHandleLibgitErrorsTest >> check: aRule on: aMethod [
^ lintRule result smallLintCritics
]

{ #category : #tests }
{ #category : 'tests' }
IceShouldHandleLibgitErrorsTest >> testDefinedRepositoryAccessorDoesNotBreakRule [

| critiques |
Expand All @@ -27,7 +28,7 @@ IceShouldHandleLibgitErrorsTest >> testDefinedRepositoryAccessorDoesNotBreakRule
self assert: critiques isEmpty.
]

{ #category : #tests }
{ #category : 'tests' }
IceShouldHandleLibgitErrorsTest >> testDirectHandleAccessWithErrorChecking [

| critiques |
Expand All @@ -36,7 +37,7 @@ IceShouldHandleLibgitErrorsTest >> testDirectHandleAccessWithErrorChecking [
self assert: critiques isEmpty.
]

{ #category : #tests }
{ #category : 'tests' }
IceShouldHandleLibgitErrorsTest >> testDirectHandleAccessWithoutErrorChecking [

| critiques |
Expand All @@ -45,7 +46,7 @@ IceShouldHandleLibgitErrorsTest >> testDirectHandleAccessWithoutErrorChecking [
self assert: critiques notEmpty.
]

{ #category : #tests }
{ #category : 'tests' }
IceShouldHandleLibgitErrorsTest >> testHandleAccessThroughAllowedAccessorWithErrorChecking [

| critiques |
Expand All @@ -54,7 +55,7 @@ IceShouldHandleLibgitErrorsTest >> testHandleAccessThroughAllowedAccessorWithErr
self assert: critiques isEmpty.
]

{ #category : #tests }
{ #category : 'tests' }
IceShouldHandleLibgitErrorsTest >> testHandleAccessThroughAllowedAccessorWithoutErrorChecking [

| critiques |
Expand All @@ -63,7 +64,7 @@ IceShouldHandleLibgitErrorsTest >> testHandleAccessThroughAllowedAccessorWithout
self assert: critiques notEmpty.
]

{ #category : #tests }
{ #category : 'tests' }
IceShouldHandleLibgitErrorsTest >> testMethodNotBreakingRuleYieldsNoCritiques [

| critiques |
Expand All @@ -72,7 +73,7 @@ IceShouldHandleLibgitErrorsTest >> testMethodNotBreakingRuleYieldsNoCritiques [
self assert: critiques isEmpty.
]

{ #category : #tests }
{ #category : 'tests' }
IceShouldHandleLibgitErrorsTest >> testNonDefinedRepositoryAccessorBreaksRule [

| critiques |
Expand Down
2 changes: 1 addition & 1 deletion Iceberg-ArchitecturalRules/package.st
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Package { #name : #'Iceberg-ArchitecturalRules' }
Package { #name : 'Iceberg-ArchitecturalRules' }
26 changes: 14 additions & 12 deletions Iceberg-Libgit-Filetree/IceLibgitFiletreeFileUtils.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,29 @@
Emulates other 'file utils' classes by reading from a git repository (its blob, not a working copy'). Allows for reading any tree (from any commit) in the repository.
"
Class {
#name : #IceLibgitFiletreeFileUtils,
#superclass : #Object,
#category : #'Iceberg-Libgit-Filetree-Utilities'
#name : 'IceLibgitFiletreeFileUtils',
#superclass : 'Object',
#category : 'Iceberg-Libgit-Filetree-Utilities',
#package : 'Iceberg-Libgit-Filetree',
#tag : 'Utilities'
}

{ #category : #utilities }
{ #category : 'utilities' }
IceLibgitFiletreeFileUtils class >> deleteAll: aTreeBuilder [
^ aTreeBuilder deleteAll
]

{ #category : #utilities }
{ #category : 'utilities' }
IceLibgitFiletreeFileUtils class >> directoryExists: aLGitTreeEntry [
^ aLGitTreeEntry type = LGitObjectTypeEnum git_obj_tree
]

{ #category : #utilities }
{ #category : 'utilities' }
IceLibgitFiletreeFileUtils class >> directoryFromEntry: treeEntry [
^ treeEntry object
]

{ #category : #utilities }
{ #category : 'utilities' }
IceLibgitFiletreeFileUtils class >> directoryFromPath: aString relativeTo: aCommitOrTree [
^ aCommitOrTree
entryByPath: aString
Expand All @@ -31,27 +33,27 @@ IceLibgitFiletreeFileUtils class >> directoryFromPath: aString relativeTo: aComm

]

{ #category : #utilities }
{ #category : 'utilities' }
IceLibgitFiletreeFileUtils class >> directoryName: anEntry [
^ anEntry filename
]

{ #category : #utilities }
{ #category : 'utilities' }
IceLibgitFiletreeFileUtils class >> fileName: anEntry [
^ anEntry filename
]

{ #category : #accessing }
{ #category : 'accessing' }
IceLibgitFiletreeFileUtils class >> pathNameDelimiter [
^ $/
]

{ #category : #utilities }
{ #category : 'utilities' }
IceLibgitFiletreeFileUtils class >> readStreamFor: fileName in: tree do: aBlock [
(tree entryByPath: fileName) readStreamDo: aBlock
]

{ #category : #utilities }
{ #category : 'utilities' }
IceLibgitFiletreeFileUtils class >> writeStreamFor: fileName in: directory do: aBlock [
directory addEntryNamed: fileName withContents: (String streamContents: aBlock).
]
Loading

0 comments on commit a354b7f

Please sign in to comment.