-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor and fix SquotCodeMapper and subclasses
* Move common code to superclass * While cleaning the package directory, keep metadata files
- Loading branch information
Showing
29 changed files
with
77 additions
and
71 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
src/Squot.package/SqueakWorkingCopy.class/instance/mapperThatMaps..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
paths | ||
mapperThatMaps: aPath | ||
^ self allMappers | ||
detect: [:mapper | mapper mappedPathPatterns anySatisfy: [:each | each matches: aPath]] | ||
detect: [:mapper | mapper maps: aPath] | ||
ifNone: [nil] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
src/Squot.package/SquotCodeMapper.class/instance/cleanDirectory..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
changes-operations | ||
cleanDirectory: aReference | ||
aReference ensureDirectory. | ||
aReference children do: [:each | | ||
(SquotMetadataMapper new maps: each path) | ||
ifFalse: [each deleteAll]]. |
3 changes: 3 additions & 0 deletions
3
src/Squot.package/SquotCodeMapper.class/instance/expectedReadErrorsOnMissingSnapshot.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
snapshot-creation | ||
expectedReadErrorsOnMissingSnapshot | ||
^ DirectoryDoesNotExist |
4 changes: 3 additions & 1 deletion
4
src/Squot.package/SquotCodeMapper.class/instance/loadSnapshotFrom..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
snapshot-creation | ||
loadSnapshotFrom: aFilesystem | ||
self subclassResponsibility. | ||
^ [(self readerOn: (self packageDirectoryIn: aFilesystem)) version snapshot] | ||
on: self expectedReadErrorsOnMissingSnapshot | ||
do: [^ MCSnapshot empty] |
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
src/Squot.package/SquotCodeMapper.class/instance/readerOn..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
snapshot-creation | ||
readerOn: aReference | ||
self subclassResponsibility. |
8 changes: 7 additions & 1 deletion
8
src/Squot.package/SquotCodeMapper.class/instance/serialize.into..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
changes-operations | ||
serialize: aSnapshot into: aFileSystem | ||
self subclassResponsibility. | ||
| directory | | ||
directory := self packageDirectoryIn: aFileSystem. | ||
aSnapshot definitions | ||
ifEmpty: [directory deleteAll] | ||
ifNotEmpty: [ | ||
self cleanDirectory: directory. | ||
self write: aSnapshot with: (self writerOn: directory)]. |
3 changes: 3 additions & 0 deletions
3
src/Squot.package/SquotCodeMapper.class/instance/write.with..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
changes-operations | ||
write: aSnapshot with: writerObject | ||
self subclassResponsibility. |
3 changes: 3 additions & 0 deletions
3
src/Squot.package/SquotCodeMapper.class/instance/writerOn..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
changes-operations | ||
writerOn: aReference | ||
self subclassResponsibility. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
src/Squot.package/SquotCypressMapper.class/instance/loadSnapshotFrom..st
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
src/Squot.package/SquotCypressMapper.class/instance/readerIn..st
This file was deleted.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
src/Squot.package/SquotCypressMapper.class/instance/readerOn..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
snapshot-creation | ||
readerOn: aReference | ||
^ (self readerClass on: aReference) | ||
fileUtils: (self fileUtilsOn: aReference); | ||
packageDirectory: aReference pathString; | ||
yourself |
9 changes: 0 additions & 9 deletions
9
src/Squot.package/SquotCypressMapper.class/instance/serialize.into..st
This file was deleted.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
src/Squot.package/SquotCypressMapper.class/instance/write.with..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
changes-operations | ||
write: aSnapshot with: aWriter | ||
aWriter writeDefinitions: aSnapshot definitions. |
12 changes: 5 additions & 7 deletions
12
...CypressMapper.class/instance/writerIn..st → ...CypressMapper.class/instance/writerOn..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
testing | ||
maps: aPath | ||
^ self mappedPathPatterns anySatisfy: [:each | each matches: aPath] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
src/Squot.package/SquotTonelMapper.class/instance/expectedReadErrorsOnMissingSnapshot.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
snapshot-creation | ||
expectedReadErrorsOnMissingSnapshot | ||
^ super expectedReadErrorsOnMissingSnapshot, TonelParseError |
5 changes: 0 additions & 5 deletions
5
src/Squot.package/SquotTonelMapper.class/instance/loadSnapshotFrom..st
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
src/Squot.package/SquotTonelMapper.class/instance/readerIn..st
This file was deleted.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
src/Squot.package/SquotTonelMapper.class/instance/readerOn..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
snapshot-creation | ||
readerOn: aReference | ||
^ TonelReader | ||
on: aReference parent | ||
fileName: self package name |
7 changes: 0 additions & 7 deletions
7
src/Squot.package/SquotTonelMapper.class/instance/serialize.into..st
This file was deleted.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
src/Squot.package/SquotTonelMapper.class/instance/write.with..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
changes-operations | ||
write: aSnapshot with: aWriter | ||
aWriter writeSnapshot: aSnapshot. |
4 changes: 2 additions & 2 deletions
4
...otTonelMapper.class/instance/writerIn..st → ...otTonelMapper.class/instance/writerOn..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters