<commit_before>//= require app/controllers/tabs.js

Travis.Controllers.Repositories = SC.Object.extend({
  tabs: Travis.Controllers.Tabs.create({
    selector: '#left',
    tabs: {
      'recent': { templateName: 'app/templates/repositories/list', contentBinding: 'controller.recent' },
      'yours':  { templateName: 'app/templates/repositories/list', contentBinding: 'controller.yours'  },
      'search': { templateName: 'app/templates/repositories/list', contentBinding: 'controller.search' },
    }
  }),

  searchBox: SC.TextField.create({
  }),

  init: function() {
    this.searchBox.appendTo('#search_box');
    this.tabs.controller = this;
    this.tabs.activate('recent');
  },

  recent: function() {
    return Travis.Repository.recent();
  }.property(),

  search: function() {
    // return Travis.Repository.search(this.searchBox.value);
  }.property(),

  searchObserver: function() {
    this.tabs.activate(this.searchBox.value ? 'search' : 'recent')
  }.observes('searchBox.value')
});<commit_msg>using an ArrayController here doesn't run into an endless loop<commit_after>//= require app/controllers/tabs.js

Travis.Controllers.Repositories = SC.ArrayController.extend({
  tabs: Travis.Controllers.Tabs.create({
    selector: '#left',
    tabs: {
      'recent': { templateName: 'app/templates/repositories/list', contentBinding: 'controller' },
      'yours':  { templateName: 'app/templates/repositories/list', contentBinding: 'controller' },
      'search': { templateName: 'app/templates/repositories/list', contentBinding: 'controller' },
    }
  }),

  searchBox: SC.TextField.create({
  }),

  init: function() {
    this.searchBox.appendTo('#search_box');
    this.tabs.set('controller', this);
  },

  recent: function() {
    this.tabs.activate('recent');
    this.set('content', Travis.Repository.recent())
  },

  search: function() {
    this.tabs.activate('search');
    this.set('content', Travis.Repository.search(this.searchBox.value));
  },

  searchObserver: function() {
    this[this.searchBox.value ? 'search' : 'recent']();
  }.observes('searchBox.value')
});
{'fraction_non_alphanumeric': 0.17252851711026615, 'fraction_numerical': 0.0, 'mean_word_length': 4.096852300242131, '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': '2364480', 'n_tokens_mistral': 675, 'n_tokens_neox': 641, 'n_words': 106}