Merge pull request #16 from coderbyheart/fix-unit-tests

fix(api,testing): fix API status codes, fix unit test
Merge branch 'continuous-deployment' of github.com:coderbyheart/dothiv into continuous-deployment
chore(continuous-deployment): relocated deploy scripts
refactor(hosting): merged DirectoryIndex into route config
feat(continous-deployment): implement update of deployment via hook

This implements a github webhook which triggers an automated update.

Here is how it works:

The webhook at `web/github.php` is called. It checks if the update
is targeted for our repository (dothiv) and the branch of the
current clone. If all matches the file `app/cache/update` is
created. This is done by the webserver user which has write
permissions to the cache folder anyway.

A cronjob of `deployment/dothiv-web-01.dothiv.org.deploy.sh` is
running every minute and checks for the existence of the
`app/cache/update`. If it exists it creates a lockfile
`app/cache/update.lock`, creates a symlink of the `web/index.php`
to the `web/maintenance.php` and executs the update procedure.
The user running this cronjob needs write permissions to the
checkout.
The lockfile is used to prevent multiple update jobs running
at once.

If the update procedure succeeds the `app/cache/update[.lock]`
is removed and the symlink of `web/index.php` to
`web/app.php` is created.

The `web/maintenance.php` file contains a simple error page which
returns a HTTP 503 error code and a `Retry-After: 60` header.
The automatically refreshes itself after 60 seconds (including
a hashbang).
fix(continous-deployment): actually update the working copy
chore(continous-deployment): remove unused scripts
fix(maintenance.php): be protocol agnostic
style(maintenance.php): move return statement into function
feat(continous-deployment): stash changes before pulling
feat(continous-deployment): be a little more verbose
feat(continuous-deployment): make deploy script output more readable
fix(continuous-deployment): remove unicode characters
feat(continuous-deployment): only build assets if needed
fix(frontend): HTML-title was broken while bootstrapping angular
Merge pull request #17 from coderbyheart/continuous-deployment

Continuous deployment
fix(facebook-login): adjust URL to current sf2 environment
trans(): First version of translation file
fix(formManager): adopt renamed field in API response
refactor(e2e-tests): now using protractor

This removes the old end to end tests and replaces them with equivalent
protractor compartible tests.

To install protractor on your system,
$ npm install protractor
$ ./node_modules/.bin/webdriver-manager update

To run the tests, start the webdriver manager
$ ./node_modules/.bin/webdriver-manager start
and keep it running.

Now run the tests from a different terminal, using
$ ./node_modules/.bin/protractor src/DotHiv/WebsiteCharityBundle/Resources/test/config/protractor-e2e.js
from the root project directory.

Protractor can also be run in debugging mode
$ ./node_modules/.bin/protractor debug src/DotHiv/WebsiteCharityBundle/Resources/test/config/protractor-e2e.js
In debugging mode, the javascript statement
  debugger;
causes the test to stop and launches the CLI step-by-step debugger.

Unfourtunately, tests fail from time to time due to a timeout. This
behaviour seems to be unpredictible and is related to the AJAX calls.
If run in debug mode, the tests seems to be less likely to fail randomly.