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

Version Path
shipit-engine-0.5.0 test/dummy/tmp/cache/assets/test/sprockets/v3.0/9Qz2pIp-mxjL8bu_dTMa8KVHuy8Fm55SOWS9d4jlrxQ.cache
shipit-engine-0.5.0 test/dummy/tmp/cache/assets/test/sprockets/v3.0/vanSB7IlSMLrzNx81F_9_gZ5uOBq1Udm8ZSA3j10dRU.cache
shipit-engine-0.4.10 test/dummy/tmp/cache/assets/test/sprockets/v3.0/vanSB7IlSMLrzNx81F_9_gZ5uOBq1Udm8ZSA3j10dRU.cache
shipit-engine-0.4.10 test/dummy/tmp/cache/assets/test/sprockets/v3.0/9Qz2pIp-mxjL8bu_dTMa8KVHuy8Fm55SOWS9d4jlrxQ.cache
shipit-engine-0.4.9 test/dummy/tmp/cache/assets/test/sprockets/v3.0/9Qz2pIp-mxjL8bu_dTMa8KVHuy8Fm55SOWS9d4jlrxQ.cache
shipit-engine-0.4.9 test/dummy/tmp/cache/assets/test/sprockets/v3.0/vanSB7IlSMLrzNx81F_9_gZ5uOBq1Udm8ZSA3j10dRU.cache
shipit-engine-0.4.8 test/dummy/tmp/cache/assets/test/sprockets/v3.0/vanSB7IlSMLrzNx81F_9_gZ5uOBq1Udm8ZSA3j10dRU.cache
shipit-engine-0.4.7 test/dummy/tmp/cache/assets/test/sprockets/v3.0/vanSB7IlSMLrzNx81F_9_gZ5uOBq1Udm8ZSA3j10dRU.cache
shipit-engine-0.4.6 test/dummy/tmp/cache/assets/test/sprockets/v3.0/vanSB7IlSMLrzNx81F_9_gZ5uOBq1Udm8ZSA3j10dRU.cache
shipit-engine-0.4.5 test/dummy/tmp/cache/assets/test/sprockets/v3.0/vanSB7IlSMLrzNx81F_9_gZ5uOBq1Udm8ZSA3j10dRU.cache
shipit-engine-0.4.4 test/dummy/tmp/cache/assets/test/sprockets/v3.0/vanSB7IlSMLrzNx81F_9_gZ5uOBq1Udm8ZSA3j10dRU.cache
shipit-engine-0.4.2 test/dummy/tmp/cache/assets/test/sprockets/v3.0/vanSB7IlSMLrzNx81F_9_gZ5uOBq1Udm8ZSA3j10dRU.cache
shipit-engine-0.4.1 test/dummy/tmp/cache/assets/test/sprockets/v3.0/vanSB7IlSMLrzNx81F_9_gZ5uOBq1Udm8ZSA3j10dRU.cache
shipit-engine-0.4.0 test/dummy/tmp/cache/assets/test/sprockets/v3.0/vanSB7IlSMLrzNx81F_9_gZ5uOBq1Udm8ZSA3j10dRU.cache
shipit-engine-0.3.1 test/dummy/tmp/cache/assets/test/sprockets/v3.0/vanSB7IlSMLrzNx81F_9_gZ5uOBq1Udm8ZSA3j10dRU.cache
shipit-engine-0.3.0 test/dummy/tmp/cache/assets/test/sprockets/v3.0/vanSB7IlSMLrzNx81F_9_gZ5uOBq1Udm8ZSA3j10dRU.cache
shipit-engine-0.2.3 test/dummy/tmp/cache/assets/test/sprockets/v3.0/vanSB7IlSMLrzNx81F_9_gZ5uOBq1Udm8ZSA3j10dRU.cache
shipit-engine-0.2.2 test/dummy/tmp/cache/assets/test/sprockets/v3.0/vanSB7IlSMLrzNx81F_9_gZ5uOBq1Udm8ZSA3j10dRU.cache