ember-auth-source 9.0.0 → 9.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/dist/ember-auth.js +22 -8
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aa0d657b897d07a3245272b51b92dd9fe539fa33
4
- data.tar.gz: 329b95d52e39770cd88213795864539492e120b7
3
+ metadata.gz: 7d980153ce56602acbad28412f3e01b7f6bf9df1
4
+ data.tar.gz: 4fe74eaf92e19af44923398b5b4403df4e16df15
5
5
  SHA512:
6
- metadata.gz: f6adaf7861efc0b894f7b6ed98e5f29bfdba669d4b2dea3c911a4390421a2d7003b079b5f5da2e6836431810c7e2a2a54ba277ffa3959bfd5b204e0f532ca66a
7
- data.tar.gz: d6175f28f0cad7e44087018fd031861352127ff8029cc5c70ccfa79e1ef29df6c516332994c91dd81a4dd30f2be85ba07fa3ffa3efa41492ee1c80013b0dab3b
6
+ metadata.gz: 3be4e8883163fd539c3d2a5c8af225e2c2dfea94dcb2fed78e6ff0e56c81f66d05d7ea47aeee85d8677b7609dd6bc8430a717f71858b8a267d3502b3ffd53d71
7
+ data.tar.gz: 7b1511a0a736522a979372dbd1ef2bcf8267330006826bf6f326b8bc572395512b3ee40cdcbc4bab4488a2baa57249658fbfee4693438c9a474c1052df2475d6
data/dist/ember-auth.js CHANGED
@@ -4,7 +4,7 @@ Em.onLoad('Ember.Application', function (application) {
4
4
  application.initializer({
5
5
  name: 'ember-auth',
6
6
  initialize: function (container, app) {
7
- app.register('auth:main', get$(app, 'Auth') || get$(Em, 'Auth'));
7
+ app.register('auth:main', get$(app, 'Auth') || get$(Em, 'Auth'), { singleton: true });
8
8
  app.inject('route', 'auth', 'auth:main');
9
9
  app.inject('controller', 'auth', 'auth:main');
10
10
  return app.inject('view', 'auth', 'auth:main');
@@ -21,10 +21,6 @@ Em.onLoad('Ember.Application', function (application) {
21
21
  var get$ = Ember.get;
22
22
  var set$ = Ember.set;
23
23
  set$(Em, 'Auth', Ember.Object.extend({
24
- init: function () {
25
- this._initializeAdapters();
26
- return this._initializeModules();
27
- },
28
24
  _handlers: {
29
25
  signInSuccess: [],
30
26
  signInError: [],
@@ -33,7 +29,27 @@ set$(Em, 'Auth', Ember.Object.extend({
33
29
  sendSuccess: [],
34
30
  sendError: []
35
31
  },
36
- module: {},
32
+ module: Ember.computed(function () {
33
+ var moduleName, modules;
34
+ modules = {};
35
+ for (var i$ = 0, length$ = get$(this, 'modules').length; i$ < length$; ++i$) {
36
+ moduleName = get$(this, 'modules')[i$];
37
+ modules[moduleName] = get$(this, 'container').lookup('authModule:' + moduleName);
38
+ }
39
+ return modules;
40
+ }).property('modules.@each'),
41
+ _request: Ember.computed(function () {
42
+ return get$(this, 'container').lookup('authRequest:' + get$(this, 'request'));
43
+ }).property('request'),
44
+ _response: Ember.computed(function () {
45
+ return get$(this, 'container').lookup('authResponse:' + get$(this, 'response'));
46
+ }).property('response'),
47
+ _strategy: Ember.computed(function () {
48
+ return get$(this, 'container').lookup('authStrategy:' + get$(this, 'strategy'));
49
+ }).property('strategy'),
50
+ _session: Ember.computed(function () {
51
+ return get$(this, 'container').lookup('authSession:' + get$(this, 'session'));
52
+ }).property('session'),
37
53
  _initializeAdapters: function () {
38
54
  var adapter, baseKlass, config, containerKey, containerType, klass, msg, type;
39
55
  for (var cache$ = [
@@ -55,7 +71,6 @@ set$(Em, 'Auth', Ember.Object.extend({
55
71
  Em.assert(msg, adapter);
56
72
  msg = 'The requested `' + config + '` ' + type + 'Adapter must extend from Ember.Auth.' + baseKlass;
57
73
  Em.assert(msg, get$(Em, 'Auth')[baseKlass].detect(adapter));
58
- this.set('_' + type, adapter.create({ auth: this }));
59
74
  }
60
75
  return null;
61
76
  },
@@ -68,7 +83,6 @@ set$(Em, 'Auth', Ember.Object.extend({
68
83
  module = get$(this, 'container').lookupFactory(containerKey);
69
84
  msg = 'The requested `' + moduleName + '` module cannot be found. Either name it (YourApp).' + klass + ', or register it in the container under `' + containerKey + '`.';
70
85
  Em.assert(msg, module);
71
- this.set('module.' + moduleName, module.create({ auth: this }));
72
86
  }
73
87
  return null;
74
88
  },
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ember-auth-source
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.0.0
4
+ version: 9.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - heartsentwined