<commit_before>var path = require('path');
var calypso = require('calypso');
var LevelDriver = require('calypso-level');
var levelup = require('levelup');
var medeadown = require('medeadown');
var Query = calypso.Query;
var medea = require('medea');
var async = require('async');

var Registry = module.exports = function(opts){
  opts = opts || {};
  var self = this;
  this.collection = opts.collection;
  if (opts.db) {
    this.db = opts.db;
  } else {
    this.location = path.join(process.cwd(), opts.path);
    this.compactor = medea();
  }

  this.session = null;
};

Registry.prototype._init = function(cb) {
  var self = this;

  function buildCalypsoEngine(cb) {
    var map = {};
    map[self.collection] = self.db;
    var driver = LevelDriver.create({
      collectionMap: map
    });
<commit_msg>Fixed issue where registry paths were always relative<commit_after>var path = require('path');
var calypso = require('calypso');
var LevelDriver = require('calypso-level');
var levelup = require('levelup');
var medeadown = require('medeadown');
var Query = calypso.Query;
var medea = require('medea');
var async = require('async');

var Registry = module.exports = function(opts){
  opts = opts || {};
  var self = this;
  this.collection = opts.collection;
  if (opts.db) {
    this.db = opts.db;
  } else {
   if(path.isAbsolute(opts.path)) {
      this.location = opts.path;
    } else {
      this.location = path.join(process.cwd(), opts.path);
    }
    this.compactor = medea();
  }

  this.session = null;
};

Registry.prototype._init = function(cb) {
  var self = this;

  function buildCalypsoEngine(cb) {
    var map = {};
    map[self.collection] = self.db;
    var driver = LevelDriver.create({
      collectionMap: map
    });

{'fraction_non_alphanumeric': 0.1541095890410959, 'fraction_numerical': 0.0, 'mean_word_length': 3.589005235602094, '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': '3167122', 'n_tokens_mistral': 574, 'n_tokens_neox': 567, 'n_words': 137}