diff --git a/source/SnapDump-Core/Context.extension.st b/source/SnapDump-Core/Context.extension.st index d037ac7..6a0a898 100644 --- a/source/SnapDump-Core/Context.extension.st +++ b/source/SnapDump-Core/Context.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #Context } +Extension { #name : 'Context' } -{ #category : #'*SnapDump-Core' } +{ #category : '*SnapDump-Core' } Context >> asSnapshot [ ^ SDMemorySnapshot new setContext: self exceptionClassName: 'ContextWithoutException' diff --git a/source/SnapDump-Core/Exception.extension.st b/source/SnapDump-Core/Exception.extension.st index 1081ea0..5aae230 100644 --- a/source/SnapDump-Core/Exception.extension.st +++ b/source/SnapDump-Core/Exception.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #Exception } +Extension { #name : 'Exception' } -{ #category : #'*snapdump-core' } +{ #category : '*snapdump-core' } Exception >> asSnapshot [ ^ SDMemorySnapshot fromException: self ] diff --git a/source/SnapDump-Core/MemoryFileWriteStream.extension.st b/source/SnapDump-Core/MemoryFileWriteStream.extension.st index b134119..940dbc5 100644 --- a/source/SnapDump-Core/MemoryFileWriteStream.extension.st +++ b/source/SnapDump-Core/MemoryFileWriteStream.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #MemoryFileWriteStream } +Extension { #name : 'MemoryFileWriteStream' } -{ #category : #'*SnapDump-Core' } +{ #category : '*SnapDump-Core' } MemoryFileWriteStream >> nextBytesPutAll: aCollection [ ^ self stream nextPutAll: aCollection ] diff --git a/source/SnapDump-Core/SDException.class.st b/source/SnapDump-Core/SDException.class.st index 8725d77..5deea4e 100644 --- a/source/SnapDump-Core/SDException.class.st +++ b/source/SnapDump-Core/SDException.class.st @@ -1,6 +1,6 @@ Class { - #name : #SDException, - #superclass : #Object, + #name : 'SDException', + #superclass : 'Object', #instVars : [ 'version', 'id', @@ -8,70 +8,72 @@ Class { 'exceptionSignalerClassName', 'exceptionSignalerSelector' ], - #category : #'SnapDump-Core-Model' + #category : 'SnapDump-Core-Model', + #package : 'SnapDump-Core', + #tag : 'Model' } -{ #category : #'instance-creation' } +{ #category : 'instance-creation' } SDException class >> id: aString [ ^ self new id: aString; yourself ] -{ #category : #accessing } +{ #category : 'accessing' } SDException class >> neoJsonMapping: mapper [ mapper for: self do: [ :mapping | mapping mapInstVars: #(id exceptionSignalerClassName exceptionClassName exceptionSignalerSelector) ] ] -{ #category : #private } +{ #category : 'private' } SDException >> buildId [ ^ (SHA256 hashMessage: self fullSignature) hex ] -{ #category : #'accessing - exception properties' } +{ #category : 'accessing - exception properties' } SDException >> exceptionClassName [ ^ exceptionClassName ] -{ #category : #'accessing - exception properties' } +{ #category : 'accessing - exception properties' } SDException >> exceptionClassName: aString [ exceptionClassName := aString ] -{ #category : #'accessing - exception properties' } +{ #category : 'accessing - exception properties' } SDException >> exceptionSignalerClassName [ ^ exceptionSignalerClassName ] -{ #category : #'accessing - exception properties' } +{ #category : 'accessing - exception properties' } SDException >> exceptionSignalerClassName: aString [ exceptionSignalerClassName := aString ] -{ #category : #'accessing - exception properties' } +{ #category : 'accessing - exception properties' } SDException >> exceptionSignalerSelector [ ^ exceptionSignalerSelector ] -{ #category : #'accessing - exception properties' } +{ #category : 'accessing - exception properties' } SDException >> exceptionSignalerSelector: aString [ exceptionSignalerSelector := aString ] -{ #category : #services } +{ #category : 'services' } SDException >> freeSlots [ ^ self store freeSlotsForException: self ] -{ #category : #signatures } +{ #category : 'signatures' } SDException >> fullSignature [ ^ String streamContents: [ :stream | self fullSignatureOn: stream ] ] -{ #category : #signatures } +{ #category : 'signatures' } SDException >> fullSignatureOn: stream [ stream @@ -82,19 +84,19 @@ SDException >> fullSignatureOn: stream [ self signatureOn: stream ] -{ #category : #accessing } +{ #category : 'accessing' } SDException >> id [ ^ id ifNil: [ id := self buildId ] ] -{ #category : #accessing } +{ #category : 'accessing' } SDException >> id: aString [ id := aString ] -{ #category : #'accessing - exception properties' } +{ #category : 'accessing - exception properties' } SDException >> initializeExceptionProperties [ | snapshot | @@ -104,7 +106,7 @@ SDException >> initializeExceptionProperties [ exceptionSignalerSelector := snapshot selector ] -{ #category : #initialization } +{ #category : 'initialization' } SDException >> initializeFromClassName: aName receiver: aReceiver method: aSmalltalkMethod [ exceptionSignalerClassName := aReceiver class name asString. @@ -112,30 +114,30 @@ SDException >> initializeFromClassName: aName receiver: aReceiver method: aSmall exceptionClassName := aName ] -{ #category : #accessing } +{ #category : 'accessing' } SDException >> project [ ^ version project ] -{ #category : #accessing } +{ #category : 'accessing' } SDException >> projectName [ ^ version projectName ] -{ #category : #accessing } +{ #category : 'accessing' } SDException >> selector [ ^ exceptionSignalerSelector ] -{ #category : #signatures } +{ #category : 'signatures' } SDException >> signalerSignature [ ^ String streamContents: [ :stream | self signalerSignatureOn: stream ] ] -{ #category : #signatures } +{ #category : 'signatures' } SDException >> signalerSignatureOn: stream [ stream @@ -144,13 +146,13 @@ SDException >> signalerSignatureOn: stream [ << self exceptionSignalerSelector ] -{ #category : #signatures } +{ #category : 'signatures' } SDException >> signature [ ^ String streamContents: [ :stream | self signatureOn: stream ] ] -{ #category : #signatures } +{ #category : 'signatures' } SDException >> signatureOn: stream [ stream @@ -159,28 +161,28 @@ SDException >> signatureOn: stream [ self signalerSignatureOn: stream ] -{ #category : #services } +{ #category : 'services' } SDException >> snapshots [ ^ self store snapshotsOfException: self ] -{ #category : #accessing } +{ #category : 'accessing' } SDException >> store [ ^ version store ] -{ #category : #accessing } +{ #category : 'accessing' } SDException >> version [ ^ version ] -{ #category : #accessing } +{ #category : 'accessing' } SDException >> version: anObject [ version := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } SDException >> versionString [ ^ version string diff --git a/source/SnapDump-Core/SDFileFormat.class.st b/source/SnapDump-Core/SDFileFormat.class.st index 80896f6..9f0f6ff 100644 --- a/source/SnapDump-Core/SDFileFormat.class.st +++ b/source/SnapDump-Core/SDFileFormat.class.st @@ -13,31 +13,33 @@ I'm the base class of the snap file format. The structure of the format is --- end of file --- " Class { - #name : #SDFileFormat, - #superclass : #Object, + #name : 'SDFileFormat', + #superclass : 'Object', #instVars : [ 'stream' ], - #category : #'SnapDump-Core-Base' + #category : 'SnapDump-Core-Base', + #package : 'SnapDump-Core', + #tag : 'Base' } -{ #category : #accessing } +{ #category : 'accessing' } SDFileFormat >> formatSignature [ ^ 'SNAP' ] -{ #category : #accessing } +{ #category : 'accessing' } SDFileFormat >> formatVersion [ ^ 2 ] -{ #category : #initialization } +{ #category : 'initialization' } SDFileFormat >> initializeStream: aStream [ stream := aStream ] -{ #category : #accessing } +{ #category : 'accessing' } SDFileFormat >> stream [ ^ stream ] diff --git a/source/SnapDump-Core/SDFileSnapshot.class.st b/source/SnapDump-Core/SDFileSnapshot.class.st index a858698..81598e7 100644 --- a/source/SnapDump-Core/SDFileSnapshot.class.st +++ b/source/SnapDump-Core/SDFileSnapshot.class.st @@ -1,28 +1,30 @@ Class { - #name : #SDFileSnapshot, - #superclass : #SDSnapshot, + #name : 'SDFileSnapshot', + #superclass : 'SDSnapshot', #instVars : [ 'file' ], - #category : #'SnapDump-Core-Model' + #category : 'SnapDump-Core-Model', + #package : 'SnapDump-Core', + #tag : 'Model' } -{ #category : #accessing } +{ #category : 'accessing' } SDFileSnapshot >> file: aFileReference [ file := aFileReference ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } SDFileSnapshot >> fileSize [ ^ file size ] -{ #category : #options } +{ #category : 'options' } SDFileSnapshot >> newReader [ ^ SDSnapshotFileReader file: file ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } SDFileSnapshot >> storeRaw: aByteArray [ file binaryWriteStream diff --git a/source/SnapDump-Core/SDFilesystemStore.class.st b/source/SnapDump-Core/SDFilesystemStore.class.st index b1bd261..a35aa2d 100644 --- a/source/SnapDump-Core/SDFilesystemStore.class.st +++ b/source/SnapDump-Core/SDFilesystemStore.class.st @@ -1,21 +1,23 @@ Class { - #name : #SDFilesystemStore, - #superclass : #SDStore, + #name : 'SDFilesystemStore', + #superclass : 'SDStore', #instVars : [ 'path', 'snapshotOccurrencesLimit', 'projects', 'versions' ], - #category : #'SnapDump-Core-Base' + #category : 'SnapDump-Core-Base', + #package : 'SnapDump-Core', + #tag : 'Base' } -{ #category : #accessing } +{ #category : 'accessing' } SDFilesystemStore class >> storeName [ ^ #file ] -{ #category : #services } +{ #category : 'services' } SDFilesystemStore >> buildExceptionFrom: aFileReference [ ^ SDException new id: aFileReference basename; @@ -23,7 +25,7 @@ SDFilesystemStore >> buildExceptionFrom: aFileReference [ yourself ] -{ #category : #services } +{ #category : 'services' } SDFilesystemStore >> buildProjectFrom: aFileReference [ ^ SDProject new name: aFileReference basename; @@ -31,7 +33,7 @@ SDFilesystemStore >> buildProjectFrom: aFileReference [ yourself ] -{ #category : #services } +{ #category : 'services' } SDFilesystemStore >> buildVersionFrom: aFileReference [ ^ SDVersion new string: aFileReference basename; @@ -39,7 +41,7 @@ SDFilesystemStore >> buildVersionFrom: aFileReference [ yourself ] -{ #category : #'services - removing' } +{ #category : 'services - removing' } SDFilesystemStore >> cleanSnapshotRemoval: file [ | versionDirectory projectDirectory exceptionDirectory | @@ -52,7 +54,7 @@ SDFilesystemStore >> cleanSnapshotRemoval: file [ ] -{ #category : #accessing } +{ #category : 'accessing' } SDFilesystemStore >> exceptionAt: anExceptionId project: aProjectName version: aVersionName [ | file | file := self @@ -64,7 +66,7 @@ SDFilesystemStore >> exceptionAt: anExceptionId project: aProjectName version: a ^ self buildExceptionFrom: file ] -{ #category : #'service - getting' } +{ #category : 'service - getting' } SDFilesystemStore >> exceptionsOfVersion: aVersion [ | file | file := (self snapshotPathForProject: aVersion projectName version: aVersion string). @@ -74,7 +76,7 @@ SDFilesystemStore >> exceptionsOfVersion: aVersion [ ]. ] -{ #category : #'service - getting' } +{ #category : 'service - getting' } SDFilesystemStore >> freeSlotsForException: anException [ | snapshotSize | @@ -83,7 +85,7 @@ SDFilesystemStore >> freeSlotsForException: anException [ ^ self snapshotOccurrencesLimit - snapshotSize ] -{ #category : #accessing } +{ #category : 'accessing' } SDFilesystemStore >> freeSlotsForExceptionId: anExceptionId project: projectName version: versionString [ | directory numberOfFiles | directory := self @@ -98,13 +100,13 @@ SDFilesystemStore >> freeSlotsForExceptionId: anExceptionId project: projectName ^ self snapshotOccurrencesLimit - numberOfFiles ] -{ #category : #accessing } +{ #category : 'accessing' } SDFilesystemStore >> freeSlotsForSnapshot: aSnapshot [ ^ self freeSlotsForExceptionId: aSnapshot exceptionId project: aSnapshot projectName version: aSnapshot versionString ] -{ #category : #testing } +{ #category : 'testing' } SDFilesystemStore >> hasSnapshot: aSnapshot [ @@ -112,25 +114,25 @@ SDFilesystemStore >> hasSnapshot: aSnapshot [ ] -{ #category : #testing } +{ #category : 'testing' } SDFilesystemStore >> hasSnapshot: snapshotId project: aProjectName version: aVersionName [ ^ (self snapshotFilesForProject: aProjectName version: aVersionName) anySatisfy: [ :eachFile | eachFile basename = self snapshotFileNameFor: snapshotId ] ] -{ #category : #testing } +{ #category : 'testing' } SDFilesystemStore >> isSetUp [ ^ path notNil ] -{ #category : #accessing } +{ #category : 'accessing' } SDFilesystemStore >> path: anObject [ path := anObject asFileReference. path ensureCreateDirectory. ] -{ #category : #accessing } +{ #category : 'accessing' } SDFilesystemStore >> projectNamed: aString [ | file project | @@ -140,19 +142,19 @@ SDFilesystemStore >> projectNamed: aString [ ^ project ] -{ #category : #accessing } +{ #category : 'accessing' } SDFilesystemStore >> projectNamed: aString ifAbsent: aBlock [ ^ [self projectNamed: aString] on: NotFound do: [ :ex | aBlock value ] ] -{ #category : #accessing } +{ #category : 'accessing' } SDFilesystemStore >> projects [ ^ path children collect: [ :directory | (SDProject name: directory basename) store: self. ] ] -{ #category : #'services - removing' } +{ #category : 'services - removing' } SDFilesystemStore >> removeProject: aProject [ "not yet implemented. This feature does not seem to be actually used yet. @@ -162,7 +164,7 @@ SDFilesystemStore >> removeProject: aProject [ file deleteAll. ] -{ #category : #'services - removing' } +{ #category : 'services - removing' } SDFilesystemStore >> removeSnapshot: snapshot [ | file | @@ -172,7 +174,7 @@ SDFilesystemStore >> removeSnapshot: snapshot [ ] -{ #category : #'services - removing' } +{ #category : 'services - removing' } SDFilesystemStore >> removeVersion: aVersion [ "not yet implemented. This feature does not seem to be actually used yet. @@ -184,18 +186,18 @@ SDFilesystemStore >> removeVersion: aVersion [ projectDirectory hasChildren ifFalse: [ projectDirectory delete ]. ] -{ #category : #'services - testing' } +{ #category : 'services - testing' } SDFilesystemStore >> shouldReportSnapshot: snapshot [ ^ (self freeSlotsForSnapshot: snapshot) > 0 ] -{ #category : #'services - files' } +{ #category : 'services - files' } SDFilesystemStore >> snapshotFileNameFor: snapshotId [ ^ snapshotId , '.snap' ] -{ #category : #'services - files' } +{ #category : 'services - files' } SDFilesystemStore >> snapshotFilesForProject: aProjectName version: aVersionName [ | directory | @@ -204,7 +206,7 @@ SDFilesystemStore >> snapshotFilesForProject: aProjectName version: aVersionName ^ directory allFiles ] -{ #category : #'services - files' } +{ #category : 'services - files' } SDFilesystemStore >> snapshotFilesForProject: aProjectName version: aVersionName exception: exceptionId [ | directory | directory := self @@ -216,13 +218,13 @@ SDFilesystemStore >> snapshotFilesForProject: aProjectName version: aVersionName ^ directory allFiles ] -{ #category : #'services - files' } +{ #category : 'services - files' } SDFilesystemStore >> snapshotIdFrom: aFileBasename [ ^ aFileBasename asFileReference basenameWithoutExtension ] -{ #category : #accessing } +{ #category : 'accessing' } SDFilesystemStore >> snapshotOccurrencesLimit [ "answers the maximum number of snapshots that should be stored for a same exception id" @@ -231,7 +233,7 @@ SDFilesystemStore >> snapshotOccurrencesLimit [ ] -{ #category : #accessing } +{ #category : 'accessing' } SDFilesystemStore >> snapshotOccurrencesLimit: aNumber [ snapshotOccurrencesLimit := aNumber @@ -239,7 +241,7 @@ SDFilesystemStore >> snapshotOccurrencesLimit: aNumber [ ] -{ #category : #'services - files' } +{ #category : 'services - files' } SDFilesystemStore >> snapshotPathFor: aSnaphot [ ^ self snapshotPathForProject: aSnaphot projectName @@ -248,22 +250,22 @@ SDFilesystemStore >> snapshotPathFor: aSnaphot [ snapshot: aSnaphot snapshotId ] -{ #category : #'services - files' } +{ #category : 'services - files' } SDFilesystemStore >> snapshotPathForProject: projectName [ ^ path / projectName ] -{ #category : #'services - files' } +{ #category : 'services - files' } SDFilesystemStore >> snapshotPathForProject: projectName version: versionName [ ^ (self snapshotPathForProject: projectName) / versionName ] -{ #category : #'services - files' } +{ #category : 'services - files' } SDFilesystemStore >> snapshotPathForProject: projectName version: versionName exception: exceptionId [ ^ (self snapshotPathForProject: projectName version: versionName)/ exceptionId ] -{ #category : #'services - files' } +{ #category : 'services - files' } SDFilesystemStore >> snapshotPathForProject: aProjectName version: aVersionName exception: exceptionId snapshot: snapshotId [ ^ (self snapshotPathForProject: aProjectName @@ -271,7 +273,7 @@ SDFilesystemStore >> snapshotPathForProject: aProjectName version: aVersionName exception: exceptionId) / (self snapshotFileNameFor: snapshotId) ] -{ #category : #services } +{ #category : 'services' } SDFilesystemStore >> snapshotWithId: anIdString project: aProjectName version: aVersionString [ | file snapshot | file := (self @@ -290,7 +292,7 @@ SDFilesystemStore >> snapshotWithId: anIdString project: aProjectName version: a ^ snapshot ] -{ #category : #'service - getting' } +{ #category : 'service - getting' } SDFilesystemStore >> snapshotsOfException: anException [ ^ (self @@ -303,7 +305,7 @@ SDFilesystemStore >> snapshotsOfException: anException [ snapshot ] ] -{ #category : #'services - adding' } +{ #category : 'services - adding' } SDFilesystemStore >> storeRaw: snapshot contents: aByteArray [ | file | @@ -314,7 +316,7 @@ SDFilesystemStore >> storeRaw: snapshot contents: aByteArray [ ] -{ #category : #'service - getting' } +{ #category : 'service - getting' } SDFilesystemStore >> versionsOfProject: aProject [ | file | file := (self snapshotPathForProject: aProject name). @@ -324,7 +326,7 @@ SDFilesystemStore >> versionsOfProject: aProject [ ]. ] -{ #category : #'services - adding' } +{ #category : 'services - adding' } SDFilesystemStore >> writeSnapshot: snapshot [ | file | file := self snapshotPathFor: snapshot. diff --git a/source/SnapDump-Core/SDHTTPStore.class.st b/source/SnapDump-Core/SDHTTPStore.class.st index e17947c..c215004 100644 --- a/source/SnapDump-Core/SDHTTPStore.class.st +++ b/source/SnapDump-Core/SDHTTPStore.class.st @@ -1,20 +1,22 @@ Class { - #name : #SDHTTPStore, - #superclass : #SDStore, + #name : 'SDHTTPStore', + #superclass : 'SDStore', #instVars : [ 'uri', 'username', 'password' ], - #category : #'SnapDump-Core-Base' + #category : 'SnapDump-Core-Base', + #package : 'SnapDump-Core', + #tag : 'Base' } -{ #category : #accessing } +{ #category : 'accessing' } SDHTTPStore class >> storeName [ ^ #http ] -{ #category : #initialization } +{ #category : 'initialization' } SDHTTPStore >> applyConfiguration: aConfig [ self uri: aConfig uri. username := aConfig username. @@ -22,14 +24,14 @@ SDHTTPStore >> applyConfiguration: aConfig [ ] -{ #category : #accessing } +{ #category : 'accessing' } SDHTTPStore >> client [ ^ ZnClient new beOneShot; setBasicAuthenticationUsername: username password: password ] -{ #category : #'services - getting' } +{ #category : 'services - getting' } SDHTTPStore >> exceptionsOfVersion: aVersion [ | response | response := self client @@ -43,13 +45,13 @@ SDHTTPStore >> exceptionsOfVersion: aVersion [ ifFalse: [ NotFound signal: ('Version' , aVersion printString , ' for project ', aVersion projectName printString, ' not found') ] ] -{ #category : #'services - getting' } +{ #category : 'services - getting' } SDHTTPStore >> freeSlotsForException: anException [ ^ self freeSlotsForExceptionId: anException id project: anException projectName version: anException versionString ] -{ #category : #'services - getting' } +{ #category : 'services - getting' } SDHTTPStore >> freeSlotsForExceptionId: anExceptionId project: aProjectName version: aVersionString [ | response | @@ -63,12 +65,12 @@ SDHTTPStore >> freeSlotsForExceptionId: anExceptionId project: aProjectName vers ifFalse: [ NotFound signal ] ] -{ #category : #testing } +{ #category : 'testing' } SDHTTPStore >> isSetUp [ ^ uri notNil ] -{ #category : #accessing } +{ #category : 'accessing' } SDHTTPStore >> parametersFor: snapshot [ ^ Dictionary new @@ -78,17 +80,17 @@ SDHTTPStore >> parametersFor: snapshot [ yourself ] -{ #category : #printing } +{ #category : 'printing' } SDHTTPStore >> printOn: aStream [ aStream << uri asString ] -{ #category : #accessing } +{ #category : 'accessing' } SDHTTPStore >> projectNamed: aString [ ^ self projectNamed: aString ifAbsent: [ NotFound signal: 'no project found' ] ] -{ #category : #accessing } +{ #category : 'accessing' } SDHTTPStore >> projectNamed: aString ifAbsent: aBlock [ | response | response := self client @@ -102,7 +104,7 @@ SDHTTPStore >> projectNamed: aString ifAbsent: aBlock [ ifFalse: aBlock ] -{ #category : #accessing } +{ #category : 'accessing' } SDHTTPStore >> projectNamed: aString ifAbsentPut: aBlock [ | response | response := self client @@ -116,7 +118,7 @@ SDHTTPStore >> projectNamed: aString ifAbsentPut: aBlock [ ifFalse: aBlock ] -{ #category : #accessing } +{ #category : 'accessing' } SDHTTPStore >> projects [ | response | response := self client @@ -127,7 +129,7 @@ SDHTTPStore >> projects [ p store: self ] ] -{ #category : #'services - removing' } +{ #category : 'services - removing' } SDHTTPStore >> removeSnapshot: aSnapshot [ | response | response := self client @@ -138,12 +140,12 @@ SDHTTPStore >> removeSnapshot: aSnapshot [ ifFalse: [ NotFound signal ] ] -{ #category : #'services - testing' } +{ #category : 'services - testing' } SDHTTPStore >> shouldReportSnapshot: snapshot [ ^ (self freeSlotsForException: snapshot exception) > 0 ] -{ #category : #accessing } +{ #category : 'accessing' } SDHTTPStore >> snapshotDumpFor: aSnapshot [ ^ self client headerAt: 'Accept' put: SDStore mimeTypeFuel; @@ -151,7 +153,7 @@ SDHTTPStore >> snapshotDumpFor: aSnapshot [ get ] -{ #category : #accessing } +{ #category : 'accessing' } SDHTTPStore >> snapshotStackFor: aSnapshot [ ^ self client @@ -160,7 +162,7 @@ SDHTTPStore >> snapshotStackFor: aSnapshot [ get ] -{ #category : #'services - getting' } +{ #category : 'services - getting' } SDHTTPStore >> snapshotsOfException: anException [ | response | @@ -175,24 +177,24 @@ SDHTTPStore >> snapshotsOfException: anException [ ifFalse: [ NotFound signal ] ] -{ #category : #accessing } +{ #category : 'accessing' } SDHTTPStore >> uri [ ^ uri ] -{ #category : #accessing } +{ #category : 'accessing' } SDHTTPStore >> uri: anUri [ uri := anUri asZnUrl / SDSnapshot apiVersion ] -{ #category : #accessing } +{ #category : 'accessing' } SDHTTPStore >> urlForSnapshot: snapshot [ ^ self urlForSnapshot: snapshot snapshotId project: snapshot projectName version: snapshot versionString exception: snapshot exceptionId ] -{ #category : #accessing } +{ #category : 'accessing' } SDHTTPStore >> urlForSnapshot: snapshotId project: projectName version: versionName exception: anExceptionId [ @@ -200,13 +202,13 @@ SDHTTPStore >> urlForSnapshot: snapshotId project: projectName version: versionN ] -{ #category : #accessing } +{ #category : 'accessing' } SDHTTPStore >> username: aUsername password: aPassword [ username := aUsername. password := aPassword ] -{ #category : #'services - getting' } +{ #category : 'services - getting' } SDHTTPStore >> versionsOfProject: aProject [ | response | response := self client @@ -220,7 +222,7 @@ SDHTTPStore >> versionsOfProject: aProject [ ifFalse: [ NotFound signal: (aProject name , ' project not found') ] ] -{ #category : #services } +{ #category : 'services' } SDHTTPStore >> writeSnapshot: snapshot [ | writeStream response | writeStream := ByteArray new writeStream. diff --git a/source/SnapDump-Core/SDMemorySnapshot.class.st b/source/SnapDump-Core/SDMemorySnapshot.class.st index 620ecbb..9713d55 100644 --- a/source/SnapDump-Core/SDMemorySnapshot.class.st +++ b/source/SnapDump-Core/SDMemorySnapshot.class.st @@ -1,13 +1,29 @@ Class { - #name : #SDMemorySnapshot, - #superclass : #SDSnapshot, + #name : 'SDMemorySnapshot', + #superclass : 'SDSnapshot', #instVars : [ 'context' ], - #category : #'SnapDump-Core-Model' + #classInstVars : [ + 'depthLimit', + 'objectLimit' + ], + #category : 'SnapDump-Core-Model', + #package : 'SnapDump-Core', + #tag : 'Model' } -{ #category : #'instance-creation' } +{ #category : 'accessing' } +SDMemorySnapshot class >> depthLimit [ + ^ depthLimit +] + +{ #category : 'accessing' } +SDMemorySnapshot class >> depthLimit: anInteger [ + depthLimit := anInteger +] + +{ #category : 'instance-creation' } SDMemorySnapshot class >> fromException: anException [ ^ self new @@ -15,12 +31,22 @@ SDMemorySnapshot class >> fromException: anException [ yourself ] -{ #category : #accessing } +{ #category : 'accessing' } +SDMemorySnapshot class >> objectLimit [ + ^ objectLimit +] + +{ #category : 'accessing' } +SDMemorySnapshot class >> objectLimit: anInteger [ + objectLimit := anInteger +] + +{ #category : 'accessing' } SDMemorySnapshot >> context [ ^ context ] -{ #category : #initialization } +{ #category : 'initialization' } SDMemorySnapshot >> initialize [ super initialize. operatingSystem := Smalltalk os name asString. @@ -31,15 +57,23 @@ SDMemorySnapshot >> initialize [ imageBuild := Smalltalk lastUpdateString asString ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } SDMemorySnapshot >> serializeContextOn: stream [ - FLSerializer - serialize: context - on: stream + | serializer | + serializer := FLSerializer new + object: context; + onStream: stream. + + self class depthLimit ifNotNil: [ :limit | + serializer limitDepthTo: limit ]. + self class objectLimit ifNotNil: [ :limit | + serializer limitObjectsTo: limit ]. + + serializer serialize ] -{ #category : #initialization } +{ #category : 'initialization' } SDMemorySnapshot >> setContext: aContext exceptionClassName: exceptionClassName [ | method | context := aContext. @@ -56,7 +90,7 @@ SDMemorySnapshot >> setContext: aContext exceptionClassName: exceptionClassName yourself) ] -{ #category : #initialization } +{ #category : 'initialization' } SDMemorySnapshot >> smalltalkException: anException [ self setContext: anException signalerContext diff --git a/source/SnapDump-Core/SDProject.class.st b/source/SnapDump-Core/SDProject.class.st index 61b97b9..34adac1 100644 --- a/source/SnapDump-Core/SDProject.class.st +++ b/source/SnapDump-Core/SDProject.class.st @@ -1,71 +1,73 @@ Class { - #name : #SDProject, - #superclass : #Object, + #name : 'SDProject', + #superclass : 'Object', #instVars : [ 'name', 'store' ], - #category : #'SnapDump-Core-Model' + #category : 'SnapDump-Core-Model', + #package : 'SnapDump-Core', + #tag : 'Model' } -{ #category : #accessing } +{ #category : 'accessing' } SDProject class >> defaultProjectName [ ^ 'unknown' ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } SDProject class >> name: aString [ ^ self new name: aString ] -{ #category : #accessing } +{ #category : 'accessing' } SDProject class >> neoJsonMapping: mapper [ mapper for: self do: [ :mapping | mapping mapInstVars: #(name) ] ] -{ #category : #comparing } +{ #category : 'comparing' } SDProject >> = aProject [ ^ name = aProject name ] -{ #category : #comparing } +{ #category : 'comparing' } SDProject >> hash [ ^ name hash ] -{ #category : #accessing } +{ #category : 'accessing' } SDProject >> name [ ^ name ] -{ #category : #accessing } +{ #category : 'accessing' } SDProject >> name: anObject [ name := anObject ] -{ #category : #printing } +{ #category : 'printing' } SDProject >> printOn: aStream [ aStream << name ] -{ #category : #actions } +{ #category : 'actions' } SDProject >> remove [ ^ self store removeProject: self ] -{ #category : #accessing } +{ #category : 'accessing' } SDProject >> store [ ^ store ] -{ #category : #accessing } +{ #category : 'accessing' } SDProject >> store: anObject [ store := anObject ] -{ #category : #'accessing - versions' } +{ #category : 'accessing - versions' } SDProject >> versionAt: aString [ ^ self versionAt: aString @@ -73,7 +75,7 @@ SDProject >> versionAt: aString [ ] -{ #category : #'accessing - versions' } +{ #category : 'accessing - versions' } SDProject >> versionAt: aString ifAbsent: aBlock [ ^ self versions detect: [ :each | each string = aString ] @@ -81,14 +83,14 @@ SDProject >> versionAt: aString ifAbsent: aBlock [ ] -{ #category : #'accessing - versions' } +{ #category : 'accessing - versions' } SDProject >> versionAt: aString ifAbsentPut: aBlock [ ^ self versions at: aString ifAbsentPut: aBlock ] -{ #category : #'accessing - versions' } +{ #category : 'accessing - versions' } SDProject >> versions [ ^ store versionsOfProject: self ] diff --git a/source/SnapDump-Core/SDSnapshot.class.st b/source/SnapDump-Core/SDSnapshot.class.st index faede9d..c104f03 100644 --- a/source/SnapDump-Core/SDSnapshot.class.st +++ b/source/SnapDump-Core/SDSnapshot.class.st @@ -1,6 +1,6 @@ Class { - #name : #SDSnapshot, - #superclass : #Object, + #name : 'SDSnapshot', + #superclass : 'Object', #instVars : [ 'timestamp', 'className', @@ -19,10 +19,12 @@ Class { 'exception', 'stackTrace' ], - #category : #'SnapDump-Core-Model' + #category : 'SnapDump-Core-Model', + #package : 'SnapDump-Core', + #tag : 'Model' } -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot class >> apiVersion [ "A version description that is used by all parts (handler, server, client) to ensure consistent API calls @@ -34,7 +36,7 @@ SDSnapshot class >> apiVersion [ ^ 'v2' ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot class >> dummyContext [ | context | context := (Context newForMethod: Object >> #printStringLimitedTo:). @@ -57,18 +59,18 @@ SDSnapshot class >> dummyContext [ ^ context ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot class >> dummyContextSnapshot [ ^ self dummyContext asSnapshot ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } SDSnapshot class >> exception: anException [ ^ self new exception: anException ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot class >> neoJsonMapping: mapper [ mapper for: self do: [ :mapping | mapping mapAccessors: #( projectName versionString ). @@ -80,39 +82,39 @@ SDSnapshot class >> neoJsonMapping: mapper [ ] -{ #category : #converting } +{ #category : 'converting' } SDSnapshot >> asSnapshot [ ^ self ] -{ #category : #private } +{ #category : 'private' } SDSnapshot >> basicMetaFields [ ^ #(projectName versionString exceptionId timestamp className selector exceptionClass operatingSystem systemArchitecture operatingSystemVersion vmVersion imageVersion imageBuild) ] -{ #category : #private } +{ #category : 'private' } SDSnapshot >> buildSnapshotId [ ^ (SHA256 hashMessage: self snapshotSignature) hex ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot >> className [ ^ className ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot >> dateAndTimeString [ ^ String streamContents: [ :stream | stream << self dateString << ' ' << self timeString ] ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot >> dateString [ ^ timestamp asDate printFormat: #(1 2 3 $. 1 1) ] -{ #category : #initialization } +{ #category : 'initialization' } SDSnapshot >> ensureVersionModel [ "Make sure the version model is built from my local properties " @@ -121,12 +123,12 @@ SDSnapshot >> ensureVersionModel [ ] -{ #category : #signatures } +{ #category : 'signatures' } SDSnapshot >> errorSignature [ ^ self exception fullSignature ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot >> exception [ ^ exception ifNil: [ @@ -134,29 +136,29 @@ SDSnapshot >> exception [ exception ] ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot >> exception: aSDException [ exception := aSDException. ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot >> exceptionClass [ ^ exceptionClass ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot >> exceptionId [ ^ exceptionId ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot >> exceptionId: aString [ exceptionId := aString ] -{ #category : #initialization } +{ #category : 'initialization' } SDSnapshot >> exportExceptionModel [ "absorb the exception model properties so that they can be serialized with the snap file " exceptionClass := self exception exceptionClassName. @@ -166,48 +168,48 @@ SDSnapshot >> exportExceptionModel [ ] -{ #category : #actions } +{ #category : 'actions' } SDSnapshot >> fuelBytes [ ^ self store snapshotDumpFor: self ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot >> imageBuild [ ^ imageBuild ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot >> imageBuild: aString [ imageBuild := aString ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot >> imageVersion [ ^ imageVersion ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot >> imageVersion: aString [ imageVersion := aString ] -{ #category : #initialization } +{ #category : 'initialization' } SDSnapshot >> initialize [ super initialize. timestamp := DateAndTime now ] -{ #category : #private } +{ #category : 'private' } SDSnapshot >> metaFields [ ^ self basicMetaFields asOrderedCollection ] -{ #category : #private } +{ #category : 'private' } SDSnapshot >> metaProperties [ ^ self metaFields collect: [ :field | field -> (self perform: field asSymbol) ] as: Dictionary ] -{ #category : #initialization } +{ #category : 'initialization' } SDSnapshot >> newVersion [ | newProject newVersion | @@ -217,7 +219,7 @@ SDSnapshot >> newVersion [ ] -{ #category : #actions } +{ #category : 'actions' } SDSnapshot >> openDebugger [ | context | context := FLMaterializer materializeFromByteArray: self fuelBytes. @@ -237,55 +239,55 @@ SDSnapshot >> openDebugger [ fullView: true ] ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot >> operatingSystem [ ^ operatingSystem ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot >> operatingSystem: aString [ operatingSystem := aString ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot >> operatingSystemVersion [ ^ operatingSystemVersion ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot >> operatingSystemVersion: aString [ operatingSystemVersion := aString ] -{ #category : #initialization } +{ #category : 'initialization' } SDSnapshot >> prepareExport [ self ensureVersionModel. self exportExceptionModel. ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot >> project [ ^ self exception project ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot >> projectName [ ^ projectName ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot >> projectName: aString [ projectName := aString ] -{ #category : #actions } +{ #category : 'actions' } SDSnapshot >> remove [ ^ self store removeSnapshot: self ] -{ #category : #initialization } +{ #category : 'initialization' } SDSnapshot >> restoreModel [ "Restore the model from my local 'flat' properties. @@ -300,28 +302,28 @@ SDSnapshot >> restoreModel [ ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot >> selector [ ^ selector ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot >> selector: aString [ selector := aString ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot >> snapshotId [ ^ snapshotId ifNil: [ snapshotId := self buildSnapshotId ] ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot >> snapshotId: aString [ snapshotId := aString ] -{ #category : #signatures } +{ #category : 'signatures' } SDSnapshot >> snapshotSignature [ ^ String streamContents: [ :stream | self exception fullSignatureOn: stream. @@ -330,75 +332,75 @@ SDSnapshot >> snapshotSignature [ << timestamp printString ] ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot >> stackTrace [ ^ stackTrace ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot >> stackTrace: aString [ stackTrace := aString ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot >> store [ ^ self version store ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot >> systemArchitecture [ ^ systemArchitecture ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot >> systemArchitecture: aString [ systemArchitecture := aString ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot >> timeString [ ^ timestamp asTime print24 ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot >> timestamp [ ^ timestamp ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot >> timestamp: aDateAndTime [ timestamp := aDateAndTime ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot >> validate [ ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot >> version [ ^ self exception version ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot >> versionString [ ^ versionString ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot >> versionString: aString [ versionString := aString ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot >> vmVersion [ ^ vmVersion ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshot >> vmVersion: aString [ vmVersion := aString ] diff --git a/source/SnapDump-Core/SDSnapshotFileFormatError.class.st b/source/SnapDump-Core/SDSnapshotFileFormatError.class.st index 9130602..374d203 100644 --- a/source/SnapDump-Core/SDSnapshotFileFormatError.class.st +++ b/source/SnapDump-Core/SDSnapshotFileFormatError.class.st @@ -1,5 +1,7 @@ Class { - #name : #SDSnapshotFileFormatError, - #superclass : #Error, - #category : #'SnapDump-Core-Exceptions' + #name : 'SDSnapshotFileFormatError', + #superclass : 'Error', + #category : 'SnapDump-Core-Exceptions', + #package : 'SnapDump-Core', + #tag : 'Exceptions' } diff --git a/source/SnapDump-Core/SDSnapshotFileReader.class.st b/source/SnapDump-Core/SDSnapshotFileReader.class.st index b746845..f4e2f23 100644 --- a/source/SnapDump-Core/SDSnapshotFileReader.class.st +++ b/source/SnapDump-Core/SDSnapshotFileReader.class.st @@ -1,45 +1,47 @@ Class { - #name : #SDSnapshotFileReader, - #superclass : #SDFileFormat, + #name : 'SDSnapshotFileReader', + #superclass : 'SDFileFormat', #instVars : [ 'snapshot', 'position', 'version' ], - #category : #'SnapDump-Core-Base' + #category : 'SnapDump-Core-Base', + #package : 'SnapDump-Core', + #tag : 'Base' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } SDSnapshotFileReader class >> file: aFileReference [ ^ self on: aFileReference binaryReadStream ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } SDSnapshotFileReader class >> on: aStream [ ^ self new initializeStream: aStream ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshotFileReader >> context [ ^ FLMaterializer materializeFromByteArray: self fuelDump ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshotFileReader >> file: aFileReference [ snapshot file: aFileReference ] -{ #category : #enumerating } +{ #category : 'enumerating' } SDSnapshotFileReader >> fuelDump [ ^ self fuelDumpStreamDo: [ :str :lenght | str upToEnd ] ] -{ #category : #enumerating } +{ #category : 'enumerating' } SDSnapshotFileReader >> fuelDumpStreamDo: aBlock [ | length | @@ -53,7 +55,7 @@ SDSnapshotFileReader >> fuelDumpStreamDo: aBlock [ value: length. ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshotFileReader >> initializeFromMeta [ snapshot := NeoJSONReader @@ -61,7 +63,7 @@ SDSnapshotFileReader >> initializeFromMeta [ as: SDFileSnapshot ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshotFileReader >> initializeStream: aStream [ | formatSignature | @@ -77,13 +79,13 @@ SDSnapshotFileReader >> initializeStream: aStream [ ] -{ #category : #enumerating } +{ #category : 'enumerating' } SDSnapshotFileReader >> metaDataDictionary [ ^ NeoJSONReader fromString: self metaDataString ] -{ #category : #enumerating } +{ #category : 'enumerating' } SDSnapshotFileReader >> metaDataStreamDo: aBlock [ | length | @@ -94,7 +96,7 @@ SDSnapshotFileReader >> metaDataStreamDo: aBlock [ value: length ] -{ #category : #enumerating } +{ #category : 'enumerating' } SDSnapshotFileReader >> metaDataString [ | string | @@ -105,21 +107,21 @@ SDSnapshotFileReader >> metaDataString [ ^ string ] -{ #category : #'stream - reading' } +{ #category : 'stream - reading' } SDSnapshotFileReader >> read: anInteger [ position := position + anInteger. ^ stream next: anInteger ] -{ #category : #'stream - reading' } +{ #category : 'stream - reading' } SDSnapshotFileReader >> readLength [ "all lengths are fixed to 4 bytes giving 32 bit size of a section" ^ (self read: 4) asInteger ] -{ #category : #'stream - reading' } +{ #category : 'stream - reading' } SDSnapshotFileReader >> skip: anInteger [ "skip a number of bytes on a stream. This is a lot faster than reading the bytes to @@ -128,7 +130,7 @@ SDSnapshotFileReader >> skip: anInteger [ position := position + anInteger ] -{ #category : #'stream - reading' } +{ #category : 'stream - reading' } SDSnapshotFileReader >> skipSection [ | length | @@ -136,7 +138,7 @@ SDSnapshotFileReader >> skipSection [ self skip: length ] -{ #category : #accessing } +{ #category : 'accessing' } SDSnapshotFileReader >> snapshot [ "if the accessor is used we assume that someone needs a snapshot so initializing with content should be nice" @@ -145,7 +147,7 @@ SDSnapshotFileReader >> snapshot [ ^ snapshot ] -{ #category : #enumerating } +{ #category : 'enumerating' } SDSnapshotFileReader >> stackTrace [ ^ (self stackTraceStreamDo: [ :str :length | @@ -153,7 +155,7 @@ SDSnapshotFileReader >> stackTrace [ ] -{ #category : #enumerating } +{ #category : 'enumerating' } SDSnapshotFileReader >> stackTraceStreamDo: aBlock [ | length | diff --git a/source/SnapDump-Core/SDSnapshotFileVersionError.class.st b/source/SnapDump-Core/SDSnapshotFileVersionError.class.st index 0faa144..6633fa6 100644 --- a/source/SnapDump-Core/SDSnapshotFileVersionError.class.st +++ b/source/SnapDump-Core/SDSnapshotFileVersionError.class.st @@ -1,5 +1,7 @@ Class { - #name : #SDSnapshotFileVersionError, - #superclass : #Error, - #category : #'SnapDump-Core-Exceptions' + #name : 'SDSnapshotFileVersionError', + #superclass : 'Error', + #category : 'SnapDump-Core-Exceptions', + #package : 'SnapDump-Core', + #tag : 'Exceptions' } diff --git a/source/SnapDump-Core/SDSnapshotFileWriter.class.st b/source/SnapDump-Core/SDSnapshotFileWriter.class.st index 7d42caa..519535d 100644 --- a/source/SnapDump-Core/SDSnapshotFileWriter.class.st +++ b/source/SnapDump-Core/SDSnapshotFileWriter.class.st @@ -1,23 +1,25 @@ Class { - #name : #SDSnapshotFileWriter, - #superclass : #SDFileFormat, - #category : #'SnapDump-Core-Base' + #name : 'SDSnapshotFileWriter', + #superclass : 'SDFileFormat', + #category : 'SnapDump-Core-Base', + #package : 'SnapDump-Core', + #tag : 'Base' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } SDSnapshotFileWriter class >> file: aFileReference [ aFileReference parent ensureCreateDirectory. ^ self on: aFileReference binaryWriteStream ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } SDSnapshotFileWriter class >> on: aStream [ ^ self new initializeStream: aStream ] -{ #category : #writing } +{ #category : 'writing' } SDSnapshotFileWriter >> close [ stream flush; @@ -25,7 +27,7 @@ SDSnapshotFileWriter >> close [ ] -{ #category : #writing } +{ #category : 'writing' } SDSnapshotFileWriter >> write: aByteArray [ stream @@ -33,7 +35,7 @@ SDSnapshotFileWriter >> write: aByteArray [ nextPutAll: aByteArray ] -{ #category : #writing } +{ #category : 'writing' } SDSnapshotFileWriter >> writeFuelDump: aSnapshot [ | byteStream | @@ -50,7 +52,7 @@ SDSnapshotFileWriter >> writeFuelDump: aSnapshot [ ] -{ #category : #writing } +{ #category : 'writing' } SDSnapshotFileWriter >> writeHeader [ stream @@ -58,7 +60,7 @@ SDSnapshotFileWriter >> writeHeader [ nextPut: self formatVersion ] -{ #category : #writing } +{ #category : 'writing' } SDSnapshotFileWriter >> writeMeta: aSnapshot [ | metaBytes | @@ -66,7 +68,7 @@ SDSnapshotFileWriter >> writeMeta: aSnapshot [ self write: metaBytes ] -{ #category : #writing } +{ #category : 'writing' } SDSnapshotFileWriter >> writeRaw: aByteArray [ stream @@ -75,7 +77,7 @@ SDSnapshotFileWriter >> writeRaw: aByteArray [ close ] -{ #category : #writing } +{ #category : 'writing' } SDSnapshotFileWriter >> writeSnapshot: aSnapshot [ self @@ -90,7 +92,7 @@ SDSnapshotFileWriter >> writeSnapshot: aSnapshot [ ] -{ #category : #writing } +{ #category : 'writing' } SDSnapshotFileWriter >> writeTextualStackTraceFor: aSnapshot [ self write: (aSnapshot stackTrace) utf8Encoded diff --git a/source/SnapDump-Core/SDStore.class.st b/source/SnapDump-Core/SDStore.class.st index 0b17d0c..cf2e7d5 100644 --- a/source/SnapDump-Core/SDStore.class.st +++ b/source/SnapDump-Core/SDStore.class.st @@ -1,27 +1,29 @@ Class { - #name : #SDStore, - #superclass : #Object, - #category : #'SnapDump-Core-Base' + #name : 'SDStore', + #superclass : 'Object', + #category : 'SnapDump-Core-Base', + #package : 'SnapDump-Core', + #tag : 'Base' } -{ #category : #accessing } +{ #category : 'accessing' } SDStore class >> mimeTypeFuel [ ^ 'application/X-SnapDump-Fuel' ] -{ #category : #accessing } +{ #category : 'accessing' } SDStore class >> mimeTypeStack [ ^ 'application/X-SnapDump-Stack' ] -{ #category : #lookup } +{ #category : 'lookup' } SDStore class >> withName: aString [ ^ self subclasses detect: [ :each | each storeName = aString ] ] -{ #category : #accessing } +{ #category : 'accessing' } SDStore >> defaultSnapshotOccurrencesLimit [ ^ 10 @@ -29,28 +31,28 @@ SDStore >> defaultSnapshotOccurrencesLimit [ ] -{ #category : #testing } +{ #category : 'testing' } SDStore >> isSetUp [ self subclassResponsibility ] -{ #category : #services } +{ #category : 'services' } SDStore >> removeSnapshot: aSnapshot [ ^ self subclassResponsibility ] -{ #category : #initialization } +{ #category : 'initialization' } SDStore >> reset [ ] -{ #category : #testing } +{ #category : 'testing' } SDStore >> shouldReportSnapshot: aSnapshot [ self subclassResponsibility ] -{ #category : #services } +{ #category : 'services' } SDStore >> storeSnapshot: snapshot [ snapshot prepareExport. @@ -62,7 +64,7 @@ SDStore >> storeSnapshot: snapshot [ ] ] -{ #category : #writing } +{ #category : 'writing' } SDStore >> writeSnapshot: aSnapshot [ self subclassResponsibility ] diff --git a/source/SnapDump-Core/SDVersion.class.st b/source/SnapDump-Core/SDVersion.class.st index bc1782c..af217bc 100644 --- a/source/SnapDump-Core/SDVersion.class.st +++ b/source/SnapDump-Core/SDVersion.class.st @@ -1,31 +1,33 @@ Class { - #name : #SDVersion, - #superclass : #Object, + #name : 'SDVersion', + #superclass : 'Object', #instVars : [ 'string', 'project' ], - #category : #'SnapDump-Core-Model' + #category : 'SnapDump-Core-Model', + #package : 'SnapDump-Core', + #tag : 'Model' } -{ #category : #accessing } +{ #category : 'accessing' } SDVersion class >> defaultVersionString [ ^ 'unknown' ] -{ #category : #accessing } +{ #category : 'accessing' } SDVersion class >> neoJsonMapping: mapper [ mapper for: self do: [ :mapping | mapping mapInstVars: #(string) ] ] -{ #category : #accessing } +{ #category : 'accessing' } SDVersion class >> string: aString [ ^ self new string: aString ] -{ #category : #comparing } +{ #category : 'comparing' } SDVersion >> < aVersion [ | own other versionPart1 versionPart2 | own := $. split: string. @@ -39,17 +41,17 @@ SDVersion >> < aVersion [ ^ false ] -{ #category : #comparing } +{ #category : 'comparing' } SDVersion >> = aVersion [ ^ string = aVersion string ] -{ #category : #'accessing - exceptions' } +{ #category : 'accessing - exceptions' } SDVersion >> exceptions [ ^ self store exceptionsOfVersion: self ] -{ #category : #'accessing - exceptions' } +{ #category : 'accessing - exceptions' } SDVersion >> exceptionsAt: aString [ ^ self exceptionsAt: aString @@ -57,7 +59,7 @@ SDVersion >> exceptionsAt: aString [ ] -{ #category : #'accessing - exceptions' } +{ #category : 'accessing - exceptions' } SDVersion >> exceptionsAt: aString ifAbsent: aBlock [ ^ self exceptions detect: [ :each | each string = aString ] @@ -65,49 +67,49 @@ SDVersion >> exceptionsAt: aString ifAbsent: aBlock [ ] -{ #category : #comparing } +{ #category : 'comparing' } SDVersion >> hash [ ^ string hash ] -{ #category : #printing } +{ #category : 'printing' } SDVersion >> printOn: aStream [ aStream << string ] -{ #category : #accessing } +{ #category : 'accessing' } SDVersion >> project [ ^ project ] -{ #category : #accessing } +{ #category : 'accessing' } SDVersion >> project: anObject [ project := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } SDVersion >> projectName [ ^ project name ] -{ #category : #removing } +{ #category : 'removing' } SDVersion >> remove [ self store removeVersion: self ] -{ #category : #accessing } +{ #category : 'accessing' } SDVersion >> store [ ^ project store ] -{ #category : #accessing } +{ #category : 'accessing' } SDVersion >> string [ ^ string ] -{ #category : #accessing } +{ #category : 'accessing' } SDVersion >> string: anObject [ string := anObject ] diff --git a/source/SnapDump-Core/SnapDump.class.st b/source/SnapDump-Core/SnapDump.class.st index 32934a5..a0a058c 100644 --- a/source/SnapDump-Core/SnapDump.class.st +++ b/source/SnapDump-Core/SnapDump.class.st @@ -1,6 +1,6 @@ Class { - #name : #SnapDump, - #superclass : #Object, + #name : 'SnapDump', + #superclass : 'Object', #instVars : [ 'store' ], @@ -8,17 +8,19 @@ Class { 'current', 'handler' ], - #category : #'SnapDump-Core-Base' + #category : 'SnapDump-Core-Base', + #package : 'SnapDump-Core', + #tag : 'Base' } -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } SnapDump class >> applyConfiguration: aConfig [ self setCurrent: (self withType: aConfig type) new. self current applyConfiguration: aConfig ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } SnapDump class >> configuration [ ^ { @@ -28,49 +30,49 @@ SnapDump class >> configuration [ self applyConfiguration: config ] } ] -{ #category : #accessing } +{ #category : 'accessing' } SnapDump class >> current [ ^ current ifNil: [ current := self new ] ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } SnapDump class >> hackUIManager [ UIManager compile: 'logError: anError SnapDump handleException: anError. super logError: anError' ] -{ #category : #accessing } +{ #category : 'accessing' } SnapDump class >> path: aPathString [ ^ self store: (SDFilesystemStore new path: aPathString asFileReference); yourself ] -{ #category : #initialization } +{ #category : 'initialization' } SnapDump class >> reset [ current := nil ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } SnapDump class >> setCurrent: anObject [ current := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } SnapDump class >> store [ ^ self current store ] -{ #category : #accessing } +{ #category : 'accessing' } SnapDump class >> store: aStore [ self current store: aStore. handler ifNotNil: [ handler store: aStore ] ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } SnapDump class >> uri: aUri username: aUsername password: aPassword [ ^ self store: (SDHTTPStore new @@ -79,31 +81,31 @@ SnapDump class >> uri: aUri username: aUsername password: aPassword [ yourself ] -{ #category : #accessing } +{ #category : 'accessing' } SnapDump class >> withType: aString [ ^ self allSubclasses detect: [ :each | each type = aString ] ] -{ #category : #initialization } +{ #category : 'initialization' } SnapDump >> applyConfiguration: aConfig [ store := (SDStore withName: aConfig store) new. store applyConfiguration: aConfig ] -{ #category : #accessing } +{ #category : 'accessing' } SnapDump >> store [ ^ store ifNil: [ Transcript show: 'SnapDump store is not set up. Ignoring exception sends!!!'; cr. ^ nil ] ] -{ #category : #accessing } +{ #category : 'accessing' } SnapDump >> store: anObject [ store := anObject ] -{ #category : #initialization } +{ #category : 'initialization' } SnapDump >> uri: aUri username: aUsername password: aPassword [ ^ self store uri: aUri asZnUrl; diff --git a/source/SnapDump-Core/package.st b/source/SnapDump-Core/package.st index e1ddb6f..de788e3 100644 --- a/source/SnapDump-Core/package.st +++ b/source/SnapDump-Core/package.st @@ -1 +1 @@ -Package { #name : #'SnapDump-Core' } +Package { #name : 'SnapDump-Core' }