diff --git a/src/Grafoscopio/FossilRepo.class.st b/src/Grafoscopio/FossilRepo.class.st deleted file mode 100644 index bed07d4..0000000 --- a/src/Grafoscopio/FossilRepo.class.st +++ /dev/null @@ -1,63 +0,0 @@ -" -I model a fossil repository. For details about fossil see: - -http://fossil-scm.org/ -" -Class { - #name : #FossilRepo, - #superclass : #Object, - #instVars : [ - 'url' - ], - #category : #'Grafoscopio-Model' -} - -{ #category : #querying } -FossilRepo >> checkinsFor: relativeFilePath [ - "I get all histotical checkins information for a full file name, wich includes relative path - in the repository (i.e: 'Doc/Es/Tutoriales/tutorial.ston' or 'index.html's)" - (self jsonDataFor: relativeFilePath) = self ifTrue: [ - self inform: - 'WARNING! Key not found, verify the file name you are looking in this repository'. - ^ self ]. - ^ (((self jsonDataFor: relativeFilePath) at: 'payload') at: 'checkins') -] - -{ #category : #querying } -FossilRepo >> jsonDataFor: aFileName [ - | answer | - answer := NeoJSONReader fromString: (self jsonStringFor: aFileName). - (answer keys includes: 'resultText') ifTrue: [ - (answer at: 'resultText') = 'File entry not found.' - ifTrue: [ - self inform: 'WARNING! ', (answer at: 'resultText'), - ' Verify the file path you are entering'. - ^ self] - ]. - ^ answer -] - -{ #category : #querying } -FossilRepo >> jsonStringFor: aFileName [ - | queryForJSONData | - queryForJSONData := self url addPathSegments: #('json' 'finfo'). - queryForJSONData queryAt: 'name' put: aFileName. - ^ (ZnEasy get: queryForJSONData) contents. -] - -{ #category : #querying } -FossilRepo >> lastHashNumberFor: aFileName [ - "I'm useful to see if local versions of files are updated to the last versions of the - online repository" - ^ (self checkinsFor: aFileName) first at: 'uuid' -] - -{ #category : #accessing } -FossilRepo >> url [ - ^ url -] - -{ #category : #accessing } -FossilRepo >> url: aString [ - url := aString asUrl -] diff --git a/src/Grafoscopio/GrafoscopioDocumentation.class.st b/src/Grafoscopio/GrafoscopioDocumentation.class.st index 73f7290..ea8a1a3 100644 --- a/src/Grafoscopio/GrafoscopioDocumentation.class.st +++ b/src/Grafoscopio/GrafoscopioDocumentation.class.st @@ -21,7 +21,7 @@ GrafoscopioDocumentation class >> current [ | gfcDocumentation | gfcDocumentation := self new. - gfcDocumentation repository: (FossilRepo new url: 'http://mutabit.com/repos.fossil/grafoscopio'). + gfcDocumentation repository: (FossilRepo new remote: 'http://mutabit.com/repos.fossil/grafoscopio'). gfcDocumentation documents add: 'Docs/Es/Tutoriales/tutorial.ston'; add: 'Docs/En/Books/Manual/manual.ston'; @@ -38,7 +38,7 @@ GrafoscopioDocumentation class >> dataviz [ | gfcDocumentation | gfcDocumentation := self new. - gfcDocumentation repository: (FossilRepo new url: 'http://mutabit.com/repos.fossil/grafoscopio'). + gfcDocumentation repository: (FossilRepo new remote: 'http://mutabit.com/repos.fossil/grafoscopio'). gfcDocumentation documents add: 'Packages/Dataviz/dataviz.ston'. gfcDocumentation localPlace. @@ -55,7 +55,7 @@ GrafoscopioDocumentation class >> download: fileNameWithRelativePath [ parentFolder := newPath asFileReference. parentFolder exists ifFalse: [ parentFolder ensureCreateDirectory ]. GrafoscopioDockingBar - downloadingFrom: self current repository url asString, '/doc/tip/', fileNameWithRelativePath + downloadingFrom: self current repository remote asString, '/doc/tip/', fileNameWithRelativePath withMessage: 'Downloading ', fileName into: parentFolder ]