ember-auth-module-ember_model-source 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/dist/ember-auth-module-ember-model.js +46 -0
- data/lib/ember/auth/module/ember_model/source.rb +15 -0
- metadata +75 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: e794b1b7a6f934fe9976e5d59c0c126e2b1842c2
|
4
|
+
data.tar.gz: 9ea8b560713a5f21da7fdcae4270d8d48c927371
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 24d08df9fd33ff171900267a48d2edcf6124850db86071a1e04fca3199006d546474178d29b1da1d397b49bd8c459b03f7e0f418ea37acbee34206912cff71ac
|
7
|
+
data.tar.gz: aadf5244b3f553132f5a4df6cb3cc7dc0f0f6facf98866ac7852c2d25ff1c1291bb718445f7158fb0456e73c22d86c5e7f1230fa22ab6d380d86ca7fdb1ac285
|
@@ -0,0 +1,46 @@
|
|
1
|
+
// Generated by EmberScript 0.0.7
|
2
|
+
var get$ = Ember.get;
|
3
|
+
Em.onLoad('Ember.Application', function (application) {
|
4
|
+
return application.initializer({
|
5
|
+
name: 'ember-auth.module.ember-model',
|
6
|
+
before: 'ember-auth-load',
|
7
|
+
initialize: function (container, app) {
|
8
|
+
return app.register('authModule:emberModel', get$(get$(Em, 'Auth'), 'EmberModelAuthModule'));
|
9
|
+
}
|
10
|
+
});
|
11
|
+
});// Generated by EmberScript 0.0.7
|
12
|
+
var get$ = Ember.get;
|
13
|
+
var set$ = Ember.set;
|
14
|
+
set$(get$(Em, 'Auth'), 'EmberModelAuthModule', Ember.Object.extend({
|
15
|
+
init: function () {
|
16
|
+
null != get$(this, 'config') || set$(this, 'config', get$(get$(this, 'auth'), 'emberModel'));
|
17
|
+
this.patch();
|
18
|
+
get$(this, 'auth').reopen({ user: get$(Em, 'computed').alias('module.emberModel.user') });
|
19
|
+
get$(this, 'auth').addHandler('signInSuccess', get$(this, 'findUser'));
|
20
|
+
get$(this, 'auth').addHandler('signInError', get$(this, 'clearUser'));
|
21
|
+
return get$(this, 'auth').addHandler('signOutSuccess', get$(this, 'clearUser'));
|
22
|
+
},
|
23
|
+
user: null,
|
24
|
+
findUser: function () {
|
25
|
+
var model, this$;
|
26
|
+
if (!(null != get$(get$(this, 'auth'), 'userId') && (model = Em.get(get$(get$(this, 'config'), 'userModel')))))
|
27
|
+
return;
|
28
|
+
return model.fetch(get$(get$(this, 'auth'), 'userId')).then((this$ = this, function (user) {
|
29
|
+
return set$(this$, 'user', user);
|
30
|
+
}));
|
31
|
+
},
|
32
|
+
clearUser: function () {
|
33
|
+
return set$(this, 'user', null);
|
34
|
+
},
|
35
|
+
patch: function () {
|
36
|
+
var self;
|
37
|
+
self = this;
|
38
|
+
return Ember.RESTAdapter.reopen({
|
39
|
+
_ajax: function (url, params, method, settings) {
|
40
|
+
return this._super(url, params, method, get$(get$(self, 'auth'), '_strategy').serialize(settings || {}));
|
41
|
+
}
|
42
|
+
});
|
43
|
+
}
|
44
|
+
}));// Generated by EmberScript 0.0.7
|
45
|
+
var get$ = Ember.get;
|
46
|
+
get$(Em, 'Auth').reopen({ emberModel: { userModel: false } });
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Ember
|
2
|
+
module Auth
|
3
|
+
module Module
|
4
|
+
module EmberModel
|
5
|
+
module Source
|
6
|
+
def self.bundled_path
|
7
|
+
path = File.join '..', '..', '..', '..', '..', '..', \
|
8
|
+
'dist', 'ember-auth-module-ember-model.js'
|
9
|
+
File.expand_path path, __FILE__
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
metadata
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ember-auth-module-ember_model-source
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- heartsentwined
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-10-10 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: ember-source
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: ember-auth-source
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '9.0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '9.0'
|
41
|
+
description: Ember-auth ember model integration module source code wrapper for ruby
|
42
|
+
libs.
|
43
|
+
email:
|
44
|
+
- heartsentwined.me@gmail.com
|
45
|
+
executables: []
|
46
|
+
extensions: []
|
47
|
+
extra_rdoc_files: []
|
48
|
+
files:
|
49
|
+
- dist/ember-auth-module-ember-model.js
|
50
|
+
- lib/ember/auth/module/ember_model/source.rb
|
51
|
+
homepage: https://github.com/heartsentwined/ember-auth-module-ember-model
|
52
|
+
licenses:
|
53
|
+
- MIT
|
54
|
+
metadata: {}
|
55
|
+
post_install_message:
|
56
|
+
rdoc_options: []
|
57
|
+
require_paths:
|
58
|
+
- lib
|
59
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - '>='
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '0'
|
64
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
requirements: []
|
70
|
+
rubyforge_project:
|
71
|
+
rubygems_version: 2.0.3
|
72
|
+
signing_key:
|
73
|
+
specification_version: 4
|
74
|
+
summary: Ember-auth ember model integration module source code wrapper
|
75
|
+
test_files: []
|