Browse Source

Merge branch 'release/v0.6.9+2014.03.07'

* release/v0.6.9+2014.03.07:
  Refs EAGLE6-2139. Fixed sort constantly creating new objects during comparisons.
  DEVOPS-400 fixed build to enforce the status quo
  DEVOPS-362 update package.json to use release branch for version v0.6.9+2014.03.07.
  Refs #DEVOPS-352: update package.json to new version 0.6.9+2014.03.07.

Conflicts:
	package.json
Thomas Bell 11 years ago
parent
commit
13bdbfcd44
3 changed files with 7 additions and 3 deletions
  1. 5 1
      lib/pipeline/documentSources/SortDocumentSource.js
  2. 1 1
      npm_scripts/test/test.sh
  3. 1 1
      package.json

+ 5 - 1
lib/pipeline/documentSources/SortDocumentSource.js

@@ -143,6 +143,10 @@ proto.populate = function populate() {
 		this.documents.push(doc);
 	}
 
+	this.vSortKeyFPEs = this.vSortKey.map(function(aSortKey){
+		return new FieldPathExpression(aSortKey.getFieldPath(false));
+	});
+
 	/* sort the list */
 	this.documents.sort(SortDocumentSource.prototype.compare.bind(this));
 
@@ -173,7 +177,7 @@ proto.compare = function compare(pL,pR) {
 	var n = this.vSortKey.length;
 	for(var i = 0; i < n; ++i) {
 		/* evaluate the sort keys */
-		var pathExpr = new FieldPathExpression(this.vSortKey[i].getFieldPath(false));
+		var pathExpr = this.vSortKeyFPEs[i];
 		var left = pathExpr.evaluate(pL), right = pathExpr.evaluate(pR);
 
 		/*

+ 1 - 1
npm_scripts/test/test.sh

@@ -245,7 +245,7 @@ if [ -z "$NO_COVERAGE" ]; then
 		&& mv "$CODE_DIR.ORIGINAL" "$CODE_DIR"	\
 		|| die "ERROR: Unable to put code directory \"$CODE_DIR.ORIGNAL\" back where it belongs!"
 
-	node -e "if (JSON.parse(require('fs').readFileSync('$REPORT_FILE_BASE.json')).coverage < 100) { console.error('Less than 100% code coverage! See code coverage report at https://bamboo.rd.rcg.local/$bamboo_buildplanname-$bamboo_buildnumber/artifact/JOB1/code-coverage/$PKG_NAME-coverage.html'); process.exit(1); }"
+	node -e "if (JSON.parse(require('fs').readFileSync('$REPORT_FILE_BASE.json')).coverage < 91) { console.error('Less than 91% code coverage! See code coverage report at https://bamboo.rd.rcg.local/$bamboo_buildplanname-$bamboo_buildnumber/artifact/JOB1/code-coverage/$PKG_NAME-coverage.html'); process.exit(1); }"
 
 	echo
 fi

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "mungedb-aggregate",
-  "version": "0.6.8+2014.02.21",
+  "version": "0.6.9+2014.03.07",
   "description": "A JavaScript data aggregation pipeline based on the MongoDB aggregation framework.",
   "author": "Rivera Group <support@riverainc.com>",
   "contributors": [