<commit_before>var async = require('async');
var _ = require('lodash');

module.exports = function (cb) {

	async.auto({

		models: function (cb) {
			sails.log.verbose('Loading app models...');

			// Load app's model definitions
			// Case-insensitive, using filename to determine identity
			sails.models = sails.modules.optional({
				dirname		: sails.config.paths.models,
				filter		: /(.+)\.(js|coffee)$/
			});
			cb();
		},

		pubsub: ['models', function (cb) {
			sails.log.verbose('Building pub/sub logic...');

			// Augment models with room/socket logic (& bind context)
			for (var identity in sails.models) {
				sails.models[identity] = _.defaults(sails.models[identity],pubsub);
				_.bindAll(sails.models[identity], 'subscribe', 'introduce', 'unsubscribe', 'publish', 'room', 'publishCreate', 'publishUpdate', 'publishDestroy');
			}
			cb();
		}]<commit_msg>fixed bug due to refactoring<commit_after>var async = require('async');
var _ = require('lodash');

module.exports = function (cb) {

	async.auto({

		models: function (cb) {
			sails.log.verbose('Loading app models...');

			// Load app's model definitions
			// Case-insensitive, using filename to determine identity
			sails.models = sails.modules.optional({
				dirname		: sails.config.paths.models,
				filter		: /(.+)\.(js|coffee)$/
			});
			cb();
		},

		pubsub: ['models', function (cb) {
			sails.log.verbose('Building pub/sub logic...');

			// Augment models with room/socket logic (& bind context)
			for (var identity in sails.models) {
				sails.models[identity] = _.defaults(sails.models[identity], require('../pubsub'));
				_.bindAll(sails.models[identity], 'subscribe', 'introduce', 'unsubscribe', 'publish', 'room', 'publishCreate', 'publishUpdate', 'publishDestroy');
			}
			cb();
		}]
{'fraction_non_alphanumeric': 0.1765695067264574, 'fraction_numerical': 0.0, 'mean_word_length': 3.6850393700787403, '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': '7282845', 'n_tokens_mistral': 654, 'n_tokens_neox': 549, 'n_words': 131}