<commit_before>angular.module('roy.socket-signalr', []).
  provider('hubFactory', function() {
    'use strict';

    this.$get = ['$rootScope', '$timeout', function($rootScope, $timeout) {
      return function hubFactory (socket) {

        return {
          connect: function(transObj) {
            socket.connection.start(transObj);
          },
          stop: function() {
            socket.connection.stop();
          },
          on: function(eventName, callback) {
            socket.proxy.on(eventName, $timeout(function(){
              callback();
            }, 0));
          },
          invoke: function(ev, data) {
            socket.proxy.invoke.apply(socket, arguments);
          }
        };

      };
    }];
  });<commit_msg>updated src with TDD<commit_after>angular.module('roy.socket-signalr', []).
  provider('hubFactory', function() {
    'use strict';

    this.$get = ['$rootScope', '$timeout', function($rootScope, $timeout) {
      return function hubFactory (socket) {

        return {
          connect: function(transObj) {
            socket.connection.start(transObj);
          },
          disconnect: function() {
            socket.connection.stop();
          },
          on: function(eventName, callback) {
            socket.proxy.on(eventName, $timeout(function(){
              callback();
            }, 0));
          },
          invoke: function(ev, data) {
            socket.proxy.invoke.apply(socket, arguments);
          }
        };

      };
    }];
  });
{'fraction_non_alphanumeric': 0.15161502966381016, 'fraction_numerical': 0.0013183915622940012, 'mean_word_length': 1.8320895522388059, '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': '1757566', 'n_tokens_mistral': 408, 'n_tokens_neox': 399, 'n_words': 69}