Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SADE
SADE
Commits
09c2d66f
Commit
09c2d66f
authored
May 26, 2020
by
Mathias Goebel
Browse files
Merge branch 'bugfix/
#123
-confserv' into 'develop'
fix confserv function Closes
#123
See merge request
!89
parents
44a6a56c
6e40d3d5
Changes
5
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
09c2d66f
...
...
@@ -61,7 +61,7 @@ installation:
script
:
-
bash test/eXist-db-*/bin/startup.sh | tee output.log &
# wait for eXist to have started
-
while [ $(curl --head --silent http://localhost:8080 | grep -c "200 OK") == 0 ]; do sleep
2
s; done
-
while [ $(curl --head --silent http://localhost:8080 | grep -c "200 OK") == 0 ]; do sleep
1
s; done
# shutdown eXist
-
bash test/eXist-db-*/bin/shutdown.sh
-
ls -al /tmp; mv /tmp/tests-* . ||
true
...
...
build.properties
View file @
09c2d66f
project.name
=
http://sade.textgrid.de/ns/SADE-develop
project.version
=
4.
1
.0
project.version
=
4.
2
.0
project.title
=
Scalable Architecture for Digital Editions powered by TextGrid
project.abbrev
=
SADE-develop
project.processorversion
=
5.
1
.0
project.processorversion
=
5.
2
.0
destfile
=
${build.dir}/${project.abbrev}-${project.version}.xar
test.dir
=
test
...
...
modules/textgrid/client.xqm
View file @
09c2d66f
...
...
@@ -203,19 +203,28 @@ return
doc($url|| $parameter )
};
declare function tgclient:confserv(){
(:~
: Read the current configuration from Confserv (https://textgridlab.org/1.0/confserv/getAll).
: @author: Mathias Göbel
: @return: map(*) with on level of key-value-pairs.
:)
declare
%test:name("confserv")
%test:assertExists
%test:assertXPath("$result?('tgcrud') => boolean()")
function tgclient:confserv(){
let $confservUrl := "https://textgridlab.org/1.0/confserv/getAll"
let $reqGet :=
<http:request method="get" />
let $confserv :=
http:send-request($reqGet, $confservUrl)[2]
/text()
http:send-request($reqGet, $confservUrl)[2]
=> util:base64-decode()
=> parse-json()
return
map:merge(
for $key at $pos in $conf?*?*?*?("key")
let $value := $conf?*?*?*?("value")[$pos]
for $key at $pos in $conf
serv
?*?*?*?("key")
let $value := $conf
serv
?*?*?*?("value")[$pos]
return
map:entry($key, $value))
};
...
...
repo.xml
View file @
09c2d66f
...
...
@@ -14,6 +14,20 @@
<prepare>
pre-install.xq
</prepare>
<finish>
post-install.xq
</finish>
<changelog>
<change
version=
"5.1.0"
>
<ul
xmlns=
"http://www.w3.org/1999/xhtml"
>
<li
class=
"feat"
>
Features
<ul>
<li/>
</ul>
</li>
<li
class=
"bugs"
>
Bugfixes
<ul>
<li>
tgclient:confserv#0 – refactor, documentation
</li>
</ul>
</li>
</ul>
</change>
<change
version=
"5.0.0"
>
<ul
xmlns=
"http://www.w3.org/1999/xhtml"
>
<li
class=
"feat"
>
Features
...
...
test.xq
View file @
09c2d66f
xquery
version
"3.1"
;
(:~
: Script providing access to the test functions (XQSuite). Called
: at post-install stage, evaluated at CI.
:)
import
module
namespace
test
=
"http://exist-db.org/xquery/xqsuite"
at
"resource:org/exist/xquery/lib/xqsuite/xqsuite.xql"
;
import
module
namespace
tests
=
"https://sade.textgrid.de/ns/tests"
at
"test.xqm"
;
(: callgraph :)
import
module
namespace
callgraph-test
=
"https://sade.textgrid.de/ns/callgraph-test"
at
"modules/callgraph/tests/callgraph-test.xq"
;
import
module
namespace
inspect2graphml-test
=
"https://sade.textgrid.de/ns/inspect2graphml-test"
at
"modules/callgraph/tests/inspect2graphml-test.xq"
;
import
module
namespace
tgclient
=
"https://sade.textgrid.de/ns/tgclient"
at
"/db/apps/sade/modules/textgrid/client.xqm"
;
test:suite
(
util:list-functions
(
"https://sade.textgrid.de/ns/tests"
))
,
(: * CALLGRAPH * :)
test:suite
(
util:list-functions
(
"https://sade.textgrid.de/ns/callgraph-test"
))
,
test:suite
(
util:list-functions
(
"https://sade.textgrid.de/ns/inspect2graphml-test"
))
\ No newline at end of file
test:suite
(
util:list-functions
(
"https://sade.textgrid.de/ns/inspect2graphml-test"
))
,
(: * TGCLIENT * :)
test:suite
(
util:list-functions
(
"https://sade.textgrid.de/ns/tgclient"
))
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment