-
Notifications
You must be signed in to change notification settings - Fork 602
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
136 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,12 @@ | ||
import Ember from 'ember'; | ||
|
||
export default function(defaults, callback) { | ||
return function(container, config) { | ||
export default function(defaults) { | ||
return function(config) { | ||
let wrappedConfig = Ember.Object.create(config); | ||
for (let property in this) { | ||
if (this.hasOwnProperty(property) && Ember.typeOf(this[property]) !== 'function') { | ||
this[property] = wrappedConfig.getWithDefault(property, defaults[property]); | ||
} | ||
} | ||
if (callback) { | ||
callback.apply(this, [container, config]); | ||
} | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import Configuration from 'ember-simple-auth/configuration'; | ||
import getGlobalConfig from 'ember-simple-auth/utils/get-global-config'; | ||
import setup from 'ember-simple-auth/setup'; | ||
import { register } from 'ember-simple-auth/setup'; | ||
|
||
export default { | ||
name: 'simple-auth', | ||
initialize: function(container, application) { | ||
initialize: function(registry, application) { | ||
var config = getGlobalConfig('simple-auth'); | ||
Configuration.load(container, config); | ||
setup(container, application); | ||
Configuration.load(registry, config); | ||
register(application); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { inject } from 'ember-simple-auth/setup'; | ||
|
||
export default { | ||
name: 'simple-auth', | ||
initialize: function(instance) { | ||
let application = instance.container.lookup('application:main'); | ||
inject(application); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.