<commit_before>var get        = Ember.get,
    capitalize = Ember.String.capitalize,
    underscore = Ember.String.underscore;

FP.DebugAdapter = Ember.DataAdapter.extend({
  getFilters: function() {
    return [
      { name: 'isLive',     desc: 'Live'    },
      { name: 'isNew',      desc: 'New'     }
    ];
  },

  detect: function(klass) {
    return klass !== FP.Model && FP.Model.detect(klass);
  },

  columnsForType: function(type) {
    var columns = [{ name: 'id', desc: 'Id' }], count = 0, self = this;
    get(type, 'attributes').forEach(function(name, meta) {
        if (count++ > self.attributeLimit) { return false; }
        var desc = capitalize(underscore(name).replace('_', ' '));
        columns.push({ name: name, desc: desc });
    });
    columns.push({name: 'fbPath', desc: 'Firebase Path'});
    return columns;
  },

  getRecords: function(type) {
    return this.get('store').all(type);
  },

  getRecordColumnValues: function(record) {
    var self   = this,
        count  = 0,
        ref    = record.buildFirebaseReference(),
        root   = ref.root().toString(),
        fbPath = ref.toString().slice(root.length),
        columnValues = {
          id: get(record, 'id'),
          fbPath: fbPath
        };

    record.eachAttribute(function(key) {
      if (count++ > self.attributeLimit) {
        return false;
      }
      var value = get(record, key);
      columnValues[key] = value;
    });
    return columnValues;
  },

  getRecordKeywords: function(record) {
    var keywords = [], keys = Ember.A(['id']);
    record.eachAttribute(function(key) {
      keys.push(key);
    });
    keys.forEach(function(key) {
      keywords.push(get(record, key));
    });
    return keywords;
  },<commit_msg>tidy generating firebase path for Ember inspector & make easier to override<commit_after>var get        = Ember.get,
    capitalize = Ember.String.capitalize,
    underscore = Ember.String.underscore;

FP.DebugAdapter = Ember.DataAdapter.extend({
  getFilters: function() {
    return [
      { name: 'isLive',     desc: 'Live'    },
      { name: 'isNew',      desc: 'New'     }
    ];
  },

  detect: function(klass) {
    return klass !== FP.Model && FP.Model.detect(klass);
  },

  columnsForType: function(type) {
    var columns = [{ name: 'id', desc: 'Id' }], count = 0, self = this;
    get(type, 'attributes').forEach(function(name, meta) {
        if (count++ > self.attributeLimit) { return false; }
        var desc = capitalize(underscore(name).replace('_', ' '));
        columns.push({ name: name, desc: desc });
    });
    columns.push({name: 'fbPath', desc: 'Firebase Path'});
    return columns;
  },

  getRecords: function(type) {
    return this.get('store').all(type);
  },

  recordReferenceToString: function(record) {
    var ref  = record.buildFirebaseReference(),
        root = ref.root().toString();

    return ref.toString().slice(root.length);
  },

  getRecordColumnValues: function(record) {
    var self  = this,
        count = 0;

    var columnValues = {
      id: get(record, 'id'),
      fbPath: this.recordReferenceToString(record)
    };

    record.eachAttribute(function(key) {
      if (count++ > self.attributeLimit) {
        return false;
      }
      var value = get(record, key);
      columnValues[key] = value;
    });
    return columnValues;
  },

  getRecordKeywords: function(record) {
    var keywords = [], keys = Ember.A(['id']);
    record.eachAttribute(function(key) {
      keys.push(key);
    });
    keys.forEach(function(key) {
      keywords.push(get(record, key));
    });
    return keywords;
  },
{'fraction_non_alphanumeric': 0.15808416389811739, 'fraction_numerical': 0.0011074197120708748, 'mean_word_length': 2.668020304568528, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '1206377', 'n_tokens_mistral': 1155, 'n_tokens_neox': 1128, 'n_words': 236}