<commit_before>(function(/*! Brunch !*/) {
  'use strict';

  var globals = typeof window !== 'undefined' ? window : global;
  if (typeof globals.require === 'function') return;

  var modules = {};
  var cache = {};

  var has = function(object, name) {
    return hasOwnProperty.call(object, name);
  };

  var expand = function(root, name) {
    var results = [], parts, part;
    if (/^\.\.?(\/|$)/.test(name)) {
      parts = [root, name].join('/').split('/');
    } else {
      parts = name.split('/');
    }
    for (var i = 0, length = parts.length; i < length; i++) {
      part = parts[i];
      if (part === '..') {
        results.pop();
      } else if (part !== '.' && part !== '') {
        results.push(part);
      }
    }
    return results.join('/');
  };

  var dirname = function(path) {
    return path.split('/').slice(0, -1).join('/');
  };

  var localRequire = function(path) {
    return function(name) {
      var dir = dirname(path);
      var absolute = expand(dir, name);
      return require(absolute);
    };
  };

  var initModule = function(name, definition) {
    var module = {id: name, exports: {}};
    definition(module.exports, localRequire(name), module);
    var exports = cache[name] = module.exports;
    return exports;
  };

  var require = function(name) {
    var path = expand(name, '.');

    if (has(cache, path)) return cache[path];
    if (has(modules, path)) return initModule(path, modules[path]);

    var dirIndex = expand(path, './index');
    if (has(cache, dirIndex)) return cache[dirIndex];
    if (has(modules, dirIndex)) return initModule(dirIndex, modules[dirIndex]);

    throw new Error('Cannot find module "' + name + '"');
  };

  var define = function(bundle) {
    for (var key in bundle) {
      if (has(bundle, key)) {
        modules[key] = bundle[key];
      }
    }
  }

  globals.require = require;
  globals.require.define = define;
  globals.require.brunch = true;
})();

window.require.define({"application": function(exports, require, module) {
  (function() {
    var Application, Requests, Router, State, TasksActive, TasksScheduled,
      __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };

    Router = require('lib/router');

    State = require('models/State');

    Requests = require('collections/Requests');

    TasksActive = require('collections/TasksActive');

    TasksScheduled = require('collections/TasksScheduled');

    Application = (function() {

      function Application() {
        this.fetchResources = __bind(this.fetchResources, this);
        this.initialize = __bind(this.initialize, this);
      }

      Application.prototype.initialize = function() {
        var _this = this;
        this.views = {};
        this.collections = {};
        return this.fetchResources(function() {
          $('.page-loader.fixed').hide();
          _this.router = new Router;
          Backbone.history.start({
            pushState: false,
            root: '/singularity/'
          });
          return typeof Object.freeze === "function" ? Object.freeze(_this) : void 0;
        });
      };

      Application.prototype.fetchResources = function(success) {
        var resolve, resources,
          _this = this;
        this.resolve_countdown = 0;
        resolve = function() {
          _this.resolve_countdown -= 1;
          if (_this.resolve_countdown === 0) return success();
        };
        this.resolve_countdown += 1;
        this.state = new State;
        this.state.fetch({
          error: function() {
            return vex.dialog.alert('An error occurred while trying to load the Singularity state.');
          },
          success: function() {
            return resolve();
          }
        });
        resources = [
          {
            collection_key: 'requests',
            collection: Requests,
            error_phrase: 'requests'
          }, {
            collection_key: 'tasksActive',
            collection: TasksActive,
            error_phrase: 'active tasks'
          }, {
            collection_key: 'tasksScheduled',
            collection: TasksScheduled,
            error_phrase: 'scheduled tasks'
          }
        ];
        return _.each(resources, function(r) {
          _this.resolve_countdown += 1;
          _this.collections[r.collection_key] = new r.collection;
          return _this.collections[r.collection_key].fetch({
            error: function() {
              return vex.dialog.alert("An error occurred while trying to load Singularity " + r.error_phrase + ".");
            },
            success: function() {
              return resolve();
            }
          });
        });
      };

      return Application;

    })();

    module.exports = new Application;

  }).call(this);
  
}});

window.require.define({"collections/Requests": function(exports, require, module) {
  (function() {
    var Collection, Requests,
      __hasProp = Object.prototype.hasOwnProperty,
      __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; };

    Collection = require('./collection');

    Requests = (function(_super) {

      __extends(Requests, _super);

      function Requests() {
        Requests.__super__.constructor.apply(this, arguments);
      }

      Requests.prototype.url = "http://" + env.SINGULARITY_BASE + "/" + constants.api_base + "/requests";

      Requests.prototype.parse = function(requests) {
        var _this = this;
        _.each(requests, function(request, i) {
          request.id = request.id;
          request.deployUser = _this.parseDeployUser(request);
          request.JSONString = utils.stringJSON(request);
          request.timestampHuman = moment(request.timestamp).from();
          return requests[i] = request;
        });
        return requests;
      };

      Requests.prototype.parseDeployUser = function(request) {
        var _ref, _ref2, _ref3;
        return ((_ref = (_ref2 = request.executorData) != null ? (_ref3 = _ref2.env) != null ? _ref3.DEPLOY_USER : void 0 : void 0) != null ? _ref : '').split('@')[0];
      };

      Requests.prototype.comparator = 'name';

      return Requests;

    })(Collection);

    module.exports = Requests;

  }).call(this);
  
}});

window.require.define({"collections/Tasks": function(exports, require, module) {
  (function() {
    var Collection, Tasks,
      __hasProp = Object.prototype.hasOwnProperty,
      __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; };

    Collection = require('./collection');

    Tasks = (function(_super) {

      __extends(Tasks, _super);

      function Tasks() {
        Tasks.__super__.constructor.apply(this, arguments);
      }

      Tasks.prototype.comparator = 'name';

      return Tasks;

    })(Collection);

    module.exports = Tasks;

  }).call(this);
  
}});

window.require.define({"collections/TasksActive": function(exports, require, module) {
  (function() {
    var Collection, Tasks, TasksActive,
      __hasProp = Object.prototype.hasOwnProperty,
      __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; };

    Collection = require('./collection');

    Tasks = require('./Tasks');

    TasksActive = (function(_super) {

      __extends(TasksActive, _super);

      function TasksActive() {
        TasksActive.__super__.constructor.apply(this, arguments);
      }

      TasksActive.prototype.url = "http://" + env.SINGULARITY_BASE + "/" + constants.api_base + "/tasks/active";

      TasksActive.prototype.parse = function(tasks) {
        var _this = this;
        _.each(tasks, function(task, i) {
          var _ref;
          task.id = task.task.taskId.value;
          task.name = task.task.name;
          task.resources = task.taskRequest.request.resources;
          task.host = (_ref = task.offer.hostname) != null ? _ref.split('.')[0] : void 0;
          task.startedAt = task.taskId.startedAt;
          task.startedAtHuman = moment(task.taskId.startedAt).from();
          task.JSONString = utils.stringJSON(task);
          return tasks[i] = task;
        });
        return tasks;
      };

      TasksActive.prototype.comparator = 'name';

      return TasksActive;

    })(Tasks);

    module.exports = TasksActive;

  }).call(this);
  
}});

