Skip to content

Commit

Permalink
Merge pull request #83 from nzzdev/release-3.0.0
Browse files Browse the repository at this point in the history
Release 3.0.0
  • Loading branch information
benib authored Nov 27, 2017
2 parents 4334aa0 + d87eaec commit 593ca59
Show file tree
Hide file tree
Showing 76 changed files with 10,714 additions and 3,355 deletions.
40 changes: 40 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
defaults: &defaults
working_directory: ~/q-server
docker:
- image: circleci/node:9

version: 2
jobs:
build:
<<: *defaults

steps:
- run:
name: "Installing headless chrome dependencies"
command: sudo apt-get update && sudo apt-get install -yq gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget

- run:
name: "Checking Versions"
command: |
node --version
npm --version
- checkout

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package-lock.json" }}

- run:
name: "install dependencies"
command: npm install

- run:
name: test
command: npm run test

- save_cache:
key: v1-dependencies-{{ checksum "package-lock.json" }}
paths:
- node_modules
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
node_modules
.vscode
.DS_Store
.DS_Store

test/logs/pouchdb.log
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# Q Server

__Q__ is a system that lets journalists create visual elements for stories. It is developed by [NZZ Storytelling](https://www.nzz.ch/storytelling) and used in the [NZZ](https://www.nzz.ch) newsroom.
__Q__ is a system that lets journalists create visual elements for stories. It is developed by [NZZ Storytelling](https://www.nzz.ch/storytelling) and used in the [NZZ](https://www.nzz.ch) newsroom. There is a Demo over here: https://q-demo.st.nzz.ch

This is the server for the Q Toolbox. To make use of Q server you will also need a [Q editor](https://github.com/nzzdev/Q-editor/).

Demo: https://q-demo.st.nzz.ch

Documentation: https://nzzdev.github.io/Q-server

## Development
### Tests
There is a 100% coverage aim with the tests. Please do not lower the coverage.
The tests use `pouchdb-server` to mock the database and implement a simple mock tool endpoint. This makes e2e testing completely self contained without the need for any external services running. Just do a `npm install` and then `npm run test` and you are good to go. There are e2e tests in `test/e2e-tests.js` and some unit tests in `test/unit-tests.js`.

## License
Copyright (c) 2017 Neue Zürcher Zeitung. All rights reserved.

Expand Down
3 changes: 0 additions & 3 deletions auth/couchdb-cookie/plugins.js

This file was deleted.

145 changes: 0 additions & 145 deletions auth/couchdb-cookie/routes.js

This file was deleted.

14 changes: 0 additions & 14 deletions auth/couchdb-cookie/state.js

This file was deleted.

14 changes: 0 additions & 14 deletions auth/couchdb-cookie/strategy.js

This file was deleted.

20 changes: 0 additions & 20 deletions db.js

This file was deleted.

46 changes: 0 additions & 46 deletions defaults/misc.js

This file was deleted.

2 changes: 0 additions & 2 deletions docs/_data/navigation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,5 @@ main:
url: rendering-info.html
- title: "toolRuntimeConfig"
url: tool-runtime-config.html
- title: "Plugins"
url: "plugins.html"
- title: "Migrations"
url: "migrations.html"
5 changes: 2 additions & 3 deletions docs/about-targets.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ So, in a nutshell we have to deal with two groups of target specifics.
- __Technology related specifics__: your targets are different applications which can interpret markup or not

## Styling related specifics
For each tool - target - environment combination styles can be configured in _config/tools.js_ of your Q server implementation. That can be done either:
- by specifying a `url` or
- by specifying a string with the styles in `content`
For each tool - target - environment combination additional [rendering info](rendering-info.html) can be configured in the config passed as `app.tools` to `Hapi.server()`. We use _config/tools.js_ for this. See our [demo implementation](https://github.com/nzzdev/Q-server-demo) for details.
This `additionalRenderingInfo` object will be merged with the object returned from the defined endpoint of the tool before getting sent back to the client. We use this to apply the stylesheets of our styleguide system to theme the rendered output for different publications.

```javascript
const tools = {
Expand Down
Loading

0 comments on commit 593ca59

Please sign in to comment.