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 }
|
{ #category : #querying }
|
||||||
FossilRepo >> checkinsFor: relativeFilePath [
|
FossilRepo >> checkinsFor: relativeFilePath [
|
||||||
"I get all histotical checkins information for a full file name, wich includes relative path
|
"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)"
|
in the repository (i.e: 'Doc/Es/Tutoriales/tutorial.ston' or 'index.html')"
|
||||||
(self jsonWikiDataFor: relativeFilePath) = self ifTrue: [
|
| payload |
|
||||||
self inform:
|
payload := (self jsonDataFor: relativeFilePath) at: 'payload' ifAbsent: [
|
||||||
|
self inform:
|
||||||
'WARNING! Key not found, verify the file name you are looking in this repository'.
|
'WARNING! Key not found, verify the file name you are looking in this repository'.
|
||||||
^ self ].
|
^ self ].
|
||||||
^ (((self jsonWikiDataFor: relativeFilePath) at: 'payload') at: 'checkins')
|
^ payload at: 'checkins'
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #wiki }
|
{ #category : #wiki }
|
||||||
@ -58,23 +59,15 @@ FossilRepo >> fetchPage: pageName [
|
|||||||
|
|
||||||
{ #category : #utility }
|
{ #category : #utility }
|
||||||
FossilRepo >> jsonDataFor: anUrlSegment [
|
FossilRepo >> jsonDataFor: anUrlSegment [
|
||||||
^ ZnClient new
|
|
||||||
get: (self jsonRoot addPathSegment: anUrlSegment);
|
|
||||||
contents.
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #utility }
|
^ NeoJSONReader fromString: (self jsonStringFor: anUrlSegment)
|
||||||
FossilRepo >> jsonRoot [
|
|
||||||
"I define the root of the JSON API for all repo querying and modifiying operations"
|
|
||||||
|
|
||||||
^ self remote addPathSegment: 'json'.
|
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #querying }
|
{ #category : #querying }
|
||||||
FossilRepo >> jsonStringFor: aFileName [
|
FossilRepo >> jsonStringFor: aFileName [
|
||||||
| queryForJSONData |
|
| baseUrl queryForJSONData |
|
||||||
queryForJSONData := self remote addPathSegments: #('json' 'finfo').
|
baseUrl := self remote addPathSegments: #('json' 'finfo').
|
||||||
queryForJSONData queryAt: 'name' put: aFileName.
|
queryForJSONData := baseUrl queryAt: 'name' put: aFileName.
|
||||||
^ (ZnEasy get: queryForJSONData) contents.
|
^ (ZnEasy get: queryForJSONData) contents.
|
||||||
]
|
]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user