window.require.define({"collections/TasksScheduled": function(exports, require, module) {
  (function() {
    var Collection, Tasks, TasksScheduled,
      __hasProp = Object.prototype.hasOwnProperty,
      __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; };

    Collection = require('./collection');

    Tasks = require('./Tasks');

    TasksScheduled = (function(_super) {

      __extends(TasksScheduled, _super);

      function TasksScheduled() {
        TasksScheduled.__super__.constructor.apply(this, arguments);
      }

      TasksScheduled.prototype.url = "http://" + env.SINGULARITY_BASE + "/" + constants.api_base + "/tasks/scheduled";

      TasksScheduled.prototype.parse = function(tasks) {
        var _this = this;
        _.each(tasks, function(task, i) {
          task.id = _this.parsePendingId(task.pendingTaskId);
          task.name = task.id;
          task.nextRunAt = task.pendingTaskId.nextRunAt;
          task.nextRunAtHuman = moment(task.nextRunAt).fromNow();
          task.schedule = task.request.schedule;
          task.JSONString = utils.stringJSON(task);
          return tasks[i] = task;
        });
        return tasks;
      };

      TasksScheduled.prototype.parsePendingId = function(pendingTaskId) {
        return "" + pendingTaskId.requestId + "-" + pendingTaskId.nextRunAt + "-" + pendingTaskId.instanceNo;
      };

      TasksScheduled.prototype.comparator = 'nextRunAt';

      return TasksScheduled;

    })(Tasks);

    module.exports = TasksScheduled;

  }).call(this);
  
}});

window.require.define({"collections/collection": function(exports, require, module) {
  (function() {
    var Collection,
      __hasProp = Object.prototype.hasOwnProperty,
      __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; };

    module.exports = Collection = (function(_super) {

      __extends(Collection, _super);

      function Collection() {
        Collection.__super__.constructor.apply(this, arguments);
      }

      return Collection;

    })(Backbone.Collection);

  }).call(this);
  
}});

window.require.define({"constants": function(exports, require, module) {
  (function() {
    var constants;

    constants = {
      app_name: 'singularity',
      config_server_base: '/singularity',
      api_base: 'singularity2/v1',
      kumonga_api_base: 'kumonga/v2'
    };

    module.exports = constants;

  }).call(this);
  
}});

