Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix readConfig bug #65

Merged
merged 1 commit into from
Nov 21, 2016
Merged
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
17 changes: 12 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,20 @@ module.exports = {
revisionKey: function(context) {
return context.commandOptions.revision || (context.revisionData && context.revisionData.revisionKey);
},
redisDeployClient: function(context) {
redisDeployClient: function(context, pluginHelper) {
var redisLib = context._redisLib;
var redisOptions = this.pluginConfig;
redisOptions.port = this.readConfig('port');
redisOptions.activationSuffix = this.readConfig('activationSuffix');
var options = {
url: pluginHelper.readConfig('url'),
host: pluginHelper.readConfig('host'),
port: pluginHelper.readConfig('port'),
password: pluginHelper.readConfig('password'),
database: pluginHelper.readConfig('database'),
maxRecentUploads: pluginHelper.readConfig('maxRecentUploads'),
allowOverwrite: pluginHelper.readConfig('allowOverwrite'),
activationSuffix: pluginHelper.readConfig('activationSuffix')
};

return new Redis(redisOptions, redisLib);
return new Redis(options, redisLib);
},

revisionData: function(context) {
Expand Down
2 changes: 1 addition & 1 deletion lib/redis.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var Promise = require('ember-cli/lib/ext/promise');
module.exports = CoreObject.extend({

init: function(options, lib) {
var redisOptions = options;
var redisOptions = {};
var redisLib = lib;

if (options.url) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"chalk": "^1.0.0",
"core-object": "^1.1.0",
"ember-cli-babel": "^5.0.0",
"ember-cli-deploy-plugin": "^0.2.1",
"ember-cli-deploy-plugin": "^0.2.9",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been bitten by loose versioning multiple times now. I'm not sure but isn't it better to use a strict version number here. Its ok not to also, perhaps the pros out weigh the cons. Just wanted to pick your brains.

"redis": "^0.12.1",
"rsvp": "^3.0.18",
"then-redis": "^1.3.0"
Expand Down