Skip to content

Commit

Permalink
Cleanup newlines and blanks in "package: 'Ombu'" packages
Browse files Browse the repository at this point in the history
Fix #10587
  • Loading branch information
astares committed Dec 4, 2021
1 parent 062a575 commit 7c65878
Show file tree
Hide file tree
Showing 20 changed files with 8 additions and 47 deletions.
3 changes: 0 additions & 3 deletions src/Ombu-Tests/OmFileStoreTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ OmFileStoreTest >> testEnsureDeleteFile [
yourself.

self assert: loadedStore entriesCount equals: 0.

]

{ #category : #tests }
Expand All @@ -63,7 +62,6 @@ OmFileStoreTest >> testIsOutdated [
self assert: copy isOutdated.
store ensureDeleteFile.
self deny: copy isOutdated.

]

{ #category : #tests }
Expand Down Expand Up @@ -160,7 +158,6 @@ OmFileStoreTest >> testLoadFromCorruptFile4 [
self
should: [ loadedStore refresh; entries ]
raise: OmFileStoreReadingError.

]

{ #category : #tests }
Expand Down
3 changes: 1 addition & 2 deletions src/Ombu-Tests/OmSessionStoreTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ OmSessionStoreTest >> tearDown [

(self directoryForTests / 'test-sessions-main') ensureDeleteAll.
(self directoryForTests / 'test-sessions-other') ensureDeleteAll.
super tearDown.
super tearDown.
]

{ #category : #tests }
Expand Down Expand Up @@ -88,7 +88,6 @@ OmSessionStoreTest >> testResetWithStoreNamedDoesAnnounce [
ensure: [ store announcer unsubscribe: self ].

self assert: wasAnnounced

]

{ #category : #tests }
Expand Down
1 change: 0 additions & 1 deletion src/Ombu-Tests/OmStoreFactoryTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,4 @@ OmStoreFactoryTest >> testStoreNamed [
"tearDown in test"
store flush.
store ensureDeleteFile.

]
2 changes: 0 additions & 2 deletions src/Ombu-Tests/OmStoreTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ OmStoreTest >> tearDown [
store flush.
otherStore flush.
super tearDown

]

{ #category : #tests }
Expand Down Expand Up @@ -162,7 +161,6 @@ OmStoreTest >> testEntryReferences [
ifAbsent: [ self fail ] ].

self assert: entryReferences size equals: 7. "To be sure it tests something"

]

{ #category : #tests }
Expand Down
5 changes: 0 additions & 5 deletions src/Ombu/OmBlock.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ OmBlock class >> store: anOmBlockFileStore startPosition: aStartPosition endPosi
endPosition: anEndPosition
firstEntryReference: anOmReference;
yourself

]

{ #category : #accessing }
Expand Down Expand Up @@ -69,7 +68,6 @@ OmBlock >> initializeWithStore: anOmBlockFileStore startPosition: aStartPosition
startPosition := aStartPosition.
endPosition := anEndPosition.
firstEntryReference := anOmReference.

]

{ #category : #accessing }
Expand All @@ -78,7 +76,6 @@ OmBlock >> lastLocalNameAsInteger [
self checkIfMustRefreshBlock.

^ positions size + self firstLocalNameAsInteger - 1.

]

{ #category : #accessing }
Expand All @@ -99,7 +96,6 @@ OmBlock >> printOn: aStream [
nextPutAll: '..';
print: endPosition;
nextPut: $).

]

{ #category : #refreshing }
Expand All @@ -116,7 +112,6 @@ OmBlock >> refreshIfNeededStartingAt: firstStreamPosition since: initialLocalNam

"Then, it's only partially loaded i.e. outdated."
positions addAll: (store entryPositionsStartingAt: firstStreamPosition upTo: endPosition).

]

{ #category : #accessing }
Expand Down
4 changes: 0 additions & 4 deletions src/Ombu/OmBlockFileStore.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ OmBlockFileStore >> readEntryForLocalName: aString ifPresent: presentBlockClosur
ifPresent: [ :position |
presentBlockClosure value: (self nextEntryFromPosition: position) ]
ifAbsent: absentBlockClosure

]

{ #category : #refreshing }
Expand Down Expand Up @@ -85,15 +84,13 @@ OmBlockFileStore >> refreshEntryPositionsByLocalNameStartingAt: firstStreamPosit
"Add new blocks if necessary"
lastStreamPosition > lastBlock endPosition ifTrue: [
self readEntriesWith: [:readStream | self refreshNewBlocksFrom: readStream ] ].

]

{ #category : #refreshing }
OmBlockFileStore >> refreshHeadReferenceAndEntryCountFrom: readStream [

entryCount := blocks last lastLocalNameAsInteger.
headReference := self referenceToLocalName: entryCount asString.

]

{ #category : #refreshing }
Expand All @@ -116,5 +113,4 @@ OmBlockFileStore >> refreshNewBlocksFrom: readStream [
firstEntryReference: (self referenceTo: blockFirstEntry)).
] ifNone: [ ^self "No more entries to add in a new block" ].
]

]
1 change: 0 additions & 1 deletion src/Ombu/OmDeferrer.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ OmDeferrer class >> initialize [
self initialize
"
SessionManager default registerUserClassNamed: self name

]

{ #category : #'instance creation' }
Expand Down
2 changes: 1 addition & 1 deletion src/Ombu/OmEntry.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ OmEntry >> printOn: aStream [
{ #category : #accessing }
OmEntry >> tagAt: aKey [

^ self tags at: aKey
^ self tags at: aKey
]

{ #category : #accessing }
Expand Down
1 change: 0 additions & 1 deletion src/Ombu/OmEntryReader.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ OmEntryReader class >> newForStore: aFileStore [
^ self basicNew
initializeWithStore: aFileStore;
yourself

]

{ #category : #reading }
Expand Down
1 change: 0 additions & 1 deletion src/Ombu/OmEntryWriter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ OmEntryWriter class >> newForStore: aFileStore [
^ self basicNew
initializeWithStore: aFileStore;
yourself

]

{ #category : #initialization }
Expand Down
6 changes: 0 additions & 6 deletions src/Ombu/OmFileStore.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ OmFileStore class >> existsStoreNamed: aGlobalName inDirectory: aFileReference [
(self
fileReferenceForStoreNamed: aGlobalName
inDirectory: aFileReference) exists ]

]

{ #category : #accessing }
Expand Down Expand Up @@ -142,7 +141,6 @@ OmFileStore >> entriesDo: aBlockClosure [
"Finally, the entries still not written"
self entryBufferDo: [:entryAndLocalName |
aBlockClosure value: entryAndLocalName key ].

]

{ #category : #private }
Expand Down Expand Up @@ -182,7 +180,6 @@ OmFileStore >> entryFor: aReference ifPresent: presentBlockClosure ifAbsent: abs
self entryByLocalName at: aReference localName put: entry.
presentBlockClosure value: entry ]
ifAbsent: absentBlockClosure ]

]

{ #category : #private }
Expand Down Expand Up @@ -258,7 +255,6 @@ OmFileStore >> flushEntryBuffer [
] ensure: [ fileStream close ].

self refreshEntryPositionsByLocalNameStartingAt: initialPosition since: initialLocalName ].

]

{ #category : #accessing }
Expand Down Expand Up @@ -293,7 +289,6 @@ OmFileStore >> initializeWithGlobalName: aName fileReference: aFileReference [
globalName := aName.
fileReference := aFileReference.
mustRefresh := fileReference exists. "Late file read"

]

{ #category : #testing }
Expand Down Expand Up @@ -386,7 +381,6 @@ OmFileStore >> readEntryForLocalName: aString ifPresent: presentBlockClosure ifA
ifPresent: [ :position |
presentBlockClosure value: (self nextEntryFromPosition: position) ]
ifAbsent: absentBlockClosure

]

{ #category : #refreshing }
Expand Down
2 changes: 1 addition & 1 deletion src/Ombu/OmFileStoreReadingError.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ Class {
{ #category : #'instance creation' }
OmFileStoreReadingError class >> readingError: sourceError on: aFileReference position: aFilePosition [

^ self new messageText: 'Reading entry from ', aFileReference asString, '@', aFilePosition asString, ': ', sourceError messageText
^ self new messageText: 'Reading entry from ', aFileReference asString, '@', aFilePosition asString, ': ', sourceError messageText
]
1 change: 0 additions & 1 deletion src/Ombu/OmMemoryStore.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ OmMemoryStore >> newEntry: anEntry [
newReference := self referenceToLocalName: localName.
anEntry tags at: self selfReferenceKey put: newReference.
entries add: anEntry.

]

{ #category : #refreshing }
Expand Down
4 changes: 1 addition & 3 deletions src/Ombu/OmNullStore.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Class {
{ #category : #enumerating }
OmNullStore >> entriesDo: aBlockClosure [
"Evaluate aBlockClosure with every entries this store contains"

]

{ #category : #accessing }
Expand All @@ -30,12 +29,11 @@ OmNullStore >> headReference [
{ #category : #writing }
OmNullStore >> newEntry: anEntry [

self shouldNotImplement
self shouldNotImplement
]

{ #category : #refreshing }
OmNullStore >> refresh [

]

{ #category : #accessing }
Expand Down
1 change: 0 additions & 1 deletion src/Ombu/OmReference.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ OmReference class >> fromSton: stonReader [
self
globalName: array first
localName: array second ]

]

{ #category : #'instance creation' }
Expand Down
2 changes: 0 additions & 2 deletions src/Ombu/OmSTONEntryReader.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ OmSTONEntryReader >> entryPositionsReverseDo: aBlock [
aBlock value: stream position.

] doWhileTrue: true

]

{ #category : #reading }
Expand Down Expand Up @@ -97,5 +96,4 @@ OmSTONEntryReader >> stream: aReadStream [

super stream: aReadStream.
self stonReader on: stream.

]
1 change: 0 additions & 1 deletion src/Ombu/OmSequentialSuffixStrategy.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ OmSequentialSuffixStrategy >> nextTo: aName in: aDirectory [
inDirectory: aDirectory.

^ fileReference nextVersion basenameWithoutExtension

]
6 changes: 1 addition & 5 deletions src/Ombu/OmSessionStore.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ OmSessionStore class >> initialize [

registry := WeakSet new: 5.
SessionManager default registerUserClassNamed: self name

]

{ #category : #'instance creation' }
Expand All @@ -60,7 +59,7 @@ OmSessionStore class >> newWithBaseLocator: aBaseDirectory [
{ #category : #initialization }
OmSessionStore class >> register: aSessionStore [

registry add: aSessionStore
registry add: aSessionStore
]

{ #category : #initialization }
Expand Down Expand Up @@ -122,7 +121,6 @@ OmSessionStore >> entryFor: aReference ifPresent: presentBlockClosure ifAbsent:
OmSessionStore >> existsStoreNamed: aName [

^ OmFileStore existsStoreNamed: aName inDirectory: self directory

]

{ #category : #refreshing }
Expand Down Expand Up @@ -163,7 +161,6 @@ OmSessionStore >> initializeWithBaseLocator: aDirectoryFileLocator [
headReference := self store headReference.

self class register: self.

]

{ #category : #accessing }
Expand Down Expand Up @@ -199,7 +196,6 @@ OmSessionStore >> nextStoreName [
currentStore globalName ].

^ self storeNameStrategy nextTo: name in: self directory

]

{ #category : #refreshing }
Expand Down
7 changes: 3 additions & 4 deletions src/Ombu/OmStore.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ OmStore >> entriesCount [
OmStore >> entriesDo: aBlockClosure [
"Evaluate aBlockClosure with every entries this store contains"

^ self subclassResponsibility
^ self subclassResponsibility
]

{ #category : #accessing }
Expand All @@ -54,7 +54,6 @@ OmStore >> entryFor: aReference [
entryFor: aReference
ifPresent: [ :anEntry | ^ anEntry ]
ifAbsent: [ NotFound signalFor: aReference ]

]

{ #category : #accessing }
Expand Down Expand Up @@ -103,7 +102,7 @@ OmStore >> lowLevelFileStoreIfNone: aBlock [
OmStore >> newEntry: anEntry [
"Persist a new entry"

self subclassResponsibility
self subclassResponsibility
]

{ #category : #accessing }
Expand Down Expand Up @@ -137,5 +136,5 @@ OmStore >> selfReferenceKey [
OmStore >> writingFileReference [
"Answer the file reference where the method #newEntry: would persist a new entry."

self subclassResponsibility
self subclassResponsibility
]
2 changes: 0 additions & 2 deletions src/Ombu/OmStoreFactory.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ OmStoreFactory >> initialize [
super initialize.

storeByPath := WeakValueDictionary new.

]

{ #category : #accessing }
Expand All @@ -88,7 +87,6 @@ OmStoreFactory >> named: aGlobalName inDirectory: aDirectory [
newStore := self newStoreNamed: aGlobalName in: aDirectory.
storeByPath at: fileReference fullName put: newStore.
newStore ]

]

{ #category : #private }
Expand Down

0 comments on commit 7c65878

Please sign in to comment.