Sha256: c2f030a6049fb1a1914446be7fa0fec8ef2f2b10e76e1c5b0f61ea0d5847a750

Contents?: true

Size: 1.69 KB

Versions: 9

Compression:

Stored size: 1.69 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-19f63d22baa4a300da9071a402258f43428b0288473a3bd6dafd53efd9364d16.jpg',
      failed: '/assets/deploy_failed-92ee5c67662302a4da02c8dbf8f35a65155381d1c8478488f766671c8595fdf3.jpg',
      error: '/assets/deploy_error-94d2bfb17d0fe63fa9db98e34a302cfe4111428c118db5a0fcf019a17bfaa925.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);
      console.log(this);
    }

    Notifications.prototype.statusUpdated = function(status) {
      if (!(status in IMAGES)) {
        return;
      }
      if ($.notifyCheck() !== $.NOTIFY_ALLOWED) {
        return;
      }
      return $.notify(IMAGES[status], this.repoName, this.message(status));
    };

    Notifications.prototype.message = function(status) {
      var deployShortSha;
      deployShortSha = $('.short-sha').text();
      switch (status) {
        case 'success':
          return "Your deploy of " + deployShortSha + " was successful!";
        case 'failed':
          return "Your deploy of " + deployShortSha + " failed.";
        case 'error':
          return "Error while deploying " + deployShortSha + ".";
        default:
          return "Your deploy of " + deployShortSha + " ended with status: " + status;
      }
    };

    return Notifications;

  })();

}).call(this);
:ET

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
shipit-engine-0.4.2 test/dummy/tmp/cache/assets/development/sprockets/v3.0/7xG3X-ccMw__plfWTqudqMX9OLUoCDjokMtLYjEuOOM.cache
shipit-engine-0.4.1 test/dummy/tmp/cache/assets/development/sprockets/v3.0/7xG3X-ccMw__plfWTqudqMX9OLUoCDjokMtLYjEuOOM.cache
shipit-engine-0.4.0 test/dummy/tmp/cache/assets/development/sprockets/v3.0/7xG3X-ccMw__plfWTqudqMX9OLUoCDjokMtLYjEuOOM.cache
shipit-engine-0.3.1 test/dummy/tmp/cache/assets/development/sprockets/v3.0/7xG3X-ccMw__plfWTqudqMX9OLUoCDjokMtLYjEuOOM.cache
shipit-engine-0.3.0 test/dummy/tmp/cache/assets/development/sprockets/v3.0/7xG3X-ccMw__plfWTqudqMX9OLUoCDjokMtLYjEuOOM.cache
shipit-engine-0.2.3 test/dummy/tmp/cache/assets/development/sprockets/v3.0/7xG3X-ccMw__plfWTqudqMX9OLUoCDjokMtLYjEuOOM.cache
shipit-engine-0.2.2 test/dummy/tmp/cache/assets/development/sprockets/v3.0/7xG3X-ccMw__plfWTqudqMX9OLUoCDjokMtLYjEuOOM.cache
shipit-engine-0.2.1 test/dummy/tmp/cache/assets/development/sprockets/v3.0/7xG3X-ccMw__plfWTqudqMX9OLUoCDjokMtLYjEuOOM.cache
shipit-engine-0.2.0 test/dummy/tmp/cache/assets/development/sprockets/v3.0/7xG3X-ccMw__plfWTqudqMX9OLUoCDjokMtLYjEuOOM.cache