From 3858a2502177c00ef492e2db731dc358ce24e98d Mon Sep 17 00:00:00 2001 From: Ravi Date: Thu, 24 Jan 2019 17:40:57 +0530 Subject: [PATCH 01/19] Resolved issue of message list --- lib/rest/utils.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/rest/utils.js b/lib/rest/utils.js index 81f4cf3..27a9bf7 100644 --- a/lib/rest/utils.js +++ b/lib/rest/utils.js @@ -22,7 +22,17 @@ export function camelCaseRequestWrapper(requestFunc) { return (method, action, params) => { params = recursivelyRenameObject(params, function (value, key) { - if(typeof key !== 'string') return key; + if (typeof key !== 'string') return key; + + // Snake Case logic has issue, it replaces double underscores with single + // So dont run snake case logic for following params + let skipParamsFromSnakeCasing = [ + 'message_time__lt', 'message_time__lte', + 'message_time__gt', 'message_time__gte', + ] + if (skipParamsFromSnakeCasing.indexOf(key) >= 0) { + return key; + } return _snakeCase(key) .replace('_less_than', '__lt') @@ -35,7 +45,7 @@ export function camelCaseRequestWrapper(requestFunc) { return requestFunc(method, action, params).then(res => { res.body = recursivelyRenameObject(res.body, function (value, key) { - if(typeof key !== 'string') return key; + if (typeof key !== 'string') return key; return _camelCase(key); }); From f59cfc311458f1985bb21ee44aeebf7af2e13559 Mon Sep 17 00:00:00 2001 From: patelravi Date: Mon, 4 Feb 2019 11:40:19 +0530 Subject: [PATCH 02/19] Resolving nsp issue. --- gulpfile.js | 11 +++-------- package.json | 3 +-- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index b8010bf..371cdcb 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -4,7 +4,6 @@ var eslint = require('gulp-eslint'); var excludeGitignore = require('gulp-exclude-gitignore'); var mocha = require('gulp-mocha'); var istanbul = require('gulp-babel-istanbul'); -var nsp = require('gulp-nsp'); var plumber = require('gulp-plumber'); var coveralls = require('gulp-coveralls'); var babel = require('gulp-babel'); @@ -31,10 +30,6 @@ gulp.task('static', function () { .pipe(eslint.failAfterError()); }); -gulp.task('nsp', function (cb) { - nsp({package: path.resolve('package.json')}, cb); -}); - gulp.task('pre-test', function () { return gulp.src('lib/**/*.js') .pipe(excludeGitignore()) @@ -50,10 +45,10 @@ gulp.task('test', ['pre-test'], function (cb) { gulp.src('test/**/*.js') .pipe(plumber()) - .pipe(mocha({reporter: 'spec'})) + .pipe(mocha({ reporter: 'spec' })) .on('error', function (err) { mochaErr = err; - throw(err) + throw (err) }) .pipe(istanbul.writeReports()) .on('end', function () { @@ -93,5 +88,5 @@ gulp.task('clean', function () { return del('dist'); }); -gulp.task('prepublish', ['nsp', 'babel']); +gulp.task('prepublish', ['babel']); gulp.task('default', ['static', 'test', 'coveralls']); diff --git a/package.json b/package.json index d2c158f..a72378e 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,6 @@ "gulp-istanbul": "^1.0.0", "gulp-line-ending-corrector": "^1.0.1", "gulp-mocha": "^3.0.1", - "gulp-nsp": "^2.1.0", "gulp-plumber": "^1.0.0", "isparta": "^4.0.0", "sinon": "^2.1.0" @@ -67,4 +66,4 @@ "uri-parser": "^1.0.0", "utf8": "^2.1.2" } -} +} \ No newline at end of file From f0993bfab1057e9b79cda81129d880414aa1698f Mon Sep 17 00:00:00 2001 From: patelravi Date: Tue, 5 Feb 2019 15:41:48 +0530 Subject: [PATCH 03/19] Added node version to check logs. --- gulpfile.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gulpfile.js b/gulpfile.js index 371cdcb..6898f9c 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -43,6 +43,8 @@ gulp.task('pre-test', function () { gulp.task('test', ['pre-test'], function (cb) { var mochaErr; + console.log('Running tests with node version', process.version); + gulp.src('test/**/*.js') .pipe(plumber()) .pipe(mocha({ reporter: 'spec' })) From d52b14dfeda07ce89df0053aa44f7a18bf790b0e Mon Sep 17 00:00:00 2001 From: patelravi Date: Tue, 5 Feb 2019 16:24:25 +0530 Subject: [PATCH 04/19] Added travis ci config file. --- .circleci/config.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..b110442 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,25 @@ +version: 2 # use CircleCI 2.0 +jobs: # a collection of steps + build: # runs not using Workflows must have a `build` job as entry point + working_directory: ~/# directory where steps will run + docker: # run the steps with Docker + - image: circleci/node:4.8.2 # ...with this image as the primary container; this is where all `steps` will run + steps: # a collection of executable commands + - checkout # special step to check out source code to working directory + - run: + name: update-npm + command: 'sudo npm install -g npm@latest' + - restore_cache: # special step to restore the dependency cache + # Read about caching dependencies: https://circleci.com/docs/2.0/caching/ + key: dependency-cache-{{ checksum "package.json" }} + - run: + name: install-npm-wee + command: npm install + - save_cache: # special step to save the dependency cache + key: dependency-cache-{{ checksum "package.json" }} + paths: + - ./node_modules + - run: # run tests + name: test + command: gulp + \ No newline at end of file From ccf35eab71e74bdeed4838a9e0ec36c44a095c7a Mon Sep 17 00:00:00 2001 From: patelravi Date: Tue, 5 Feb 2019 16:28:42 +0530 Subject: [PATCH 05/19] Added permision for circle ci --- .circleci/config.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index b110442..0be1df5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,6 +6,9 @@ jobs: # a collection of steps - image: circleci/node:4.8.2 # ...with this image as the primary container; this is where all `steps` will run steps: # a collection of executable commands - checkout # special step to check out source code to working directory + - run: + name: file-permission + command: 'chown -R $USER:$USER /path/to/directory' - run: name: update-npm command: 'sudo npm install -g npm@latest' From 7347071fc36e1c724ee9b99d89851fe0f7f83b68 Mon Sep 17 00:00:00 2001 From: patelravi Date: Tue, 5 Feb 2019 16:33:01 +0530 Subject: [PATCH 06/19] Resolving circle ci issue. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0be1df5..14eebba 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,7 +8,7 @@ jobs: # a collection of steps - checkout # special step to check out source code to working directory - run: name: file-permission - command: 'chown -R $USER:$USER /path/to/directory' + command: 'chown -R $USER:$USER /home/circleci' - run: name: update-npm command: 'sudo npm install -g npm@latest' From 6f81511bd4ab5f67b1c892a68eeee30464a1d8ea Mon Sep 17 00:00:00 2001 From: patelravi Date: Tue, 5 Feb 2019 16:34:44 +0530 Subject: [PATCH 07/19] Modified circle ci configuration. --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 14eebba..419347d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,14 +1,14 @@ version: 2 # use CircleCI 2.0 jobs: # a collection of steps build: # runs not using Workflows must have a `build` job as entry point - working_directory: ~/# directory where steps will run + working_directory: ~/ # directory where steps will run docker: # run the steps with Docker - image: circleci/node:4.8.2 # ...with this image as the primary container; this is where all `steps` will run steps: # a collection of executable commands - - checkout # special step to check out source code to working directory - run: name: file-permission - command: 'chown -R $USER:$USER /home/circleci' + command: 'chown -R $USER:$USER ~/' + - checkout # special step to check out source code to working directory - run: name: update-npm command: 'sudo npm install -g npm@latest' From 4d73cf47d25cb0693fc2cb50a92917f4f0402de3 Mon Sep 17 00:00:00 2001 From: patelravi Date: Tue, 5 Feb 2019 16:37:53 +0530 Subject: [PATCH 08/19] Resolving circle ci config issue. --- .circleci/config.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 419347d..230cd2f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,13 +1,10 @@ version: 2 # use CircleCI 2.0 jobs: # a collection of steps build: # runs not using Workflows must have a `build` job as entry point - working_directory: ~/ # directory where steps will run + working_directory: /tmp # directory where steps will run docker: # run the steps with Docker - image: circleci/node:4.8.2 # ...with this image as the primary container; this is where all `steps` will run steps: # a collection of executable commands - - run: - name: file-permission - command: 'chown -R $USER:$USER ~/' - checkout # special step to check out source code to working directory - run: name: update-npm From ac004f581247c4e007c1bbcb77020bcd28b29b39 Mon Sep 17 00:00:00 2001 From: patelravi Date: Tue, 5 Feb 2019 16:40:10 +0530 Subject: [PATCH 09/19] Resolving circle ci config issue. --- .circleci/config.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 230cd2f..dbe4cae 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,16 +9,9 @@ jobs: # a collection of steps - run: name: update-npm command: 'sudo npm install -g npm@latest' - - restore_cache: # special step to restore the dependency cache - # Read about caching dependencies: https://circleci.com/docs/2.0/caching/ - key: dependency-cache-{{ checksum "package.json" }} - run: name: install-npm-wee command: npm install - - save_cache: # special step to save the dependency cache - key: dependency-cache-{{ checksum "package.json" }} - paths: - - ./node_modules - run: # run tests name: test command: gulp From cee782bb178f0cdd90a9ec0791180e1c6bf411f6 Mon Sep 17 00:00:00 2001 From: patelravi Date: Tue, 5 Feb 2019 16:42:31 +0530 Subject: [PATCH 10/19] Resolving circle ci config issue. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index dbe4cae..3d82e1b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,7 @@ version: 2 # use CircleCI 2.0 jobs: # a collection of steps build: # runs not using Workflows must have a `build` job as entry point - working_directory: /tmp # directory where steps will run + working_directory: ~/src # directory where steps will run docker: # run the steps with Docker - image: circleci/node:4.8.2 # ...with this image as the primary container; this is where all `steps` will run steps: # a collection of executable commands From 4d149666f0df6d00f8eb98692eb1aded6d002805 Mon Sep 17 00:00:00 2001 From: patelravi Date: Tue, 5 Feb 2019 16:49:01 +0530 Subject: [PATCH 11/19] Resolving circle ci config issue. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3d82e1b..509288f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ jobs: # a collection of steps build: # runs not using Workflows must have a `build` job as entry point working_directory: ~/src # directory where steps will run docker: # run the steps with Docker - - image: circleci/node:4.8.2 # ...with this image as the primary container; this is where all `steps` will run + - image: circleci/node:11.9.0 # ...with this image as the primary container; this is where all `steps` will run steps: # a collection of executable commands - checkout # special step to check out source code to working directory - run: From f05a46cfc5e2b4882b2028991d7f4374baf7ea30 Mon Sep 17 00:00:00 2001 From: patelravi Date: Tue, 5 Feb 2019 16:51:51 +0530 Subject: [PATCH 12/19] Resolving circle ci config issue. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 509288f..d8c143f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,7 +11,7 @@ jobs: # a collection of steps command: 'sudo npm install -g npm@latest' - run: name: install-npm-wee - command: npm install + command: npm install --dev - run: # run tests name: test command: gulp From bd997ab0a86a9c9c84bbe8f10ffbb79ebca63633 Mon Sep 17 00:00:00 2001 From: patelravi Date: Tue, 5 Feb 2019 16:52:59 +0530 Subject: [PATCH 13/19] Resolving circle ci config issue. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d8c143f..ec38db1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,5 +14,5 @@ jobs: # a collection of steps command: npm install --dev - run: # run tests name: test - command: gulp + command: 'gulp' \ No newline at end of file From c028a973aec166a97788cafd74336faa39867d85 Mon Sep 17 00:00:00 2001 From: patelravi Date: Tue, 5 Feb 2019 16:53:58 +0530 Subject: [PATCH 14/19] Resolving circle ci config issue. --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ec38db1..0d307b7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,8 +11,8 @@ jobs: # a collection of steps command: 'sudo npm install -g npm@latest' - run: name: install-npm-wee - command: npm install --dev + command: 'npm install --dev' - run: # run tests name: test - command: 'gulp' + command: 'gulp test' \ No newline at end of file From d63354d327c8198429e170deb1304f72104cd6b0 Mon Sep 17 00:00:00 2001 From: patelravi Date: Tue, 5 Feb 2019 16:55:45 +0530 Subject: [PATCH 15/19] Resolving circle ci config issue. --- .circleci/config.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0d307b7..a03bc40 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,6 +9,9 @@ jobs: # a collection of steps - run: name: update-npm command: 'sudo npm install -g npm@latest' + - run: + name: update-npm + command: 'npm install -g gulp' - run: name: install-npm-wee command: 'npm install --dev' From 10764f52750720b55e1fc69eb9da10d42c1ae767 Mon Sep 17 00:00:00 2001 From: patelravi Date: Tue, 5 Feb 2019 16:56:33 +0530 Subject: [PATCH 16/19] Resolving circle ci config issue. --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a03bc40..ccb2567 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,8 +10,8 @@ jobs: # a collection of steps name: update-npm command: 'sudo npm install -g npm@latest' - run: - name: update-npm - command: 'npm install -g gulp' + name: update-gulp + command: 'npm install -g gulp' - run: name: install-npm-wee command: 'npm install --dev' From f98c27f82bbf85dead0a82f72efe5b385716639b Mon Sep 17 00:00:00 2001 From: patelravi Date: Tue, 5 Feb 2019 16:57:10 +0530 Subject: [PATCH 17/19] Resolving circle ci config issue. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ccb2567..b344993 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,7 +11,7 @@ jobs: # a collection of steps command: 'sudo npm install -g npm@latest' - run: name: update-gulp - command: 'npm install -g gulp' + command: 'sudo npm install -g gulp' - run: name: install-npm-wee command: 'npm install --dev' From e2a9404a62a0d990998d754f842b0879fe7efae7 Mon Sep 17 00:00:00 2001 From: patelravi Date: Tue, 5 Feb 2019 16:58:40 +0530 Subject: [PATCH 18/19] Resolving circle ci config issue. --- gulpfile.js | 1 + 1 file changed, 1 insertion(+) diff --git a/gulpfile.js b/gulpfile.js index 6898f9c..f272484 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -64,6 +64,7 @@ gulp.task('watch', function () { gulp.task('coveralls', ['test'], function () { if (!process.env.CI) { + console.log('ignoring coveralls report generation.'); return; } From 9aa744fc8e4a5a700a1187997acc4798313cf4f9 Mon Sep 17 00:00:00 2001 From: patelravi Date: Tue, 5 Feb 2019 17:05:25 +0530 Subject: [PATCH 19/19] Resolving circle ci config issue. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b344993..4ee1159 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -17,5 +17,5 @@ jobs: # a collection of steps command: 'npm install --dev' - run: # run tests name: test - command: 'gulp test' + command: 'gulp' \ No newline at end of file