ember-auth-module-timeoutable-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-timeoutable.js +57 -0
- data/lib/ember/auth/module/timeoutable/source.rb +15 -0
- metadata +74 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 8a2e70248093606e1108aa64feab02af41ee65dd
|
4
|
+
data.tar.gz: 4b4c506b3cf3a86b66340e1b144c0e0fcdeca5f0
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3a1587c9b67e818e204cce0b7b374861d11c5d40f08347dfea6554b7466def99c824e7fa0dd0188b58026be49eb56be7c89663597d8b1dd044d7e5461f148969
|
7
|
+
data.tar.gz: c861ec74437c1066d6b52395dd097769e03fd181f53a7f13cf7a29e420edfb326cd124715a26ced0b81b5f0f8d3c8ce10ee666e384a2ebe0fcc732b1a9aa6336
|
@@ -0,0 +1,57 @@
|
|
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.timeoutable',
|
6
|
+
before: 'ember-auth-load',
|
7
|
+
initialize: function (container, app) {
|
8
|
+
return app.register('authModule:timeoutable', get$(get$(Em, 'Auth'), 'TimeoutableAuthModule'));
|
9
|
+
}
|
10
|
+
});
|
11
|
+
});// Generated by EmberScript 0.0.7
|
12
|
+
var get$ = Ember.get;
|
13
|
+
var set$ = Ember.set;
|
14
|
+
set$(get$(Em, 'Auth'), 'TimeoutableAuthModule', Ember.Object.extend({
|
15
|
+
init: function () {
|
16
|
+
var this$;
|
17
|
+
null != get$(this, 'config') || set$(this, 'config', get$(get$(this, 'auth'), 'timeoutable'));
|
18
|
+
null != get$(get$(this, 'config'), 'callback') || set$(get$(this, 'config'), 'callback', (this$ = this, function () {
|
19
|
+
return get$(this$, 'auth').signOut();
|
20
|
+
}));
|
21
|
+
get$(this, 'auth').addHandler('signInSuccess', get$(this, 'register'));
|
22
|
+
get$(this, 'auth').addHandler('signInError', get$(this, 'clear'));
|
23
|
+
return get$(this, 'auth').addHandler('signOutSuccess', get$(this, 'clear'));
|
24
|
+
},
|
25
|
+
_startTime: null,
|
26
|
+
timeout: function () {
|
27
|
+
var period;
|
28
|
+
if (get$(this, '_startTime') === null)
|
29
|
+
return;
|
30
|
+
period = get$(get$(this, 'config'), 'period') * 60 * 1e3;
|
31
|
+
if (get$(this, '_startTime') - new Date < period)
|
32
|
+
return;
|
33
|
+
return get$(this, 'config').callback();
|
34
|
+
},
|
35
|
+
register: function () {
|
36
|
+
var period, this$;
|
37
|
+
set$(this, '_startTime', get$(get$(get$(this, 'auth'), '_session'), 'startTime'));
|
38
|
+
period = get$(get$(this, 'config'), 'period') * 60 * 1e3;
|
39
|
+
return setTimeout((this$ = this, function () {
|
40
|
+
return this$.timeout();
|
41
|
+
}), period);
|
42
|
+
},
|
43
|
+
reset: function () {
|
44
|
+
this.register();
|
45
|
+
return set$(this, '_startTime', new Date);
|
46
|
+
},
|
47
|
+
clear: function () {
|
48
|
+
return set$(this, '_startTime', null);
|
49
|
+
}
|
50
|
+
}));// Generated by EmberScript 0.0.7
|
51
|
+
var get$ = Ember.get;
|
52
|
+
get$(Em, 'Auth').reopen({
|
53
|
+
timeoutable: {
|
54
|
+
period: 20,
|
55
|
+
callback: null
|
56
|
+
}
|
57
|
+
});
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Ember
|
2
|
+
module Auth
|
3
|
+
module Module
|
4
|
+
module Timeoutable
|
5
|
+
module Source
|
6
|
+
def self.bundled_path
|
7
|
+
path = File.join '..', '..', '..', '..', '..', '..', \
|
8
|
+
'dist', 'ember-auth-module-timeoutable.js'
|
9
|
+
File.expand_path path, __FILE__
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
metadata
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ember-auth-module-timeoutable-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 timeoutable module source code wrapper for ruby libs.
|
42
|
+
email:
|
43
|
+
- heartsentwined.me@gmail.com
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- dist/ember-auth-module-timeoutable.js
|
49
|
+
- lib/ember/auth/module/timeoutable/source.rb
|
50
|
+
homepage: https://github.com/heartsentwined/ember-auth-module-timeoutable
|
51
|
+
licenses:
|
52
|
+
- MIT
|
53
|
+
metadata: {}
|
54
|
+
post_install_message:
|
55
|
+
rdoc_options: []
|
56
|
+
require_paths:
|
57
|
+
- lib
|
58
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - '>='
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - '>='
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
requirements: []
|
69
|
+
rubyforge_project:
|
70
|
+
rubygems_version: 2.0.3
|
71
|
+
signing_key:
|
72
|
+
specification_version: 4
|
73
|
+
summary: Ember-auth timeoutable module source code wrapper
|
74
|
+
test_files: []
|