<commit_before>'use strict';

var express = require('express');
var mongoose = require('mongoose');
var PhobosRouter = require('./router');

function Phobos(options) {
  this._options = {
    port: 9292,
    appName: 'Phobos.js',
    bearerTokenSignature: null,
    dbUri: 'mongodb://localhost/phobos',
    scopeCarrier: { model: 'User', field: 'scope', availableScopes: [ '*', 'user', 'owner', 'admin' ] }
  };

  for (var p in options) {
    if (this._options.hasOwnProperty(p)) this._options[p] = options[p];
  }

  // Initialize the Express.js server
  this.server = express();
  this.expressPlugins = require('../plugins/express');

  // Initialize our database helpers
  this.databasePlugins = {};
  this._databaseInitFlag = false;
  this.database = mongoose;

  // Initialize some building blocks for the app
  this.DS;
  this.controllers = [];
  this.scopes = {};

  this.errorHandler = require('../responders/error');

  return this;
};
<commit_msg>instantiating the bearer token lib to make it available to the new Phobos() object<commit_after>'use strict';

var express = require('express');
var mongoose = require('mongoose');
var PhobosRouter = require('./router');
var TokenLib = require('./bearer');

function Phobos(options) {
  this._options = {
    port: 9292,
    appName: 'Phobos.js',
    bearerTokenSignature: null,
    dbUri: 'mongodb://localhost/phobos',
    scopeCarrier: { model: 'User', field: 'scope', availableScopes: [ '*', 'user', 'owner', 'admin' ] }
  };

  for (var p in options) {
    if (this._options.hasOwnProperty(p)) this._options[p] = options[p];
  }

  // Initialize the Express.js server
  this.server = express();
  this.expressPlugins = require('../plugins/express');

  // Initialize our database helpers
  this.databasePlugins = {};
  this._databaseInitFlag = false;
  this.database = mongoose;

  // Initialize some building blocks for the app
  this.DS;
  this.controllers = [];
  this.scopes = {};

  this.errorHandler = require('../responders/error');
  this.token = new TokenLib(this._options.bearerTokenSignature);

  return this;
};

{'fraction_non_alphanumeric': 0.1558005752636625, 'fraction_numerical': 0.003835091083413231, 'mean_word_length': 3.8422273781902554, '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': '6762194', 'n_tokens_mistral': 669, 'n_tokens_neox': 653, 'n_words': 161}