Skip to content

Commit 8c52893

Browse files
committed
Update for ember-cli-deploy CLI changes
Needs ember-cli-deploy/ember-cli-deploy#185 to be merged before usage
1 parent 432de03 commit 8c52893

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ module.exports = {
3232
if (context.revisionKey && !context.activatedRevisionKey) {
3333
return "Deployed but did not activate revision " + context.revisionKey + ". "
3434
+ "To activate, run: "
35-
+ "ember deploy:activate " + context.revisionKey + " --environment=" + context.deployEnvironment + "\n";
35+
+ "ember deploy:activate " + context.deployTarget + " --revision=" + context.revisionKey + "\n";
3636
}
3737
},
3838
revisionKey: function(context) {
39-
return context.commandLineArgs.revisionKey || context.revisionKey;
39+
return context.commandOptions.revision || context.revisionKey;
4040
},
4141
redisDeployClient: function(context) {
4242
return context.redisDeployClient || new Redis(context.config.redis);

tests/unit/index-nodetest.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ describe('redis plugin', function() {
8787
assert.equal(plugin.readConfig('revisionKey'), '12345');
8888
});
8989

90-
it('uses the commandLineArgs value if it exists', function() {
90+
it('uses the commandOptions value if it exists', function() {
9191
var plugin = subject.createDeployPlugin({
9292
name: 'redis'
9393
});
@@ -102,8 +102,8 @@ describe('redis plugin', function() {
102102
config: {
103103
redis: config
104104
},
105-
commandLineArgs: {
106-
revisionKey: 'abcd'
105+
commandOptions: {
106+
revision: 'abcd'
107107
},
108108
revisionKey: 'something-else'
109109
};
@@ -114,7 +114,7 @@ describe('redis plugin', function() {
114114
assert.equal(config.revisionKey(context), 'abcd');
115115
});
116116

117-
it('uses the context value if it exists and commandLineArgs doesn\'t', function() {
117+
it('uses the context value if it exists and commandOptions doesn\'t', function() {
118118
var plugin = subject.createDeployPlugin({
119119
name: 'redis'
120120
});
@@ -129,7 +129,7 @@ describe('redis plugin', function() {
129129
config: {
130130
redis: config
131131
},
132-
commandLineArgs: { },
132+
commandOptions: { },
133133
revisionKey: 'something-else'
134134
};
135135

@@ -370,7 +370,7 @@ describe('redis plugin', function() {
370370
plugin.activate = function(){};
371371

372372
var context = {
373-
deployEnvironment: 'qa',
373+
deployTarget: 'qa',
374374
ui: {
375375
write: function(message){
376376
messageOutput = messageOutput + message;
@@ -394,7 +394,7 @@ describe('redis plugin', function() {
394394
plugin.didDeploy(context);
395395
assert.match(messageOutput, /Deployed but did not activate revision 123abc./);
396396
assert.match(messageOutput, /To activate, run/);
397-
assert.match(messageOutput, /ember deploy:activate 123abc --environment=qa/);
397+
assert.match(messageOutput, /ember deploy:activate qa --revision=123abc/);
398398
});
399399
});
400400
});

0 commit comments

Comments
 (0)