window.require.define({"env": function(exports, require, module) {
  (function() {
<commit_msg>Constants changes<commit_after>(function(/*! Brunch !*/) {
  'use strict';

  var globals = typeof window !== 'undefined' ? window : global;
  if (typeof globals.require === 'function') return;

  var modules = {};
  var cache = {};

  var has = function(object, name) {
    return hasOwnProperty.call(object, name);
  };

  var expand = function(root, name) {
    var results = [], parts, part;
    if (/^\.\.?(\/|$)/.test(name)) {
      parts = [root, name].join('/').split('/');
    } else {
      parts = name.split('/');
    }
    for (var i = 0, length = parts.length; i < length; i++) {
      part = parts[i];
      if (part === '..') {
        results.pop();
      } else if (part !== '.' && part !== '') {
        results.push(part);
      }
    }
    return results.join('/');
  };

  var dirname = function(path) {
    return path.split('/').slice(0, -1).join('/');
  };

  var localRequire = function(path) {
    return function(name) {
      var dir = dirname(path);
      var absolute = expand(dir, name);
      return require(absolute);
    };
  };

  var initModule = function(name, definition) {
    var module = {id: name, exports: {}};
    definition(module.exports, localRequire(name), module);
    var exports = cache[name] = module.exports;
    return exports;
  };

  var require = function(name) {
    var path = expand(name, '.');

    if (has(cache, path)) return cache[path];
    if (has(modules, path)) return initModule(path, modules[path]);

    var dirIndex = expand(path, './index');
    if (has(cache, dirIndex)) return cache[dirIndex];
    if (has(modules, dirIndex)) return initModule(dirIndex, modules[dirIndex]);

    throw new Error('Cannot find module "' + name + '"');
  };

  var define = function(bundle) {
    for (var key in bundle) {
      if (has(bundle, key)) {
        modules[key] = bundle[key];
      }
    }
  }

  globals.require = require;
  globals.require.define = define;
  globals.require.brunch = true;
})();

window.require.define({"application": function(exports, require, module) {
  (function() {
    var Application, Requests, Router, State, TasksActive, TasksScheduled,
      __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };

    Router = require('lib/router');

    State = require('models/State');

    Requests = require('collections/Requests');

    TasksActive = require('collections/TasksActive');

    TasksScheduled = require('collections/TasksScheduled');

    Application = (function() {

      function Application() {
        this.fetchResources = __bind(this.fetchResources, this);
        this.initialize = __bind(this.initialize, this);
      }

      Application.prototype.initialize = function() {
        var _this = this;
        this.views = {};
        this.collections = {};
        return this.fetchResources(function() {
          $('.page-loader.fixed').hide();
          _this.router = new Router;
          Backbone.history.start({
            pushState: false,
            root: '/singularity/'
          });
          return typeof Object.freeze === "function" ? Object.freeze(_this) : void 0;
        });
      };

      Application.prototype.fetchResources = function(success) {
        var resolve, resources,
          _this = this;
        this.resolve_countdown = 0;
        resolve = function() {
          _this.resolve_countdown -= 1;
          if (_this.resolve_countdown === 0) return success();
        };
        this.resolve_countdown += 1;
        this.state = new State;
        this.state.fetch({
          error: function() {
            return vex.dialog.alert('An error occurred while trying to load the Singularity state.');
          },
          success: function() {
            return resolve();
          }
        });
        resources = [
          {
            collection_key: 'requests',
            collection: Requests,
            error_phrase: 'requests'
          }, {
            collection_key: 'tasksActive',
            collection: TasksActive,
            error_phrase: 'active tasks'
          }, {
            collection_key: 'tasksScheduled',
            collection: TasksScheduled,
            error_phrase: 'scheduled tasks'
          }
        ];
        return _.each(resources, function(r) {
          _this.resolve_countdown += 1;
          _this.collections[r.collection_key] = new r.collection;
          return _this.collections[r.collection_key].fetch({
            error: function() {
              return vex.dialog.alert("An error occurred while trying to load Singularity " + r.error_phrase + ".");
            },
            success: function() {
              return resolve();
            }
          });
        });
      };

      return Application;

    })();

    module.exports = new Application;

  }).call(this);
  
}});

window.require.define({"collections/Requests": function(exports, require, module) {
  (function() {
    var Collection, Requests,
      __hasProp = Object.prototype.hasOwnProperty,
      __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; };

    Collection = require('./collection');

    Requests = (function(_super) {

      __extends(Requests, _super);

      function Requests() {
        Requests.__super__.constructor.apply(this, arguments);
      }

      Requests.prototype.url = "http://" + env.SINGULARITY_BASE + "/" + constants.api_base + "/requests";

      Requests.prototype.parse = function(requests) {
        var _this = this;
        _.each(requests, function(request, i) {
          request.id = request.id;
          request.deployUser = _this.parseDeployUser(request);
          request.JSONString = utils.stringJSON(request);
          request.timestampHuman = moment(request.timestamp).from();
          return requests[i] = request;
        });
        return requests;
      };

      Requests.prototype.parseDeployUser = function(request) {
        var _ref, _ref2, _ref3;
        return ((_ref = (_ref2 = request.executorData) != null ? (_ref3 = _ref2.env) != null ? _ref3.DEPLOY_USER : void 0 : void 0) != null ? _ref : '').split('@')[0];
      };

      Requests.prototype.comparator = 'name';

      return Requests;

    })(Collection);

    module.exports = Requests;

  }).call(this);
  
}});

window.require.define({"collections/Tasks": function(exports, require, module) {
  (function() {
    var Collection, Tasks,
      __hasProp = Object.prototype.hasOwnProperty,
      __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; };

    Collection = require('./collection');

    Tasks = (function(_super) {

      __extends(Tasks, _super);

      function Tasks() {
        Tasks.__super__.constructor.apply(this, arguments);
      }

      Tasks.prototype.comparator = 'name';

      return Tasks;

    })(Collection);

    module.exports = Tasks;

  }).call(this);
  
}});

window.require.define({"collections/TasksActive": function(exports, require, module) {
  (function() {
    var Collection, Tasks, TasksActive,
      __hasProp = Object.prototype.hasOwnProperty,
      __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; };

    Collection = require('./collection');

    Tasks = require('./Tasks');

    TasksActive = (function(_super) {

      __extends(TasksActive, _super);

      function TasksActive() {
        TasksActive.__super__.constructor.apply(this, arguments);
      }

      TasksActive.prototype.url = "http://" + env.SINGULARITY_BASE + "/" + constants.api_base + "/tasks/active";

      TasksActive.prototype.parse = function(tasks) {
        var _this = this;
        _.each(tasks, function(task, i) {
          var _ref;
          task.id = task.task.taskId.value;
          task.name = task.task.name;
          task.resources = task.taskRequest.request.resources;
          task.host = (_ref = task.offer.hostname) != null ? _ref.split('.')[0] : void 0;
          task.startedAt = task.taskId.startedAt;
          task.startedAtHuman = moment(task.taskId.startedAt).from();
          task.JSONString = utils.stringJSON(task);
          return tasks[i] = task;
        });
        return tasks;
      };

      TasksActive.prototype.comparator = 'name';

      return TasksActive;

    })(Tasks);

    module.exports = TasksActive;

  }).call(this);
  
}});

window.require.define({"collections/TasksScheduled": function(exports, require, module) {
  (function() {
    var Collection, Tasks, TasksScheduled,
      __hasProp = Object.prototype.hasOwnProperty,
      __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; };

    Collection = require('./collection');

    Tasks = require('./Tasks');

    TasksScheduled = (function(_super) {

      __extends(TasksScheduled, _super);

      function TasksScheduled() {
        TasksScheduled.__super__.constructor.apply(this, arguments);
      }

      TasksScheduled.prototype.url = "http://" + env.SINGULARITY_BASE + "/" + constants.api_base + "/tasks/scheduled";

      TasksScheduled.prototype.parse = function(tasks) {
        var _this = this;
        _.each(tasks, function(task, i) {
          task.id = _this.parsePendingId(task.pendingTaskId);
          task.name = task.id;
          task.nextRunAt = task.pendingTaskId.nextRunAt;
          task.nextRunAtHuman = moment(task.nextRunAt).fromNow();
          task.schedule = task.request.schedule;
          task.JSONString = utils.stringJSON(task);
          return tasks[i] = task;
        });
        return tasks;
      };

      TasksScheduled.prototype.parsePendingId = function(pendingTaskId) {
        return "" + pendingTaskId.requestId + "-" + pendingTaskId.nextRunAt + "-" + pendingTaskId.instanceNo;
      };

      TasksScheduled.prototype.comparator = 'nextRunAt';

      return TasksScheduled;

    })(Tasks);

    module.exports = TasksScheduled;

  }).call(this);
  
}});

window.require.define({"collections/collection": function(exports, require, module) {
  (function() {
    var Collection,
      __hasProp = Object.prototype.hasOwnProperty,
      __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; };

    module.exports = Collection = (function(_super) {

      __extends(Collection, _super);

      function Collection() {
        Collection.__super__.constructor.apply(this, arguments);
      }

      return Collection;

    })(Backbone.Collection);

  }).call(this);
  
}});

window.require.define({"constants": function(exports, require, module) {
  (function() {
    var constants;

    constants = {
      app_name: 'singularity',
      config_server_base: '/singularity',
      api_base: 'singularity/v1'
    };

    module.exports = constants;

  }).call(this);
  
}});

window.require.define({"env": function(exports, require, module) {
  (function() {

{'fraction_non_alphanumeric': 0.1439301236339086, 'fraction_numerical': 0.0018566184227182582, 'mean_word_length': 2.6613625830372314, 'pattern_counts': {'":': 16, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3313830', 'n_tokens_mistral': 6991, 'n_tokens_neox': 6768, 'n_words': 1469}