Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
@@ -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');
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions lib/mysql.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
});
Expand Down