<commit_before>SC.RecordArray.prototype.whenReady = function(callback) {
  if(!callback) {
    return this;
  } else if(this.get('status') & SC.Record.READY) {
    callback(this);
  } else {
    // this.addObserver('status', function() {
    //   if(this.get('status') & SC.Record.READY) { callback(this); }
    // })
  }
  return this;
};

Travis.Record = SC.Record.extend({
  childRecordNamespace: Travis,
  primaryKey: 'id',
  id: SC.Record.attr(Number),

  isReady: function() {
    return this.get('status') & SC.Record.READY != 0;
  }, //.property(),

  update: function(attrs) {
    this.whenReady(function(record) {
      // TODO should not need to camelize here, should we? otherwise bindings seem to get stuck.
      $.each(attrs, function(key, value) {
        if(key != 'id') record.set($.camelize(key, false), value);<commit_msg>do not camelize on update<commit_after>SC.RecordArray.prototype.whenReady = function(callback) {
  if(!callback) {
    return this;
  } else if(this.get('status') & SC.Record.READY) {
    callback(this);
  } else {
    // this.addObserver('status', function() {
    //   if(this.get('status') & SC.Record.READY) { callback(this); }
    // })
  }
  return this;
};

Travis.Record = SC.Record.extend({
  childRecordNamespace: Travis,
  primaryKey: 'id',
  id: SC.Record.attr(Number),

  isReady: function() {
    return this.get('status') & SC.Record.READY != 0;
  }, //.property(),

  update: function(attrs) {
    this.whenReady(function(record) {
      $.each(attrs, function(key, value) {
        if(key != 'id') record.set(key, value);
{'fraction_non_alphanumeric': 0.17848101265822786, 'fraction_numerical': 0.0012658227848101266, 'mean_word_length': 3.319672131147541, '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': '241612', 'n_tokens_mistral': 540, 'n_tokens_neox': 530, 'n_words': 103}