<commit_before>require('simple-auth/session');
require('simple-auth/login_controller');
require('simple-auth/logout_route');

SimpleAuth = Ember.Object.extend({
  setup: function(app, options) {
    this.baseUrl = options.baseUrl || '';
    app.Router.map(function() {
      this.route('login');
      this.route('logout');
    });
    var session = SimpleAuth.Session.create();
    app.register('auth:session', session, { instantiate: false, singleton: true });
    $.each(['model', 'controller', 'view', 'route'], function(i, component) {
      app.inject(component, 'session', 'auth:session');
    });
    if (options.authenticateAjax)
      Ember.$.ajaxPrefilter(function(options, originalOptions, jqXHR) {
        if (!jqXHR.crossDomain) {
          jqXHR.setRequestHeader('X-AUTHENTICATION-TOKEN', session.get('authToken'));
        }
      });
    }
  }
});<commit_msg>namespace registered session with package name<commit_after>require('simple-auth/session');
require('simple-auth/login_controller');
require('simple-auth/logout_route');

SimpleAuth = Ember.Object.extend({
  setup: function(app, options) {
    this.baseUrl = options.baseUrl || '';
    app.Router.map(function() {
      this.route('login');
      this.route('logout');
    });
    var session = SimpleAuth.Session.create();
    app.register('simple_auth:session', session, { instantiate: false, singleton: true });
    $.each(['model', 'controller', 'view', 'route'], function(i, component) {
      app.inject(component, 'session', 'simple_auth:session');
    });
    if (options.authenticateAjax)
      Ember.$.ajaxPrefilter(function(options, originalOptions, jqXHR) {
        if (!jqXHR.crossDomain) {
          jqXHR.setRequestHeader('X-AUTHENTICATION-TOKEN', session.get('authToken'));
        }
      });
    }
  }
});
{'fraction_non_alphanumeric': 0.17565314063368537, 'fraction_numerical': 0.0, 'mean_word_length': 3.864864864864865, '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': '797227', 'n_tokens_mistral': 556, 'n_tokens_neox': 547, 'n_words': 85}