<commit_before>Wheel.Class.Singleton.subclass('Wheel.App', {
  initialize: function(opts) {
    if (!this._class.singleton) {
      this._class.singleton = this;
      this.initApp();
      this.init(opts);
      this.listen();
    }
  },

  initApp: function() {
    window.app = this;

    this.connectionChecker = Wheel.Utils.ConnectionChecker.build();
    this.requestQueue = Wheel.Utils.RequestQueue.build({app: this});
    this.eventManager = Modernizr.touch ? Wheel.TouchManager.build() : Wheel.MouseManager.build();
    this.templates = Wheel.Templates.build();
  },

  listen: function() {
    var self = this;
    this.connectionChecker.on('offline', function() {
      self.connected(false);
    });
    this.connectionChecker.on('online', function() {
      self.connected(true);
    });
  },

  checkConnection: function() {
    if ( ('onLine' in navigator) && (navigator.onLine == false)) {
      this.connected(false);
    } else {
      this.connectionChecker.test();
    }
  },

  connected: function(value) {<commit_msg>app auto gathers templates from the dom<commit_after>Wheel.Class.Singleton.subclass('Wheel.App', {
  initialize: function(opts) {
    if (!this._class.singleton) {
      this._class.singleton = this;
      this.initApp();
      this.init(opts);
      this.listen();
    }
  },

  initApp: function() {
    window.app = this;

    this.connectionChecker = Wheel.Utils.ConnectionChecker.build();
    this.requestQueue = Wheel.Utils.RequestQueue.build({app: this});
    this.eventManager = Modernizr.touch ? Wheel.TouchManager.build() : Wheel.MouseManager.build();
    this.templates = Wheel.Templates.build();
    this.templates.gather(); // no harm, no foul
  },

  listen: function() {
    var self = this;
    this.connectionChecker.on('offline', function() {
      self.connected(false);
    });
    this.connectionChecker.on('online', function() {
      self.connected(true);
    });
  },

  checkConnection: function() {
    if ( ('onLine' in navigator) && (navigator.onLine == false)) {
      this.connected(false);
    } else {
      this.connectionChecker.test();
    }
  },

  connected: function(value) {
{'fraction_non_alphanumeric': 0.15806601580660157, 'fraction_numerical': 0.0, 'mean_word_length': 3.1305182341650672, 'pattern_counts': {'":': 0, '<': 3, '<?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': '3344233', 'n_tokens_mistral': 674, 'n_tokens_neox': 664, 'n_words': 109}