diff --git a/index.js b/index.js index 8a669c5..2f2627b 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,7 @@ /* jshint node: true */ 'use strict'; -var Promise = require('ember-cli/lib/ext/promise'); +var Promise = require('rsvp').Promise; var DeployPluginBase = require('ember-cli-deploy-plugin'); var path = require('path'); @@ -39,12 +39,10 @@ module.exports = { revisionKey: function (context) { return context.commandOptions.revision || (context.revisionData && context.revisionData.revisionKey); }, - deployClient: function (context) { - var mysqlOptions = this.pluginConfig; - mysqlOptions.port = this.readConfig('port'); + deployClient: function (context, pluginHelper) { + this.port = pluginHelper.readConfig('port'); var mysqlLib = context._mysqlLib; - - return new MySQL(mysqlOptions, mysqlLib); + return new MySQL(this, mysqlLib); }, didDeployMessage: function (context) { var revisionKey = context.revisionData && context.revisionData.revisionKey; diff --git a/lib/mysql.js b/lib/mysql.js index 2847d60..a227b4d 100644 --- a/lib/mysql.js +++ b/lib/mysql.js @@ -55,10 +55,10 @@ module.exports = CoreObject.extend({ var maxEntries = this._maxRecentUploads; return Promise.resolve() - .then(this._createIfTableDoesNotExist.bind(this, tableName)) + //.then(this._createIfTableDoesNotExist.bind(this, tableName)) .then(this._uploadIfKeyDoesNotExist.bind(this, tableName, revisionKey, value)) .then(this._listRevisions.bind(this, tableName)) - .then(this._trimRecentUploadsList.bind(this, tableName, maxEntries)) + //.then(this._trimRecentUploadsList.bind(this, tableName, maxEntries)) .then(function () { return [tableName, revisionKey]; });