<commit_before>define(["config",
        "app/app",
        "socket.io"], function(config, App, io) {
  "use strict";

  Ember.Application.initializer({
    name: 'pubsub',
    after: "store",

    initialize: function(container, application) {
      App.PubSubController = Ember.Object.extend({
        subscribedTo: {},

        disconnect: function(data) {
          this.reconnect()
        },

        init: function() {
          this._super()

          this.set('socket', io.connect(config.host + '/'))

          this.get('socket').on('newPost', this.newPost.bind(this))
          this.get('socket').on('updatePost', this.updatePost.bind(this))
          this.get('socket').on('destroyPost', this.destroyPost.bind(this))
          this.get('socket').on('hidePost', this.hidePost.bind(this))
          this.get('socket').on('unhidePost', this.unhidePost.bind(this))

          this.get('socket').on('newComment', this.newComment.bind(this))
          this.get('socket').on('updateComment', this.updateComment.bind(this))
          this.get('socket').on('destroyComment', this.destroyComment.bind(this))

          this.get('socket').on('newLike', this.newLike.bind(this))
          this.get('socket').on('removeLike', this.removeLike.bind(this))

          this.get('socket').on('disconnect', this.disconnect.bind(this))
        },<commit_msg>Changes pubsub events to namespaces.<commit_after>define(["config",
        "app/app",
        "socket.io"], function(config, App, io) {
  "use strict";

  Ember.Application.initializer({
    name: 'pubsub',
    after: "store",

    initialize: function(container, application) {
      App.PubSubController = Ember.Object.extend({
        subscribedTo: {},

        disconnect: function(data) {
          this.reconnect()
        },

        init: function() {
          this._super()

          this.set('socket', io.connect(config.host + '/'))

          this.get('socket').on('post:new', this.newPost.bind(this))
          this.get('socket').on('post:update', this.updatePost.bind(this))
          this.get('socket').on('post:destroy', this.destroyPost.bind(this))
          this.get('socket').on('post:hide', this.hidePost.bind(this))
          this.get('socket').on('post:unhide', this.unhidePost.bind(this))

          this.get('socket').on('comment:new', this.newComment.bind(this))
          this.get('socket').on('comment:update', this.updateComment.bind(this))
          this.get('socket').on('comment:destroy', this.destroyComment.bind(this))

          this.get('socket').on('like:new', this.newLike.bind(this))
          this.get('socket').on('like:remove', this.removeLike.bind(this))

          this.get('socket').on('disconnect', this.disconnect.bind(this))
        },
{'fraction_non_alphanumeric': 0.18610603290676417, 'fraction_numerical': 0.0, 'mean_word_length': 2.965217391304348, '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': '3814561', 'n_tokens_mistral': 831, 'n_tokens_neox': 812, 'n_words': 102}