Skip to content
This repository was archived by the owner on Nov 21, 2019. It is now read-only.

Commit a88bdd9

Browse files
Support JATS articles (#30)
* Support JATS articles directly * Keep it wrapped in a Libero item * Make a dedicated bundle * Cross bundle so create a function * Test * Avoid setting a fake argument * Not meant * Move Libero XML to its own bundle
1 parent dc4c0b9 commit a88bdd9

File tree

35 files changed

+1191
-178
lines changed

35 files changed

+1191
-178
lines changed

.docker/api/data/blog-articles/post1/1.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22

33
<item xmlns="http://libero.pub">
44

5-
<front xml:lang="en">
5+
<meta>
66

77
<id>post1</id>
8+
9+
</meta>
10+
11+
<front xml:lang="en">
12+
813
<title>Post 1</title>
914

1015
</front>
Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,27 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

3-
<item xmlns="http://libero.pub">
3+
<item xmlns="http://libero.pub" xmlns:jats="http://jats.nlm.nih.gov">
44

5-
<front xml:lang="en">
5+
<meta>
66

77
<id>article1</id>
8-
<title>Article 1</title>
98

10-
</front>
9+
</meta>
10+
11+
<jats:article>
12+
13+
<jats:front>
14+
15+
<jats:article-meta>
16+
17+
<jats:title-group>
18+
<jats:article-title>Article 1</jats:article-title>
19+
</jats:title-group>
20+
21+
</jats:article-meta>
22+
23+
</jats:front>
24+
25+
</jats:article>
1126

1227
</item>

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@ To run a website reading from two content services (`blog-articles` and `scholar
1616
content_page:
1717
pages:
1818
blog_article:
19+
handler: 'libero'
1920
path: '/blog/{id}'
2021
service: 'blog-articles'
2122
scholarly_article:
23+
handler: 'libero'
2224
path: '/articles/{id}'
2325
service: 'scholarly-articles'
2426
```

composer.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
"autoload-dev": {
1212
"psr-4": {
1313
"tests\\Libero\\Browser\\": "tests/",
14-
"tests\\Libero\\ContentPageBundle\\": "vendor-extra/ContentPageBundle/tests/"
14+
"tests\\Libero\\ContentPageBundle\\": "vendor-extra/ContentPageBundle/tests/",
15+
"tests\\Libero\\JatsContentBundle\\": "vendor-extra/JatsContentBundle/tests/",
16+
"tests\\Libero\\LiberoContentBundle\\": "vendor-extra/LiberoContentBundle/tests/"
1517
}
1618
},
1719
"require": {
@@ -20,6 +22,8 @@
2022
"ext-mbstring": "*",
2123
"csa/guzzle-bundle": "^3.1",
2224
"libero/content-page-bundle": "^1.0@dev",
25+
"libero/jats-content-bundle": "^1.0@dev",
26+
"libero/libero-content-bundle": "^1.0@dev",
2327
"libero/patterns-bundle": "^1.0@dev",
2428
"symfony/asset": "^4.1",
2529
"symfony/config": "^4.1",

composer.lock

Lines changed: 80 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/bundles.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
return [
66
Csa\Bundle\GuzzleBundle\CsaGuzzleBundle::class => ['all' => true],
77
Libero\ContentPageBundle\ContentPageBundle::class => ['all' => true],
8+
Libero\JatsContentBundle\JatsContentBundle::class => ['all' => true],
9+
Libero\LiberoContentBundle\LiberoContentBundle::class => ['all' => true],
810
Libero\LiberoPatternsBundle\LiberoPatternsBundle::class => ['all' => true],
911
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
1012
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],

config/packages/dev/content_page.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
content_page:
22
pages:
33
blog_article:
4+
handler: 'libero'
45
path: '/blog/{id}'
56
service: 'blog-articles'
67
scholarly_article:
8+
handler: 'jats'
79
path: '/articles/{id}'
810
service: 'scholarly-articles'
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
content_page:
22
pages:
33
blog_article:
4+
handler: 'libero'
45
path: '/blog/{id}'
56
service: 'blog-articles'
67
scholarly_article:
8+
handler: 'libero'
79
path: '/articles/{id}'
810
service: 'scholarly-articles'

phpunit.xml.dist

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,20 @@
1818
<testsuite name="ContentPageBundle">
1919
<directory suffix=".php">vendor-extra/ContentPageBundle/tests</directory>
2020
</testsuite>
21+
<testsuite name="JatsContentBundle">
22+
<directory suffix=".php">vendor-extra/JatsContentBundle/tests</directory>
23+
</testsuite>
24+
<testsuite name="LiberoContentBundle">
25+
<directory suffix=".php">vendor-extra/LiberoContentBundle/tests</directory>
26+
</testsuite>
2127
</testsuites>
2228

2329
<filter>
2430
<whitelist>
2531
<directory>src</directory>
2632
<directory>vendor-extra/ContentPageBundle/src</directory>
33+
<directory>vendor-extra/JatsContentBundle/src</directory>
34+
<directory>vendor-extra/LiberoContentBundle/src</directory>
2735
</whitelist>
2836
</filter>
2937

symfony.lock

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@
4747
"libero/content-page-bundle": {
4848
"version": "1.0.x-dev"
4949
},
50+
"libero/jats-content-bundle": {
51+
"version": "1.0.x-dev"
52+
},
53+
"libero/libero-content-bundle": {
54+
"version": "1.0.x-dev"
55+
},
5056
"libero/patterns-bundle": {
5157
"version": "1.0.x-dev"
5258
},

0 commit comments

Comments
 (0)