<commit_before>#= require app

App.Router = Ember.Router.extend
  location: 'history'

  root: Ember.Route.extend
    index: Ember.Route.extend
      route: '/'
      connectOutlets: (router, context) ->
        router.get('applicationController').connectOutlet('home')

    userProfile: Ember.Route.extend
      route: '/:user'

      serialize: (router, context) ->
        return user: context.get('screenName')

      deserialize: (router, context) ->
        return App.User.find(screenName: context.user)

      connectOutlets: (router, context) ->
        router.get('applicationController').connectOutlet('userProfile', context)

    doLookUp: (router, e) ->
      if screenName = $('.js-user-search-input').val().replace(/^@/, '')
        Ember.run =>
          router.transitionTo('root.userProfile', App.User.find(screenName: screenName))
      $('.js-user-search-input').val('').blur()

    goToUserProfile: Ember.Route.transitionTo('root.userProfile')
    goToRoot: Ember.Route.transitionTo('root.index')<commit_msg>Add comment<commit_after>#= require app

App.Router = Ember.Router.extend
  location: 'history'

  root: Ember.Route.extend
    index: Ember.Route.extend
      route: '/'
      connectOutlets: (router, context) ->
        router.get('applicationController').connectOutlet('home')

    userProfile: Ember.Route.extend
      route: '/:user'

      serialize: (router, context) ->
        return user: context.get('screenName')

      deserialize: (router, context) ->
        return App.User.find(screenName: context.user)

      connectOutlets: (router, context) ->
        router.get('applicationController').connectOutlet('userProfile', context)

    goToUserProfile: Ember.Route.transitionTo('root.userProfile')
    goToRoot: Ember.Route.transitionTo('root.index')

    # Called as action on the navigation bar. This should live someplace else.
    doLookUp: (router, e) ->
      if screenName = $('.js-user-search-input').val().replace(/^@/, '')
        Ember.run =>
          router.transitionTo('root.userProfile', App.User.find(screenName: screenName))
      $('.js-user-search-input').val('').blur()
{'fraction_non_alphanumeric': 0.15503512880562062, 'fraction_numerical': 0.0, 'mean_word_length': 3.2634730538922154, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '3939084', 'n_tokens_mistral': 647, 'n_tokens_neox': 625, 'n_words': 116}