Skip to content

Commit

Permalink
Merge branch 'master' into greenkeeper/@angular/animations-4.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
hfreire committed Jun 16, 2017
2 parents 8e5dd9a + 608e69f commit 8658b09
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 32 deletions.
32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@
},
"homepage": "https://github.com/hfreire/get-me-a-date#readme",
"dependencies": {
"@angular/animations": "4.2.2",
"@angular/common": "4.1.3",
"@angular/animations": "4.1.3",
"@angular/common": "4.2.2",
"@angular/compiler": "4.1.3",
"@angular/core": "4.1.3",
"@angular/core": "4.2.2",
"@angular/forms": "4.1.3",
"@angular/http": "4.1.3",
"@angular/http": "4.2.2",
"@angular/material": "2.0.0-beta.6",
"@angular/platform-browser": "4.1.3",
"@angular/platform-browser": "4.2.2",
"@angular/platform-browser-dynamic": "4.1.3",
"@angular/router": "4.1.3",
"@types/lodash": "4.14.65",
"@angular/router": "4.2.2",
"@types/lodash": "4.14.66",
"angular-in-memory-web-api": "0.3.2",
"angular2-moment": "1.3.3",
"aws-sdk": "2.67.0",
"aws-sdk": "2.71.0",
"bluebird": "3.5.0",
"bluebird-retry": "0.10.1",
"bluebird-retry": "0.11.0",
"brakes": "2.5.3",
"chart.js": "2.6.0",
"core-js": "2.4.1",
Expand All @@ -42,10 +42,10 @@
"nightmare": "2.10.0",
"random-http-useragent": "1.1.0",
"request": "2.81.0",
"rxjs": "5.4.0",
"serverful": "1.1.2",
"rxjs": "5.4.1",
"serverful": "1.1.3",
"sqlite3": "3.1.8",
"systemjs": "0.20.13",
"systemjs": "0.20.14",
"tinder": "1.19.0",
"uuid": "3.0.1",
"zone.js": "0.8.12"
Expand All @@ -55,11 +55,11 @@
"chai": "4.0.2",
"chai-as-promised": "7.0.0",
"coveralls": "2.13.1",
"eslint": "3.19.0",
"eslint-config-hfreire": "1.0.4",
"eslint": "4.0.0",
"eslint-config-hfreire": "1.0.6",
"eslint-plugin-import": "2.3.0",
"eslint-plugin-json": "1.2.0",
"eslint-plugin-mocha": "4.9.0",
"eslint-plugin-mocha": "4.10.1",
"eslint-plugin-node": "5.0.0",
"eslint-plugin-promise": "3.5.0",
"eslint-plugin-standard": "3.0.1",
Expand All @@ -72,7 +72,7 @@
"semantic-release": "6.3.6",
"testdouble": "3.0.0",
"tslint": "5.4.3",
"tslint-config-standard": "5.0.2",
"tslint-config-standard": "6.0.1",
"typescript": "2.3.4"
},
"config": {
Expand Down
4 changes: 2 additions & 2 deletions src/app.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/usr/bin/env node

/*
* Copyright (c) 2017, Hugo Freire <hugo@exec.sh>.
*
* This source code is licensed under the license found in the
* LICENSE file in the root directory of this source tree.
*/

#!/usr/bin/env node

const VERSION = process.env.VERSION
const VERSION_COMMIT = process.env.VERSION_COMMIT
const VERSION_BUILD_DATE = process.env.VERSION_BUILD_DATE
Expand Down
13 changes: 1 addition & 12 deletions src/dates/match/match.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const findOrCreateNewRecommendationFromMatch = function (channel, channelRecomme
return recommendation
}

return this.setUpMatch(recommendation, match)
return Recommendation.setUpMatch(recommendation, match)
})
.then((recommendation) => Recommendations.save([ channelName, channelRecommendationId ], recommendation))
}
Expand Down Expand Up @@ -68,17 +68,6 @@ class Match {
})
.then(() => { return { messages, matches } })
}

setUpMatch (recommendation, match) {
recommendation.match = true
recommendation.match_id = match._id

if (match.created_date) {
recommendation.matched_date = new Date(match.created_date.replace(/T/, ' ').replace(/\..+/, ''))
}

return recommendation
}
}

module.exports = new Match()
14 changes: 12 additions & 2 deletions src/dates/recommendation/recommendation.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ const Promise = require('bluebird')
const { AlreadyCheckedOutEarlierError } = require('./errors')

const Taste = require('../taste')
const { Match } = require('../match')

const { Recommendations } = require('../../database')

Expand Down Expand Up @@ -93,7 +92,7 @@ class Recommendation {
return recommendation
}

return Match.setUpMatch(recommendation, match)
return this.setUpMatch(recommendation, match)
})
.then((recommendation) => recommendation)
}
Expand Down Expand Up @@ -174,6 +173,17 @@ class Recommendation {
})
})
}

setUpMatch (recommendation, match) {
recommendation.match = true
recommendation.match_id = match._id

if (match.created_date) {
recommendation.matched_date = new Date(match.created_date.replace(/T/, ' ').replace(/\..+/, ''))
}

return recommendation
}
}

module.exports = new Recommendation()

0 comments on commit 8658b09

Please sign in to comment.