├── tests ├── _src │ ├── data │ │ ├── intro.md │ │ ├── error │ │ │ ├── churches-error.json │ │ │ └── churches-error.yml │ │ ├── home.md │ │ ├── churches │ │ │ ├── church-a.json │ │ │ ├── church-b.json │ │ │ ├── church-c.yml │ │ │ ├── church-a.md │ │ │ ├── church-b.md │ │ │ └── church-c.md │ │ ├── church-image.yml │ │ ├── churches.json │ │ ├── limit_entries.yml │ │ ├── order_entries.yml │ │ ├── filter_entries.yml │ │ ├── churches.yml │ │ ├── combined_entries.yml │ │ └── pagination_entries.yml │ ├── js │ │ └── main.js │ ├── lib │ │ ├── lib.js │ │ └── img │ │ │ └── logo.png │ ├── css │ │ ├── includes.scss │ │ ├── main.css │ │ └── main.scss │ ├── img │ │ ├── blue.jpg │ │ ├── logo.png │ │ ├── green.jpg │ │ └── orange.jpg │ ├── template │ │ ├── churches │ │ │ ├── detail.html │ │ │ ├── detail.tpl │ │ │ └── overview.tpl │ │ ├── fileTest.tpl │ │ ├── index.tpl │ │ └── home.tpl │ ├── template_twig │ │ ├── fileTest.html │ │ ├── churches │ │ │ ├── detail.html │ │ │ └── overview.html │ │ ├── index.html │ │ └── home.html │ └── site │ │ └── site.yml ├── config.yml ├── .htaccess └── Pageon │ ├── Test │ └── ApiTest.php │ └── Stitcher │ └── Api │ └── PagesTest.php ├── src ├── config.yml ├── Pageon │ └── Stitcher │ │ ├── Api │ │ ├── RestController.php │ │ └── Pages.php │ │ ├── Exception │ │ └── ValidationException.php │ │ ├── Response │ │ └── JsonResponse.php │ │ ├── ApiPlugin.php │ │ └── Application │ │ └── ApiApplication.php └── services.yml ├── .gitignore ├── .scrutinizer.yml ├── phpunit.xml ├── README.md ├── composer.json └── composer.lock /tests/_src/data/intro.md: -------------------------------------------------------------------------------- 1 | # Intro 2 | -------------------------------------------------------------------------------- /tests/_src/js/main.js: -------------------------------------------------------------------------------- 1 | var foo = 'bar'; 2 | -------------------------------------------------------------------------------- /tests/_src/lib/lib.js: -------------------------------------------------------------------------------- 1 | var foo = 'bar'; 2 | -------------------------------------------------------------------------------- /tests/_src/data/error/churches-error.json: -------------------------------------------------------------------------------- 1 | entries: { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /tests/_src/data/home.md: -------------------------------------------------------------------------------- 1 | # Home 2 | 3 | There is nowhere like HOOOOME 4 | -------------------------------------------------------------------------------- /src/config.yml: -------------------------------------------------------------------------------- 1 | api: 2 | # endpoint: 3 | 4 | directories: 5 | api: ./api 6 | -------------------------------------------------------------------------------- /tests/_src/data/churches/church-a.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "JSON Church A" 3 | } 4 | -------------------------------------------------------------------------------- /tests/_src/css/includes.scss: -------------------------------------------------------------------------------- 1 | p { 2 | a { 3 | color: red; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /tests/_src/data/error/churches-error.yml: -------------------------------------------------------------------------------- 1 | entries: 2 | church-a: { 3 | 4 | } 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .cache 2 | .DS_Store 3 | .idea 4 | /tests/.cache 5 | /tests/public 6 | /vendor 7 | -------------------------------------------------------------------------------- /tests/_src/img/blue.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pageon/stitcher-api/master/tests/_src/img/blue.jpg -------------------------------------------------------------------------------- /tests/_src/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pageon/stitcher-api/master/tests/_src/img/logo.png -------------------------------------------------------------------------------- /tests/_src/img/green.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pageon/stitcher-api/master/tests/_src/img/green.jpg -------------------------------------------------------------------------------- /tests/_src/img/orange.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pageon/stitcher-api/master/tests/_src/img/orange.jpg -------------------------------------------------------------------------------- /tests/_src/lib/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pageon/stitcher-api/master/tests/_src/lib/img/logo.png -------------------------------------------------------------------------------- /tests/_src/data/church-image.yml: -------------------------------------------------------------------------------- 1 | name: Church Image 2 | image: 3 | src: img/green.jpg 4 | alt: A green image 5 | -------------------------------------------------------------------------------- /tests/_src/data/churches/church-b.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "JSON Church B", 3 | "body": "churches/church-b.md" 4 | } 5 | -------------------------------------------------------------------------------- /tests/_src/data/churches/church-c.yml: -------------------------------------------------------------------------------- 1 | name: MD Church C 2 | description: A description 3 | body: churches/church-c.md 4 | -------------------------------------------------------------------------------- /tests/_src/css/main.css: -------------------------------------------------------------------------------- 1 | body { 2 | background: #F3F3F3; 3 | font-family: "Helvetica Neue", Helvetica, sans-serif; 4 | } 5 | -------------------------------------------------------------------------------- /tests/_src/template/churches/detail.html: -------------------------------------------------------------------------------- 1 |
5 | {{ intro }} 6 |
7 | 8 | -------------------------------------------------------------------------------- /tests/_src/data/churches.json: -------------------------------------------------------------------------------- 1 | { 2 | "entries" : { 3 | "church-b" : { 4 | "name": "Church B" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /tests/_src/css/main.scss: -------------------------------------------------------------------------------- 1 | body { 2 | background: #F3F3F3; 3 | font-family: "Helvetica Neue", Helvetica, sans-serif; 4 | } 5 | 6 | @import "css/includes"; 7 | -------------------------------------------------------------------------------- /tests/_src/template/fileTest.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests/_src/template_twig/fileTest.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests/_src/data/limit_entries.yml: -------------------------------------------------------------------------------- 1 | entries: 2 | entry-a: 3 | title: A 4 | entry-b: 5 | title: B 6 | entry-c: 7 | title: C 8 | entry-d: 9 | title: D 10 | -------------------------------------------------------------------------------- /tests/_src/data/order_entries.yml: -------------------------------------------------------------------------------- 1 | entries: 2 | entry-a: 3 | title: A 4 | entry-b: 5 | title: B 6 | entry-c: 7 | title: C 8 | entry-d: 9 | title: D 10 | -------------------------------------------------------------------------------- /tests/_src/template/churches/detail.tpl: -------------------------------------------------------------------------------- 1 | {extends 'index.tpl'} 2 | 3 | {block 'content'} 4 | {$intro} 5 | 6 |10 | {$church.description} 11 |
12 | {/block} 13 | -------------------------------------------------------------------------------- /.scrutinizer.yml: -------------------------------------------------------------------------------- 1 | build: 2 | environment: 3 | php: 4 | version: 7.0.8 5 | tests: 6 | override: 7 | - command: 'vendor/bin/phpunit' 8 | checks: 9 | php: 10 | code_rating: true 11 | duplication: true 12 | -------------------------------------------------------------------------------- /tests/_src/template_twig/churches/detail.html: -------------------------------------------------------------------------------- 1 | {% extends 'index.html' %} 2 | 3 | {% block content %} 4 | {{ intro }} 5 | 6 |10 | {{ church.description }} 11 |
12 | {% endblock %} 13 | -------------------------------------------------------------------------------- /tests/_src/data/filter_entries.yml: -------------------------------------------------------------------------------- 1 | entries: 2 | entry-a: 3 | highlight: true 4 | entry-b: 5 | highlight: true 6 | entry-c: 7 | highlight: false 8 | entry-d: 9 | highlight: false 10 | entry-e: 11 | highlight: false 12 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 |