ember-auth-request-jquery-source 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 1d9744a753178336d1099d70ece0284cba865a23
4
+ data.tar.gz: 5589dcf4aef48911674a6c8d93a8f02651da7318
5
+ SHA512:
6
+ metadata.gz: 1bcbee47cf2fec5f6c9be61dce825a36ad074a9c440ae43c4709c40efce961649cf3af168f3ae6e34faf8e06ef9bff511c8fa81568b40394ba29d3062ade57b2
7
+ data.tar.gz: 7359f3687dc87d443b109c33dea49717cd56d32573f81f30c35f20e584b71bcbae09516d2633c8855a437d83effbab5cb3d2ffbbc629c4e59a9595326035fa5d
@@ -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.request.jquery',
6
+ before: 'ember-auth-load',
7
+ initialize: function (container, app) {
8
+ return app.register('authRequest:jquery', get$(get$(Em, 'Auth'), 'JqueryAuthRequest'));
9
+ }
10
+ });
11
+ });// Generated by EmberScript 0.0.7
12
+ void function () {
13
+ var $;
14
+ var get$ = Ember.get;
15
+ var set$ = Ember.set;
16
+ $ = jQuery;
17
+ set$(get$(Em, 'Auth'), 'JqueryAuthRequest', get$(get$(Em, 'Auth'), 'AuthRequest').extend({
18
+ init: function () {
19
+ return get$(this, 'auth').reopen({ jqxhr: get$(Em, 'computed').alias('_request.jqxhr') });
20
+ },
21
+ jqxhr: null,
22
+ signIn: function (url, opts) {
23
+ return this.send($.extend(true, {
24
+ url: url,
25
+ type: 'POST'
26
+ }, opts));
27
+ },
28
+ signOut: function (url, opts) {
29
+ return this.send($.extend(true, {
30
+ url: url,
31
+ type: 'DELETE'
32
+ }, opts));
33
+ },
34
+ send: function (opts) {
35
+ var def, settings, this$;
36
+ def = {};
37
+ set$(def, 'dataType', 'json');
38
+ if (get$(opts, 'data') && !(null != get$(opts, 'contentType'))) {
39
+ if (null != get$(opts, 'type') && get$(opts, 'type').toUpperCase() !== 'GET')
40
+ set$(opts, 'data', JSON.stringify(get$(opts, 'data')));
41
+ if ((null != get$(opts, 'type') ? get$(opts, 'type').toUpperCase() : void 0) !== 'GET')
42
+ set$(def, 'contentType', 'application/json; charset=utf-8');
43
+ }
44
+ settings = $.extend(def, opts);
45
+ return new (get$(get$(Em, 'RSVP'), 'Promise'))((this$ = this, function (resolve, reject) {
46
+ var this$1, this$2;
47
+ return $.ajax(settings).done((this$1 = this$, function (json, status, jqxhr) {
48
+ set$(this$1, 'jqxhr', jqxhr);
49
+ return resolve(get$(jqxhr, 'responseText'));
50
+ })).fail((this$2 = this$, function (jqxhr) {
51
+ set$(this$2, 'jqxhr', jqxhr);
52
+ return reject(get$(jqxhr, 'responseText'));
53
+ }));
54
+ }));
55
+ }
56
+ }));
57
+ }.call(this);
@@ -0,0 +1,15 @@
1
+ module Ember
2
+ module Auth
3
+ module Request
4
+ module Jquery
5
+ module Source
6
+ def self.bundled_path
7
+ path = File.join '..', '..', '..', '..', '..', '..', \
8
+ 'dist', 'ember-auth-request-jquery.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-request-jquery-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 jquery request adapter 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-request-jquery.js
49
+ - lib/ember/auth/request/jquery/source.rb
50
+ homepage: https://github.com/heartsentwined/ember-auth-request-jquery
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 jquery request adapter source code wrapper
74
+ test_files: []