Synchronizing before testing installation in other image. FIXME: jsonRoot was deleted. Is not needed now, but it could be soon.
This commit is contained in:
parent
8736889a63
commit
848f2ca765
@ -38,12 +38,13 @@ FossilRepo >> capabilities [
|
||||
{ #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 jsonWikiDataFor: relativeFilePath) = self ifTrue: [
|
||||
self inform:
|
||||
in the repository (i.e: 'Doc/Es/Tutoriales/tutorial.ston' or 'index.html')"
|
||||
| payload |
|
||||
payload := (self jsonDataFor: relativeFilePath) at: 'payload' ifAbsent: [
|
||||
self inform:
|
||||
'WARNING! Key not found, verify the file name you are looking in this repository'.
|
||||
^ self ].
|
||||
^ (((self jsonWikiDataFor: relativeFilePath) at: 'payload') at: 'checkins')
|
||||
^ self ].
|
||||
^ payload at: 'checkins'
|
||||
]
|
||||
|
||||
{ #category : #wiki }
|
||||
@ -58,23 +59,15 @@ FossilRepo >> fetchPage: pageName [
|
||||
|
||||
{ #category : #utility }
|
||||
FossilRepo >> jsonDataFor: anUrlSegment [
|
||||
^ ZnClient new
|
||||
get: (self jsonRoot addPathSegment: anUrlSegment);
|
||||
contents.
|
||||
]
|
||||
|
||||
{ #category : #utility }
|
||||
FossilRepo >> jsonRoot [
|
||||
"I define the root of the JSON API for all repo querying and modifiying operations"
|
||||
|
||||
^ self remote addPathSegment: 'json'.
|
||||
|
||||
^ NeoJSONReader fromString: (self jsonStringFor: anUrlSegment)
|
||||
]
|
||||
|
||||
{ #category : #querying }
|
||||
FossilRepo >> jsonStringFor: aFileName [
|
||||
| queryForJSONData |
|
||||
queryForJSONData := self remote addPathSegments: #('json' 'finfo').
|
||||
queryForJSONData queryAt: 'name' put: aFileName.
|
||||
| baseUrl queryForJSONData |
|
||||
baseUrl := self remote addPathSegments: #('json' 'finfo').
|
||||
queryForJSONData := baseUrl queryAt: 'name' put: aFileName.
|
||||
^ (ZnEasy get: queryForJSONData) contents.
|
||||
]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user