From 782b7903e5ff841247b1ef99d6a9cdbb3b3a72b6 Mon Sep 17 00:00:00 2001 From: Matthew Dahl Date: Tue, 2 Aug 2016 13:10:47 -0700 Subject: [PATCH 1/2] Stop using _.pluck() since it doesn't work with lodash 4.x --- lib/reporters/json-reporter.js | 2 +- lib/reporters/teamcity-reporter.js | 2 +- tests/unit/coverage-middleware-test.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/reporters/json-reporter.js b/lib/reporters/json-reporter.js index 23da1e1..6bbffdd 100644 --- a/lib/reporters/json-reporter.js +++ b/lib/reporters/json-reporter.js @@ -7,7 +7,7 @@ var percentage = function(number, total) { function totalProperty(fileData, propName) { - return _(fileData).pluck(propName).reduce(function(memo, value) { + return _(fileData).map(propName).reduce(function(memo, value) { return memo + value; }, 0); } diff --git a/lib/reporters/teamcity-reporter.js b/lib/reporters/teamcity-reporter.js index fc04ff2..9f1a8ed 100644 --- a/lib/reporters/teamcity-reporter.js +++ b/lib/reporters/teamcity-reporter.js @@ -7,7 +7,7 @@ var percentage = function(number, total) { function totalProperty(fileData, propName) { - return _(fileData).pluck(propName).reduce(function(memo, value) { + return _(fileData).map(propName).reduce(function(memo, value) { return memo + value; }, 0); } diff --git a/tests/unit/coverage-middleware-test.js b/tests/unit/coverage-middleware-test.js index bf0b362..6476cbe 100644 --- a/tests/unit/coverage-middleware-test.js +++ b/tests/unit/coverage-middleware-test.js @@ -100,12 +100,12 @@ describe('coverage middleware', function() { }); it('should instantiate all three reporters', function() { - var types = _.pluck(instances, 'type'); + var types = _.map(instances, 'type'); expect(types).to.be.eql(['TeamCityReporter', 'JsonReporter', 'LcovReporter']); }); it('should have called report on all three reporters', function() { - var reportedData = _.pluck(instances, 'reported'); + var reportedData = _.map(instances, 'reported'); expect(reportedData).to.be.eql(['my-data', 'my-data', 'my-data']); }); }); From 8c1930b90bb33f7131f533f6d7accb99954b7599 Mon Sep 17 00:00:00 2001 From: Matthew Dahl Date: Tue, 2 Aug 2016 13:13:40 -0700 Subject: [PATCH 2/2] Bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 10ddac9..9e3c805 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-cli-blanket", - "version": "0.9.7", + "version": "0.9.8", "description": "Blanket code coverage for ember-cli", "main": "index.js", "directories": {