From 02287c40f3e0383f97e7525bcbc0fcfa3121994a Mon Sep 17 00:00:00 2001
From: Motion Team <team@xcally.com>
Date: Mon, 7 Dec 2015 18:00:20 +0100
Subject: [PATCH] 0.0.5 | Built motion from commit b4141bc.

---
 package.json                                  |    2 +-
 release-notes/changelog_0.0.4.txt             |   78 -----------------------
 release-notes/changelog_0.0.5.txt             |   82 +++++++++++++++++++++++++
 server/api/update/update.controller.js        |    2 +-
 server/app.json                               |    2 +-
 server/config/environment/config_history.json |    6 +-
 6 files changed, 88 insertions(+), 84 deletions(-)
 delete mode 100644 release-notes/changelog_0.0.4.txt
 create mode 100644 release-notes/changelog_0.0.5.txt

diff --git a/package.json b/package.json
index a3757ac..9397b7b 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "motion",
-  "version": "0.0.5",
+  "version": "0.0.6",
   "main": "server/app.js",
   "dependencies": {
     "accept-language-parser": "^1.0.2",
diff --git a/release-notes/changelog_0.0.4.txt b/release-notes/changelog_0.0.4.txt
deleted file mode 100644
index 7e5d690..0000000
--- a/release-notes/changelog_0.0.4.txt
+++ /dev/null
@@ -1,78 +0,0 @@
-# xCALLY MOTION Changelog
-
-- * 872c986 - 2015-12-07: test commit 
-- * edef880 - 2015-12-07: new version 
-- * ae382fb - 2015-12-07: server side API 
-- * a25e4cb - 2015-12-07: client assets languages 
-- * d2c94d8 - 2015-12-07: client side update 
-- * 55740b7 - 2015-12-07: client side components 
-- * 3013717 - 2015-12-07: client side app update 
-- * aad6613 - 2015-12-07: server side API 
-- * ee52b95 - 2015-12-07: server side API 
-- * 45cf94d - 2015-12-07: client assets languages 
-- * 90fd223 - 2015-12-07: server side API 
-- * fa6644f - 2015-12-07: client side app main + update 
-- * 423e8e4 - 2015-12-07: modify variable app.json 
-- * aaf1b4c - 2015-12-07: server side api update 
-- * 89b5e99 - 2015-12-07: Title HTML Motion 
-- * 6c74df2 - 2015-12-07: Pm2 app.json configuration 
-- * f7b0771 - 2015-12-07: server side API update 
-- * 764ce6d - 2015-12-07: server side update 
-- * 19d5b52 - 2015-12-07: client update 
-- * d3c4122 - 2015-12-04: commit 6 
-- * ada7211 - 2015-12-04: test commi5 
-- * 8e2bbe4 - 2015-12-04: Improve Style View Motion Chat 
-- * e9e47b0 - 2015-12-04: Added tags section; Added contact management first section; Added tab base structure. 
-- * ec1ac4b - 2015-12-04: Zendesk integration: add basic field configuration 
-- * bc0f91f - 2015-12-04: Configuration Database 
-- * 3c1b3ca - 2015-12-04: test commit 4 
-- * 8f3a0c2 - 2015-12-04: test commit 2 
-- * 0da8462 - 2015-12-04: test commit 
-- * 45682db - 2015-12-04: test commit - 4 
-- * ae7dcac - 2015-12-04: test commit - 3 
-- * 1c33ab8 - 2015-12-04: new version 
-- * 6a8c8f6 - 2015-12-04: Change remote git 
-- * 300f7f0 - 2015-12-04: test commit with tag - 2 
-- * 430fe66 - 2015-12-04: test commit with tag 
-- * ff9311f - 2015-12-04: server sie routres.js 
-- * 80061e5 - 2015-12-04: package.son 
-- * 05951bf - 2015-12-04: server side models update 
-- * d38ad70 - 2015-12-04: server config socket.io 
-- * aaa0955 - 2015-12-04: server side API update 
-- * 367be9b - 2015-12-04: client side component sidebar 
-- * 7995de6 - 2015-12-04: client side languages 
-- * 1605e5a - 2015-12-04: server side app update 
-- * 69767ee - 2015-12-03: Zendesk: add body configuration, remove custom fields section 
-- * 06df96e - 2015-12-03: init version package.son 
-- * de9faa6 - 2015-12-03: Completed base structure for mail and fax automations; Added bulk destroy for triggers and automations list. 
-- * 16b99bf - 2015-12-03: server side app.js 
-- * 2191799 - 2015-12-03: package.son 
-- * c6908e8 - 2015-12-03: server side models index.js 
-- * d10be43 - 2015-12-03: server side migrations folder 
-- * ba8942e - 2015-12-03: server side config. Added config.json file. 
-- * b1797e2 - 2015-12-02: Update Nodejs 
-- * 245bc5a - 2015-12-02: package.js 
-- * 4879475 - 2015-12-02: Checkout production 
-- * 27a821b - 2015-12-02: server side routes.js 
-- * fb32d86 - 2015-12-02: server side config 
-- * ca31944 - 2015-12-02: server side api 
-- * 6221198 - 2015-12-02: client side components 
-- * 5c0d60b - 2015-12-02: client side app chat realtime 
-- * 2528ed9 - 2015-12-02: Move languages under assets 
-- * 8d3a5e0 - 2015-12-02: Remove Images 
-- * 9d724cd - 2015-12-01: change MD5 with md5 
-- * 3388ac3 - 2015-12-01: removed elastic builder and recursion helper request from app.js 
-- * 19955f8 - 2015-12-01: removed recursion helper 
-- * 2f2aadc - 2015-12-01: Triggers client side with new directive; First new triggers server side (only conditions check). 
-- * ff0433d - 2015-12-01: Bug fix grunt file to build 
-- * 6a9e7a3 - 2015-12-01: remove angular-smiles and change path languages 
-- * 0d2376d - 2015-12-01: appjs with ami and agi 
-- * b59c77a - 2015-12-01: bower.json 
-- * 19b362a - 2015-12-01: server side models 
-- * 86d977a - 2015-12-01: server side config 
-- * 24768e3 - 2015-12-01: server side API 
-- * 1e4a001 - 2015-12-01: client side quickSidebar component 
-- * dfa6a84 - 2015-12-01: client side languages components 
-- * 787afbe - 2015-12-01: client side header component 
-- * 8f08964 - 2015-12-01: client side app 
-
diff --git a/release-notes/changelog_0.0.5.txt b/release-notes/changelog_0.0.5.txt
new file mode 100644
index 0000000..510fbb7
--- /dev/null
+++ b/release-notes/changelog_0.0.5.txt
@@ -0,0 +1,82 @@
+# xCALLY MOTION Changelog
+
+- * b4141bc - 2015-12-07: config.son + config_history.son 
+- * d789675 - 2015-12-07: gitignore 
+- * 0a1dc33 - 2015-12-07: test remove config.son 
+- * 642a19d - 2015-12-07: server side API update 
+- * 872c986 - 2015-12-07: test commit 
+- * edef880 - 2015-12-07: new version 
+- * ae382fb - 2015-12-07: server side API 
+- * a25e4cb - 2015-12-07: client assets languages 
+- * d2c94d8 - 2015-12-07: client side update 
+- * 55740b7 - 2015-12-07: client side components 
+- * 3013717 - 2015-12-07: client side app update 
+- * aad6613 - 2015-12-07: server side API 
+- * ee52b95 - 2015-12-07: server side API 
+- * 45cf94d - 2015-12-07: client assets languages 
+- * 90fd223 - 2015-12-07: server side API 
+- * fa6644f - 2015-12-07: client side app main + update 
+- * 423e8e4 - 2015-12-07: modify variable app.json 
+- * aaf1b4c - 2015-12-07: server side api update 
+- * 89b5e99 - 2015-12-07: Title HTML Motion 
+- * 6c74df2 - 2015-12-07: Pm2 app.json configuration 
+- * f7b0771 - 2015-12-07: server side API update 
+- * 764ce6d - 2015-12-07: server side update 
+- * 19d5b52 - 2015-12-07: client update 
+- * d3c4122 - 2015-12-04: commit 6 
+- * ada7211 - 2015-12-04: test commi5 
+- * 8e2bbe4 - 2015-12-04: Improve Style View Motion Chat 
+- * e9e47b0 - 2015-12-04: Added tags section; Added contact management first section; Added tab base structure. 
+- * ec1ac4b - 2015-12-04: Zendesk integration: add basic field configuration 
+- * bc0f91f - 2015-12-04: Configuration Database 
+- * 3c1b3ca - 2015-12-04: test commit 4 
+- * 8f3a0c2 - 2015-12-04: test commit 2 
+- * 0da8462 - 2015-12-04: test commit 
+- * 45682db - 2015-12-04: test commit - 4 
+- * ae7dcac - 2015-12-04: test commit - 3 
+- * 1c33ab8 - 2015-12-04: new version 
+- * 6a8c8f6 - 2015-12-04: Change remote git 
+- * 300f7f0 - 2015-12-04: test commit with tag - 2 
+- * 430fe66 - 2015-12-04: test commit with tag 
+- * ff9311f - 2015-12-04: server sie routres.js 
+- * 80061e5 - 2015-12-04: package.son 
+- * 05951bf - 2015-12-04: server side models update 
+- * d38ad70 - 2015-12-04: server config socket.io 
+- * aaa0955 - 2015-12-04: server side API update 
+- * 367be9b - 2015-12-04: client side component sidebar 
+- * 7995de6 - 2015-12-04: client side languages 
+- * 1605e5a - 2015-12-04: server side app update 
+- * 69767ee - 2015-12-03: Zendesk: add body configuration, remove custom fields section 
+- * 06df96e - 2015-12-03: init version package.son 
+- * de9faa6 - 2015-12-03: Completed base structure for mail and fax automations; Added bulk destroy for triggers and automations list. 
+- * 16b99bf - 2015-12-03: server side app.js 
+- * 2191799 - 2015-12-03: package.son 
+- * c6908e8 - 2015-12-03: server side models index.js 
+- * d10be43 - 2015-12-03: server side migrations folder 
+- * ba8942e - 2015-12-03: server side config. Added config.json file. 
+- * b1797e2 - 2015-12-02: Update Nodejs 
+- * 245bc5a - 2015-12-02: package.js 
+- * 4879475 - 2015-12-02: Checkout production 
+- * 27a821b - 2015-12-02: server side routes.js 
+- * fb32d86 - 2015-12-02: server side config 
+- * ca31944 - 2015-12-02: server side api 
+- * 6221198 - 2015-12-02: client side components 
+- * 5c0d60b - 2015-12-02: client side app chat realtime 
+- * 2528ed9 - 2015-12-02: Move languages under assets 
+- * 8d3a5e0 - 2015-12-02: Remove Images 
+- * 9d724cd - 2015-12-01: change MD5 with md5 
+- * 3388ac3 - 2015-12-01: removed elastic builder and recursion helper request from app.js 
+- * 19955f8 - 2015-12-01: removed recursion helper 
+- * 2f2aadc - 2015-12-01: Triggers client side with new directive; First new triggers server side (only conditions check). 
+- * ff0433d - 2015-12-01: Bug fix grunt file to build 
+- * 6a9e7a3 - 2015-12-01: remove angular-smiles and change path languages 
+- * 0d2376d - 2015-12-01: appjs with ami and agi 
+- * b59c77a - 2015-12-01: bower.json 
+- * 19b362a - 2015-12-01: server side models 
+- * 86d977a - 2015-12-01: server side config 
+- * 24768e3 - 2015-12-01: server side API 
+- * 1e4a001 - 2015-12-01: client side quickSidebar component 
+- * dfa6a84 - 2015-12-01: client side languages components 
+- * 787afbe - 2015-12-01: client side header component 
+- * 8f08964 - 2015-12-01: client side app 
+
diff --git a/server/api/update/update.controller.js b/server/api/update/update.controller.js
index 65546fc..6ae1d16 100644
--- a/server/api/update/update.controller.js
+++ b/server/api/update/update.controller.js
@@ -38,7 +38,7 @@ exports.show = function(req, res) {
 // Get a single update
 exports.pull = function(req, res) {
   Git
-    .reset('soft', function(err, update) {
+    .reset('hard', function(err, update) {
       console.log('update', update);
       if (err) {
         return handleError(res, err);
diff --git a/server/app.json b/server/app.json
index 757879b..750999c 100644
--- a/server/app.json
+++ b/server/app.json
@@ -5,7 +5,7 @@
     "env": {
       "NODE_ENV": "production"
     },
-    "cwd": "/var/opt/motion",
+    "cwd": "/var/opt/motion/server",
     "error_file": "/var/log/xcally/motion-err.log",
     "out_file": "/var/log/xcally/motion-out.log",
     "watch": ["package.json"]
diff --git a/server/config/environment/config_history.json b/server/config/environment/config_history.json
index b28da56..2685297 100644
--- a/server/config/environment/config_history.json
+++ b/server/config/environment/config_history.json
@@ -2,9 +2,9 @@
   "development": {
     "host": "localhost",
     "port": 3306,
-    "database": "xcally",
-    "username": "root",
-    "password": "peppe88",
+    "database": "motion",
+    "username": "xcall",
+    "password": "xC@LL1234",
     "dialect": "mysql"
   },
   "test": {
-- 
1.7.1