Sha256: 0f9f81dfd5ccc747fba3f5e0298436194f82a92d05c0487d5358fcab0de654ce
Contents?: true
Size: 1.44 KB
Versions: 18
Compression:
Stored size: 1.44 KB
Contents
I"·(function() { var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; this.Notifications = (function() { var IMAGES; IMAGES = { success: '/assets/deploy_success.jpg', failed: '/assets/deploy_failed.jpg', error: '/assets/deploy_error.jpg' }; Notifications.init = function(outputStream, task) { return outputStream.addEventListener('status', new this(task).statusUpdated); }; function Notifications(arg) { this.repo = arg.repo, this.description = arg.description; this.statusUpdated = bind(this.statusUpdated, this); } Notifications.prototype.statusUpdated = function(status) { if (!(status in IMAGES)) { return; } if ($.notifyCheck() !== $.NOTIFY_ALLOWED) { return; } return $.notify(IMAGES[status], this.repo, this.message(status)); }; Notifications.prototype.message = function(status) { var deployShortSha; deployShortSha = $('.short-sha').text(); switch (status) { case 'success': return "Your " + this.description + " was successful!"; case 'failed': return "Your " + this.description + " failed."; case 'error': return "Error during " + this.description + "."; default: return "Your " + this.description + " ended with status: " + status; } }; return Notifications; })(); }).call(this); :ET
Version data entries
18 entries across 15 versions & 1 rubygems