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

Update to use new verbose option for logging #19

Merged
merged 1 commit into from
Oct 25, 2015
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
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ module.exports = {
manifestPath: manifestPath
};

this.log('preparing to upload to S3 bucket `' + bucket + '`');
this.log('preparing to upload to S3 bucket `' + bucket + '`', { verbose: true });

return s3.upload(options)
.then(function(filesUploaded){
self.log('uploaded ' + filesUploaded.length + ' files ok');
self.log('uploaded ' + filesUploaded.length + ' files ok', { verbose: true });
return { filesUploaded: filesUploaded };
})
.catch(this._errorMessage.bind(this));
Expand Down
10 changes: 5 additions & 5 deletions lib/s3.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module.exports = CoreObject.extend({
var manifestPath = options.manifestPath;
if (manifestPath) {
var key = path.join(prefix, manifestPath);
plugin.log('Downloading manifest for differential deploy from `' + key + '`...');
plugin.log('Downloading manifest for differential deploy from `' + key + '`...', { verbose: true });
return new Promise(function(resolve, reject){
var params = { Bucket: options.bucket, Key: key};
this._client.getObject(params, function(error, data) {
Expand All @@ -49,10 +49,10 @@ module.exports = CoreObject.extend({
}
}.bind(this));
}.bind(this)).then(function(manifestEntries){
plugin.log("Manifest found. Differential deploy will be applied.");
plugin.log("Manifest found. Differential deploy will be applied.", { verbose: true });
return _.difference(filePaths, manifestEntries);
}).catch(function(reason){
plugin.log("Manifest not found. Disabling differential deploy.", { color: 'yellow' });
}).catch(function(/* reason */){
plugin.log("Manifest not found. Disabling differential deploy.", { color: 'yellow', verbose: true });
return Promise.resolve(filePaths);
});
} else {
Expand Down Expand Up @@ -107,7 +107,7 @@ module.exports = CoreObject.extend({
if (error) {
reject(error);
} else {
plugin.log('✔ ' + key);
plugin.log('✔ ' + key, { verbose: true });
resolve(filePath);
}
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"aws-sdk": "^2.1.25",
"chalk": "^1.0.0",
"core-object": "^1.1.0",
"ember-cli-deploy-plugin": "0.1.3",
"ember-cli-deploy-plugin": "0.2.0",
"ember-cli-babel": "^5.0.0",
"lodash": "^3.9.3",
"mime": "^1.3.4",
Expand Down
1 change: 1 addition & 0 deletions tests/unit/index-nodetest.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ describe('s3 plugin', function() {

beforeEach(function() {
mockUi = {
verbose: true,
messages: [],
write: function() {},
writeLine: function(message) {
Expand Down