Skip to content

Commit ec73b9b

Browse files
authored
Updated repository to Tonel v3 source code format for output to Git. (#648)
1 parent 647bc79 commit ec73b9b

File tree

334 files changed

+3834
-3502
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

334 files changed

+3834
-3502
lines changed

dev/src/BaselineOfExercism/BaselineOfExercism.class.st

+13-12
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,34 @@
22
Project baseline to load entire Exercism Pharo track, including all its dependencies
33
"
44
Class {
5-
#name : #BaselineOfExercism,
6-
#superclass : #BaselineOf,
7-
#category : #BaselineOfExercism
5+
#name : 'BaselineOfExercism',
6+
#superclass : 'BaselineOf',
7+
#category : 'BaselineOfExercism',
8+
#package : 'BaselineOfExercism'
89
}
910

10-
{ #category : #baselines }
11+
{ #category : 'baselines' }
1112
BaselineOfExercism class >> exerciseGoldenTestPackageNames [
1213
"Answer the list of exercise package names used for golden tests executed by Exercism's test runner"
1314

1415
^ #('Exercise@ExampleAllFail' 'Exercise@ExampleAllPass' 'Exercise@ExampleAllRaiseError' 'Exercise@ExampleEmptySolutionClass' 'Exercise@ExampleEmptySolutionFile' 'Exercise@ExampleErrorFailPass' 'Exercise@ExampleExtensionMethod' 'Exercise@ExampleSyntaxError' 'Exercise@ExampleTypoInMethodName')
1516
]
1617

17-
{ #category : #baselines }
18+
{ #category : 'baselines' }
1819
BaselineOfExercism class >> exercisePackageNames [
1920
"Answer the list of exercise package names (as we don't yet have proper projects)"
2021

2122
^ #('Exercise@Acronym' 'Exercise@Allergies' 'Exercise@Anagram' 'Exercise@ArmstrongNumbers' 'Exercise@AtbashCipher' 'Exercise@Binary' 'Exercise@BinarySearchTree' 'Exercise@Bowling' 'Exercise@CircularBuffer' 'Exercise@Clock' 'Exercise@CollatzConjecture' 'Exercise@Darts' 'Exercise@Diamond' 'Exercise@Die' 'Exercise@Etl' 'Exercise@FlattenArray' 'Exercise@Forth' 'Exercise@GradeSchool' 'Exercise@Grains' 'Exercise@Hamming' 'Exercise@HelloWorld' 'Exercise@HighScores' 'Exercise@IsbnVerifier' 'Exercise@Isogram' 'Exercise@Leap' 'Exercise@Luhn' 'Exercise@MatchingBrackets' 'Exercise@Matrix' 'Exercise@Minesweeper' 'Exercise@Pangram' 'Exercise@Proverb' 'Exercise@Raindrops' 'Exercise@ResistorColorDuo' 'Exercise@ReverseString' 'Exercise@RobotSimulator' 'Exercise@RomanNumerals' 'Exercise@SecretHandshake' 'Exercise@Sieve' 'Exercise@SimpleCipher' 'Exercise@SpaceAge' 'Exercise@SumOfMultiples' 'Exercise@Tournament' 'Exercise@TwelveDays' 'Exercise@TwoFer' 'Exercise@Welcome' 'Exercise@WordCount')
2223
]
2324

24-
{ #category : #baselines }
25+
{ #category : 'baselines' }
2526
BaselineOfExercism class >> exerciseTestPackageNames [
2627
"Answer the list of exercise package names used for testing (as we don't yet have proper projects)"
2728

2829
^ #('ExercismTests-ExerciseEmpty' 'ExercismTests-ExerciseMany' 'ExercismTests-ExerciseNormal' 'ExercismTests-ExerciseExtension')
2930
]
3031

31-
{ #category : #baselines }
32+
{ #category : 'baselines' }
3233
BaselineOfExercism >> baseline: spec [
3334
<baseline>
3435
spec
@@ -80,12 +81,12 @@ BaselineOfExercism >> baseline: spec [
8081
]
8182
]
8283

83-
{ #category : #baselines }
84+
{ #category : 'baselines' }
8485
BaselineOfExercism >> projectClass [
8586
^ MetacelloCypressBaselineProject
8687
]
8788

88-
{ #category : #baselines }
89+
{ #category : 'baselines' }
8990
BaselineOfExercism >> setExercismLogo [
9091
| exercismLogo |
9192
exercismLogo := (AlphaImageMorph
@@ -100,7 +101,7 @@ BaselineOfExercism >> setExercismLogo [
100101
World addMorph: exercismLogo
101102
]
102103

103-
{ #category : #baselines }
104+
{ #category : 'baselines' }
104105
BaselineOfExercism >> setUpDependencies: spec [
105106

106107
spec
@@ -120,14 +121,14 @@ BaselineOfExercism >> setUpDependencies: spec [
120121
with: [ spec repository: 'github://pavel-krivanek/Ring2'; loads: #(calypso)].
121122
]
122123

123-
{ #category : #baselines }
124+
{ #category : 'baselines' }
124125
BaselineOfExercism >> setUpExercisesFor: spec [
125126
self class exercisePackageNames, self class exerciseTestPackageNames
126127
do:
127128
[ :name | spec package: name with: [ spec requires: #('ExercismTools') ] ]
128129
]
129130

130-
{ #category : #baselines }
131+
{ #category : 'baselines' }
131132
BaselineOfExercism >> setUpGoldenTestsFor: spec [
132133

133134
self class exerciseGoldenTestPackageNames

dev/src/BaselineOfExercism/package.st

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Package { #name : #BaselineOfExercism }
1+
Package { #name : 'BaselineOfExercism' }

dev/src/Exercis@FlattenArray/FlattenArray.class.st

+6-5
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,20 @@ Mentor notes:
55
- can be rescursive or not
66
"
77
Class {
8-
#name : #FlattenArray,
9-
#superclass : #Object,
10-
#category : #'Exercis@FlattenArray'
8+
#name : 'FlattenArray',
9+
#superclass : 'Object',
10+
#category : 'Exercis@FlattenArray',
11+
#package : 'Exercis@FlattenArray'
1112
}
1213

13-
{ #category : #helper }
14+
{ #category : 'helper' }
1415
FlattenArray >> flatten: anObject onto: result [
1516
anObject isCollection
1617
ifTrue: [ anObject do: [ :item | self flatten: item onto: result ] ]
1718
ifFalse: [ anObject ifNotNil: [ result nextPut: anObject ] ]
1819
]
1920

20-
{ #category : #exercism }
21+
{ #category : 'exercism' }
2122
FlattenArray >> flattenArray: aCollection [
2223

2324
^(OrderedCollection streamContents: [ :s |

dev/src/Exercis@FlattenArray/FlattenArrayTest.class.st

+15-14
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,16 @@ output: [1,2,3,4,5]
1616
Without using the built-in flattening method, you can easily derive your own, but you will need to differeniate between what is a collection and what is not
1717
"
1818
Class {
19-
#name : #FlattenArrayTest,
20-
#superclass : #ExercismTest,
19+
#name : 'FlattenArrayTest',
20+
#superclass : 'ExercismTest',
2121
#instVars : [
2222
'flattenArrayCalculator'
2323
],
24-
#category : #'Exercis@FlattenArray'
24+
#category : 'Exercis@FlattenArray',
25+
#package : 'Exercis@FlattenArray'
2526
}
2627

27-
{ #category : #config }
28+
{ #category : 'config' }
2829
FlattenArrayTest class >> exercise [
2930
"Answer the configured exercise meta data for this exercise, an ExercismExercise"
3031

@@ -35,73 +36,73 @@ FlattenArrayTest class >> exercise [
3536
yourself
3637
]
3738

38-
{ #category : #config }
39+
{ #category : 'config' }
3940
FlattenArrayTest class >> uuid [
4041
"Answer a unique id for this exercise"
4142
^'aa15f716-9d41-0d00-9006-3c7208866539'
4243
]
4344

44-
{ #category : #config }
45+
{ #category : 'config' }
4546
FlattenArrayTest class >> version [
4647
"Generated from specification: 29 March 2019"
4748
^'1.2.0'
4849
]
4950

50-
{ #category : #running }
51+
{ #category : 'running' }
5152
FlattenArrayTest >> setUp [
5253
super setUp.
5354
flattenArrayCalculator := FlattenArray new
5455
]
5556

56-
{ #category : #tests }
57+
{ #category : 'tests' }
5758
FlattenArrayTest >> test01_NoNesting [
5859
| result |
5960

6061
result := flattenArrayCalculator flattenArray: #(0 1 2 ) .
6162
self assert: result equals: #(0 1 2 )
6263
]
6364

64-
{ #category : #tests }
65+
{ #category : 'tests' }
6566
FlattenArrayTest >> test02_FlattensArrayWithJustIntegersPresent [
6667
| result |
6768

6869
result := flattenArrayCalculator flattenArray: #(1 #(2 3 4 5 6 7 ) 8 ) .
6970
self assert: result equals: #(1 2 3 4 5 6 7 8 )
7071
]
7172

72-
{ #category : #tests }
73+
{ #category : 'tests' }
7374
FlattenArrayTest >> test03_5LevelNesting [
7475
| result |
7576

7677
result := flattenArrayCalculator flattenArray: #(0 2 #(#(2 3 ) 8 100 4 #(#(#(50 ) ) ) ) -2 ) .
7778
self assert: result equals: #(0 2 2 3 8 100 4 50 -2 )
7879
]
7980

80-
{ #category : #tests }
81+
{ #category : 'tests' }
8182
FlattenArrayTest >> test04_6LevelNesting [
8283
| result |
8384

8485
result := flattenArrayCalculator flattenArray: #(1 #(2 #(#(3 ) ) #(4 #(#(5 ) ) ) 6 7 ) 8 ) .
8586
self assert: result equals: #(1 2 3 4 5 6 7 8 )
8687
]
8788

88-
{ #category : #tests }
89+
{ #category : 'tests' }
8990
FlattenArrayTest >> test05_6LevelNestListWithNullValues [
9091
| result |
9192

9293
result := flattenArrayCalculator flattenArray: #(0 2 #(#(2 3 ) 8 #(#(100 ) ) nil #(#(nil ) ) ) -2 ) .
9394
self assert: result equals: #(0 2 2 3 8 100 -2 )
9495
]
9596

96-
{ #category : #tests }
97+
{ #category : 'tests' }
9798
FlattenArrayTest >> test06_AllValuesInNestedListAreNull [
9899
| result |
99100

100101
result := flattenArrayCalculator flattenArray: #(nil #(#(#(nil ) ) ) nil nil #(#(nil nil ) nil ) nil ) .
101102
self assert: result equals: #()
102103
]
103104

104-
{ #category : #tests }
105+
{ #category : 'tests' }
105106
FlattenArrayTest >> testMisuseOfSelector [
106107
self verifySolution: flattenArrayCalculator class avoidsSelector: #flattened
107108
]
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Package { #name : #'Exercis@FlattenArray' }
1+
Package { #name : 'Exercis@FlattenArray' }

dev/src/Exercise@Acronym/Acronym.class.st

+5-4
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
This solution shows the use of Stream processing.
33
"
44
Class {
5-
#name : #Acronym,
6-
#superclass : #Object,
7-
#category : #'Exercise@Acronym'
5+
#name : 'Acronym',
6+
#superclass : 'Object',
7+
#category : 'Exercise@Acronym',
8+
#package : 'Exercise@Acronym'
89
}
910

10-
{ #category : #exercism }
11+
{ #category : 'exercism' }
1112
Acronym >> abbreviatePhrase: aString [
1213
| words |
1314

dev/src/Exercise@Acronym/AcronymTest.class.st

+17-16
Original file line numberDiff line numberDiff line change
@@ -14,105 +14,106 @@ Try to find a way to split up a String and then iterate over the resulting secti
1414
1515
"
1616
Class {
17-
#name : #AcronymTest,
18-
#superclass : #ExercismTest,
17+
#name : 'AcronymTest',
18+
#superclass : 'ExercismTest',
1919
#instVars : [
2020
'acronymCalculator'
2121
],
22-
#category : #'Exercise@Acronym'
22+
#category : 'Exercise@Acronym',
23+
#package : 'Exercise@Acronym'
2324
}
2425

25-
{ #category : #config }
26+
{ #category : 'config' }
2627
AcronymTest class >> exercise [
2728
^(self createExerciseAfter: ReverseStringTest)
2829
difficulty: 2;
2930
topics: #('strings' 'iteration' 'parsing');
3031
yourself
3132
]
3233

33-
{ #category : #config }
34+
{ #category : 'config' }
3435
AcronymTest class >> uuid [
3536
"Answer a unique id for this exercise"
3637
^'dc7b1fff-f0be-460d-b146-ee84c2acc10b'
3738
]
3839

39-
{ #category : #config }
40+
{ #category : 'config' }
4041
AcronymTest class >> version [
4142
"Generated from specification: 25 February 2019"
4243
^'1.7.0'
4344
]
4445

45-
{ #category : #running }
46+
{ #category : 'running' }
4647
AcronymTest >> setUp [
4748
super setUp.
4849
acronymCalculator := Acronym new
4950
]
5051

51-
{ #category : #tests }
52+
{ #category : 'tests' }
5253
AcronymTest >> test01_AbbreviateAPhraseBasic [
5354
| result |
5455

5556
result := acronymCalculator abbreviatePhrase: 'Portable Network Graphics' .
5657
self assert: result equals: 'PNG'
5758
]
5859

59-
{ #category : #tests }
60+
{ #category : 'tests' }
6061
AcronymTest >> test02_AbbreviateAPhraseLowercaseWords [
6162
| result |
6263

6364
result := acronymCalculator abbreviatePhrase: 'Ruby on Rails' .
6465
self assert: result equals: 'ROR'
6566
]
6667

67-
{ #category : #tests }
68+
{ #category : 'tests' }
6869
AcronymTest >> test03_AbbreviateAPhrasePunctuation [
6970
| result |
7071

7172
result := acronymCalculator abbreviatePhrase: 'First In, First Out' .
7273
self assert: result equals: 'FIFO'
7374
]
7475

75-
{ #category : #tests }
76+
{ #category : 'tests' }
7677
AcronymTest >> test04_AbbreviateAPhraseAllCapsWord [
7778
| result |
7879

7980
result := acronymCalculator abbreviatePhrase: 'GNU Image Manipulation Program' .
8081
self assert: result equals: 'GIMP'
8182
]
8283

83-
{ #category : #tests }
84+
{ #category : 'tests' }
8485
AcronymTest >> test05_AbbreviateAPhrasePunctuationWithoutWhitespace [
8586
| result |
8687

8788
result := acronymCalculator abbreviatePhrase: 'Complementary metal-oxide semiconductor' .
8889
self assert: result equals: 'CMOS'
8990
]
9091

91-
{ #category : #tests }
92+
{ #category : 'tests' }
9293
AcronymTest >> test06_AbbreviateAPhraseVeryLongAbbreviation [
9394
| result |
9495

9596
result := acronymCalculator abbreviatePhrase: 'Rolling On The Floor Laughing So Hard That My Dogs Came Over And Licked Me' .
9697
self assert: result equals: 'ROTFLSHTMDCOALM'
9798
]
9899

99-
{ #category : #tests }
100+
{ #category : 'tests' }
100101
AcronymTest >> test07_AbbreviateAPhraseConsecutiveDelimiters [
101102
| result |
102103

103104
result := acronymCalculator abbreviatePhrase: 'Something - I made up from thin air' .
104105
self assert: result equals: 'SIMUFTA'
105106
]
106107

107-
{ #category : #tests }
108+
{ #category : 'tests' }
108109
AcronymTest >> test08_AbbreviateAPhraseApostrophes [
109110
| result |
110111

111112
result := acronymCalculator abbreviatePhrase: 'Halley''s Comet' .
112113
self assert: result equals: 'HC'
113114
]
114115

115-
{ #category : #tests }
116+
{ #category : 'tests' }
116117
AcronymTest >> test09_AbbreviateAPhraseUnderscoreEmphasis [
117118
| result |
118119

dev/src/Exercise@Acronym/package.st

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Package { #name : #'Exercise@Acronym' }
1+
Package { #name : 'Exercise@Acronym' }

0 commit comments

Comments
 (0)