Skip to content

Commit acecb67

Browse files
committed
Fixing two more tests. builder text:
1 parent 6731fd6 commit acecb67

12 files changed

+217
-203
lines changed
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
Class {
2-
#name : #BookAsDocBuilder,
3-
#superclass : #Object,
2+
#name : 'BookAsDocBuilder',
3+
#superclass : 'Object',
44
#instVars : [
55
'metadata'
66
],
7-
#category : #'Pillar-ExporterMicrodown'
7+
#category : 'Pillar-ExporterMicrodown',
8+
#package : 'Pillar-ExporterMicrodown'
89
}
910

10-
{ #category : #stuff }
11+
{ #category : 'stuff' }
1112
BookAsDocBuilder >> bookFiles [
1213

1314
^ PRInputFileFinder
1415
fromFileIndex: self fileIndex; files
1516
]
1617

17-
{ #category : #stuff }
18+
{ #category : 'stuff' }
1819
BookAsDocBuilder >> fileIndex [
1920
"self new readingTitle"
2021

@@ -24,7 +25,7 @@ BookAsDocBuilder >> fileIndex [
2425
PRPillarParser parse: index contents
2526
]
2627

27-
{ #category : #stuff }
28+
{ #category : 'stuff' }
2829
BookAsDocBuilder >> loadMetaData [
2930
"self new readingTitle"
3031

@@ -35,7 +36,7 @@ BookAsDocBuilder >> loadMetaData [
3536

3637
]
3738

38-
{ #category : #stuff }
39+
{ #category : 'stuff' }
3940
BookAsDocBuilder >> title [
4041
^ metadata at: #title ifAbsent: [ 'Strange there is no title' ]
4142
]

src/Pillar-ExporterMicrodown/ClapPillarMicrodownBookConverterCommand.class.st

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,18 @@ I am a command line handler to convert a pillar file (for now) in a microdown fi
66
`./pillar convertBook SUnit.pillar`
77
"
88
Class {
9-
#name : #ClapPillarMicrodownBookConverterCommand,
10-
#superclass : #ClapPillarCommand,
11-
#category : #'Pillar-ExporterMicrodown'
9+
#name : 'ClapPillarMicrodownBookConverterCommand',
10+
#superclass : 'ClapPillarCommand',
11+
#category : 'Pillar-ExporterMicrodown',
12+
#package : 'Pillar-ExporterMicrodown'
1213
}
1314

14-
{ #category : #accessing }
15+
{ #category : 'accessing' }
1516
ClapPillarMicrodownBookConverterCommand class >> commandName [
1617
^'convertBook'
1718
]
1819

19-
{ #category : #'command line' }
20+
{ #category : 'command line' }
2021
ClapPillarMicrodownBookConverterCommand class >> commandSpecification [
2122
<commandline>
2223
^ (ClapCommand id: self commandName asSymbol)
@@ -30,7 +31,7 @@ ClapPillarMicrodownBookConverterCommand class >> commandSpecification [
3031
(self with: args) execute ]
3132
]
3233

33-
{ #category : #execution }
34+
{ #category : 'execution' }
3435
ClapPillarMicrodownBookConverterCommand >> execute [
3536
| file |
3637
file := self requestedFile asString asFileReference.
@@ -39,7 +40,7 @@ ClapPillarMicrodownBookConverterCommand >> execute [
3940
ifFalse: [ self outputStreamDo: [ :str | str nextPutAll: 'File ', file fullName, ' does not exist' ] ]
4041
]
4142

42-
{ #category : #execution }
43+
{ #category : 'execution' }
4344
ClapPillarMicrodownBookConverterCommand >> requestedFile [
4445
^ (arguments at: #requestedFile) value: self
4546
]

src/Pillar-ExporterMicrodown/ClapPillarMicrodownChapterConverterCommand.class.st

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,18 @@ I am a command line handler to convert a pillar file (for now) in a microdown fi
66
`./pillar convertChapter SUnit.pillar`
77
"
88
Class {
9-
#name : #ClapPillarMicrodownChapterConverterCommand,
10-
#superclass : #ClapPillarCommand,
11-
#category : #'Pillar-ExporterMicrodown'
9+
#name : 'ClapPillarMicrodownChapterConverterCommand',
10+
#superclass : 'ClapPillarCommand',
11+
#category : 'Pillar-ExporterMicrodown',
12+
#package : 'Pillar-ExporterMicrodown'
1213
}
1314

14-
{ #category : #accessing }
15+
{ #category : 'accessing' }
1516
ClapPillarMicrodownChapterConverterCommand class >> commandName [
1617
^'convertChapter'
1718
]
1819

19-
{ #category : #'command line' }
20+
{ #category : 'command line' }
2021
ClapPillarMicrodownChapterConverterCommand class >> commandSpecification [
2122
<commandline>
2223
^ (ClapCommand id: self commandName asSymbol)
@@ -30,7 +31,7 @@ ClapPillarMicrodownChapterConverterCommand class >> commandSpecification [
3031
(self with: args) execute ]
3132
]
3233

33-
{ #category : #execution }
34+
{ #category : 'execution' }
3435
ClapPillarMicrodownChapterConverterCommand >> execute [
3536
| file |
3637
file := self requestedFile asString asFileReference.
@@ -39,7 +40,7 @@ ClapPillarMicrodownChapterConverterCommand >> execute [
3940
ifFalse: [ self outputStreamDo: [ :str | str nextPutAll: 'File ', file fullName, ' does not exist' ] ]
4041
]
4142

42-
{ #category : #activation }
43+
{ #category : 'activation' }
4344
ClapPillarMicrodownChapterConverterCommand >> requestedFile [
4445
^ (arguments at: #requestedFile) value: self
4546
]

src/Pillar-ExporterMicrodown/ClapPillarMicrodownSlideConverterCommand.class.st

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,18 @@ I am a command line handler to convert a pillar slide file in a microdown file i
66
`./pillar convertSlide SUnit.pillar`
77
"
88
Class {
9-
#name : #ClapPillarMicrodownSlideConverterCommand,
10-
#superclass : #ClapPillarCommand,
11-
#category : #'Pillar-ExporterMicrodown'
9+
#name : 'ClapPillarMicrodownSlideConverterCommand',
10+
#superclass : 'ClapPillarCommand',
11+
#category : 'Pillar-ExporterMicrodown',
12+
#package : 'Pillar-ExporterMicrodown'
1213
}
1314

14-
{ #category : #accessing }
15+
{ #category : 'accessing' }
1516
ClapPillarMicrodownSlideConverterCommand class >> commandName [
1617
^'convertSlide'
1718
]
1819

19-
{ #category : #'command line' }
20+
{ #category : 'command line' }
2021
ClapPillarMicrodownSlideConverterCommand class >> commandSpecification [
2122
<commandline>
2223
^ (ClapCommand id: self commandName asSymbol)
@@ -30,7 +31,7 @@ ClapPillarMicrodownSlideConverterCommand class >> commandSpecification [
3031
(self with: args) execute ]
3132
]
3233

33-
{ #category : #execution }
34+
{ #category : 'execution' }
3435
ClapPillarMicrodownSlideConverterCommand >> execute [
3536
| file |
3637
file := self requestedFile asString asFileReference.
@@ -39,7 +40,7 @@ ClapPillarMicrodownSlideConverterCommand >> execute [
3940
ifFalse: [ self outputStreamDo: [ :str | str nextPutAll: 'File ', file fullName, ' does not exist' ] ]
4041
]
4142

42-
{ #category : #activation }
43+
{ #category : 'activation' }
4344
ClapPillarMicrodownSlideConverterCommand >> requestedFile [
4445
^ (arguments at: #requestedFile) value: self
4546
]

src/Pillar-ExporterMicrodown/PRConverterToMic.class.st

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@ PRConverterToMic new goForBook: '/Users/ducasse/Workspace/FirstCircle/ActiveRese
44
```
55
"
66
Class {
7-
#name : #PRConverterToMic,
8-
#superclass : #Object,
7+
#name : 'PRConverterToMic',
8+
#superclass : 'Object',
99
#pools : [
1010
'MicroSharedPool'
1111
],
12-
#category : #'Pillar-ExporterMicrodown'
12+
#category : 'Pillar-ExporterMicrodown',
13+
#package : 'Pillar-ExporterMicrodown'
1314
}
1415

15-
{ #category : #conversion }
16+
{ #category : 'conversion' }
1617
PRConverterToMic >> convertBook: aPath [
1718

1819
| input paths |
@@ -23,14 +24,14 @@ PRConverterToMic >> convertBook: aPath [
2324
paths do: [ :path | self convertChapter: path ]
2425
]
2526

26-
{ #category : #conversion }
27+
{ #category : 'conversion' }
2728
PRConverterToMic >> convertChapter: aPath [
2829
| input |
2930
input := PRPillarParser parse: aPath readStream contents.
3031
self writeMicrodownOn: aPath forInput: input
3132
]
3233

33-
{ #category : #conversion }
34+
{ #category : 'conversion' }
3435
PRConverterToMic >> convertSlide: aPath [
3536

3637
| input firstParagraph dict metadata |
@@ -43,7 +44,7 @@ PRConverterToMic >> convertSlide: aPath [
4344
self writeMicrodownOn: aPath forInput: input
4445
]
4546

46-
{ #category : #collect }
47+
{ #category : 'collect' }
4748
PRConverterToMic >> getInputFilesPaths: aString [
4849

4950
| paths |
@@ -56,7 +57,7 @@ PRConverterToMic >> getInputFilesPaths: aString [
5657
^ paths
5758
]
5859

59-
{ #category : #config }
60+
{ #category : 'config' }
6061
PRConverterToMic >> handleConfigFile [
6162
"We copy the config file to 'pillarconf.old'
6263
then we migrate it."
@@ -80,7 +81,7 @@ PRConverterToMic >> handleConfigFile [
8081
ifFalse: [ Stdio stdout nextPutAll: conf fullName , ' does not exist']
8182
]
8283

83-
{ #category : #conversion }
84+
{ #category : 'conversion' }
8485
PRConverterToMic >> writeMicrodownOn: aPath forInput: input [
8586

8687
| fileReference |

src/Pillar-ExporterMicrodown/PRInputFileFinder.class.st

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,44 @@
22
I'm a visitor that returns all the `${inputFile:path=xxx}$` in a document.
33
"
44
Class {
5-
#name : #PRInputFileFinder,
6-
#superclass : #PRVisitor,
5+
#name : 'PRInputFileFinder',
6+
#superclass : 'PRVisitor',
77
#instVars : [
88
'metadata',
99
'files'
1010
],
11-
#category : #'Pillar-ExporterMicrodown'
11+
#category : 'Pillar-ExporterMicrodown',
12+
#package : 'Pillar-ExporterMicrodown'
1213
}
1314

14-
{ #category : #creation }
15+
{ #category : 'creation' }
1516
PRInputFileFinder class >> fromFileIndex: aFileReference [
1617

1718
^ self new
1819
fromFileIndex: aFileReference;
1920
yourself
2021
]
2122

22-
{ #category : #accessing }
23+
{ #category : 'accessing' }
2324
PRInputFileFinder >> files [
2425
^ files
2526
]
2627

27-
{ #category : #API }
28+
{ #category : 'API' }
2829
PRInputFileFinder >> fromFileIndex: aFileReference [
2930

3031
self start: (PRPillarParser parse: aFileReference contents)
3132

3233
]
3334

34-
{ #category : #accessing }
35+
{ #category : 'accessing' }
3536
PRInputFileFinder >> initialize [
3637

3738
super initialize.
3839
files := OrderedCollection new.
3940
]
4041

41-
{ #category : #visiting }
42+
{ #category : 'visiting' }
4243
PRInputFileFinder >> visitInputFileAnnotation: anInputFileAnnotation [
4344

4445
files add: anInputFileAnnotation path

src/Pillar-ExporterMicrodown/PRInputFileFinderTest.class.st

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
Class {
2-
#name : #PRInputFileFinderTest,
3-
#superclass : #TestCase,
2+
#name : 'PRInputFileFinderTest',
3+
#superclass : 'TestCase',
44
#instVars : [
55
'memory',
66
'filesystem',
77
'index'
88
],
9-
#category : #'Pillar-ExporterMicrodown'
9+
#category : 'Pillar-ExporterMicrodown',
10+
#package : 'Pillar-ExporterMicrodown'
1011
}
1112

12-
{ #category : #accessing }
13+
{ #category : 'accessing' }
1314
PRInputFileFinderTest class >> indexPillar [
1415

1516
^ '%reviewed SD: 4th of march
@@ -58,7 +59,7 @@ ${inputFile:path=Chapters/Reflection/Reflection.pillar}$
5859
'
5960
]
6061

61-
{ #category : #running }
62+
{ #category : 'running' }
6263
PRInputFileFinderTest >> setUp [
6364
super setUp.
6465
filesystem := FileSystem memory.
@@ -67,7 +68,7 @@ PRInputFileFinderTest >> setUp [
6768

6869
]
6970

70-
{ #category : #running }
71+
{ #category : 'running' }
7172
PRInputFileFinderTest >> testFinderFindInputFiles [
7273

7374
| files |
@@ -78,7 +79,7 @@ PRInputFileFinderTest >> testFinderFindInputFiles [
7879

7980
]
8081

81-
{ #category : #running }
82+
{ #category : 'running' }
8283
PRInputFileFinderTest >> testFinderFindInputFilesFromFileIndex [
8384

8485

src/Pillar-ExporterMicrodown/PRMicrodownInputDocumentTest.class.st

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,51 @@
11
Class {
2-
#name : #PRMicrodownInputDocumentTest,
3-
#superclass : #PRInputDocumentTest,
4-
#category : #'Pillar-ExporterMicrodown'
2+
#name : 'PRMicrodownInputDocumentTest',
3+
#superclass : 'PRInputDocumentTest',
4+
#category : 'Pillar-ExporterMicrodown',
5+
#package : 'Pillar-ExporterMicrodown'
56
}
67

7-
{ #category : #tests }
8+
{ #category : 'tests' }
89
PRMicrodownInputDocumentTest >> testParsedDocument [
910

1011
| doc |
1112
doc := ((PRInputDocument inputClassForFile: memoryFileSystem / 'input1.md') new file: memoryFileSystem / 'input1.md') parsedDocument.
1213
self assert: doc class equals: MicRootBlock
1314
]
1415

15-
{ #category : #tests }
16+
{ #category : 'tests' }
1617
PRMicrodownInputDocumentTest >> testParsedDocument2 [
1718

1819
| doc |
1920
doc := (PRInputDocument forFile: memoryFileSystem / 'input1.md') parsedDocument.
2021
self assert: doc class equals: MicRootBlock
2122
]
2223

23-
{ #category : #tests }
24+
{ #category : 'tests' }
2425
PRMicrodownInputDocumentTest >> testParserClass [
2526

2627
| input |
2728
input := (PRInputDocument inputClassForFile: memoryFileSystem / 'input1.md') new.
2829
self assert: input parserClass equals: MicrodownParser
2930
]
3031

31-
{ #category : #tests }
32+
{ #category : 'tests' }
3233
PRMicrodownInputDocumentTest >> testParserClass2 [
3334

3435
| input |
3536
input := PRInputDocument forFile: memoryFileSystem / 'input1.md'.
3637
self assert: input parserClass equals: MicrodownParser
3738
]
3839

39-
{ #category : #tests }
40+
{ #category : 'tests' }
4041
PRMicrodownInputDocumentTest >> testRegistration [
4142

4243
| inputClass |
4344
inputClass := PRInputDocument inputClassForFile: memoryFileSystem / 'input1.md'.
4445
self assert: inputClass equals: MicMicrodownInputDocument
4546
]
4647

47-
{ #category : #tests }
48+
{ #category : 'tests' }
4849
PRMicrodownInputDocumentTest >> testRegistration2 [
4950

5051
| inputClass |

0 commit comments

Comments
 (0)