restfuljs-rails 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: fbc9f3ac4f2ff6d638b332674b5d405856b46a8d
4
+ data.tar.gz: 8ea8aeacf60f4204c5210fc76605cd9d5e2c0c63
5
+ SHA512:
6
+ metadata.gz: 8c8da01f63f9364e2dd1bcd062be385df7a17567133d4bb16dd34ed364e19ad9ff72d8a4243c679975edec6f40cabba6ac67ac340568cae31433d428a29a0c9e
7
+ data.tar.gz: 786d67ba55625999240ed28efcbb058c5438263ad2b3628629d1424c1e32360caeb3eaa5c8f2955b291723e889e1c7be23b4d1bc6e81978e4de9572c6ae7d0ae
@@ -0,0 +1,20 @@
1
+ Copyright 2015+ Aurélien Malisart
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,18 @@
1
+ # restfuljs-rails
2
+
3
+ [momentjs](https://github.com/marmelab/restful.js) is a pure JS client for interacting with server-side RESTful resources. Think Restangular without Angular.
4
+ This RubyGem bundles [momentjs](https://github.com/marmelab/restful.js) for the Rails asset pipeline.
5
+
6
+ ## Usage
7
+
8
+ Add the following to your gemfile:
9
+
10
+ gem 'restfuljs-rails'
11
+
12
+ Add the following directive to your Javascript manifest file ( probably `application.js`):
13
+
14
+ //= require restful.min
15
+
16
+ ## Versioning
17
+
18
+ restfuljs-rails x.y.z == restful.js.min x.y.z
@@ -0,0 +1,6 @@
1
+ module Restfuljs
2
+ module Rails
3
+ class Engine < ::Rails::Engine
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,8 @@
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):"object"==typeof exports?exports.restful=e():t.restful=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t,e){var n={baseUrl:t,port:e||80,prefixUrl:"",protocol:"http"},r=function(){var t={_http:p(f),headers:{},requestInterceptors:[],responseInterceptors:[]},e={url:function(t){var e=function(){return t.apply(this,arguments)};return e.toString=function(){return t.toString()},e}(function(){var t=n.protocol+"://"+n.baseUrl;return 80!==n.port&&(t+=":"+n.port),""!==n.prefixUrl&&(t+="/"+n.prefixUrl),t})};return i(e,t),u(function(){return t._http},e)}(),o={url:function(){return r.url()},one:function(t,e){return c(t,e,o)},all:function(t){return s(t,o)}};return o=u(a(r),o),i(o,n),o}var o=function(t){return t&&t.__esModule?t["default"]:t};t.exports=r;var u=o(n(1)),i=o(n(2)),s=o(n(3)),c=o(n(4)),a=o(n(5)),f=o(n(7)),p=o(n(6))},function(t){"use strict";function e(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=Object.assign||function(t){for(var n,r,o=e(t),u=1;u<arguments.length;u++){n=arguments[u],r=Object.keys(Object(n));for(var i=0;i<r.length;i++)o[r[i]]=n[r[i]]}return o}},function(t){"use strict";function e(t,e){for(var n in e)e.hasOwnProperty(n)&&!function(n){t[n]=function(r){return arguments.length?(e[n]=r,t):e[n]}}(n)}t.exports=e},function(t,e,n){"use strict";function r(t,e){function n(n){var o=c(t,n,e);return o().headers(r.headers()).responseInterceptors(r.responseInterceptors()).requestInterceptors(r.requestInterceptors()),o}var r=i([e.url(),t].join("/"),e()),o={get:function(t,e,o){return r.get(t,e,o).then(function(t){return s(t,n)})},getAll:function(t,e){return r.getAll(t,e).then(function(t){return s(t,n)})},post:function(t,e){return r.post(t,e).then(function(t){return s(t)})},put:function(t,e,n){return r.put(t,e,n).then(function(t){return s(t)})},patch:function(t,e,n){return r.patch(t,e,n).then(function(t){return s(t)})},head:function(t,e,n){return r.head(t,e,n).then(function(t){return s(t)})},"delete":function(t,e){return r["delete"](t,e).then(function(t){return s(t)})},url:function(){return[e.url(),t].join("/")}};return u(a(r),o)}var o=function(t){return t&&t.__esModule?t["default"]:t};t.exports=r;var u=o(n(1)),i=o(n(8)),s=o(n(9)),c=o(n(4)),a=o(n(5))},function(t,e,n){"use strict";function r(t,e,n){var o=s([n.url(),t].join("/"),n()),f={get:function(t,n){return o.get(e,t,n).then(function(t){return c(t,function(){return f})})},put:function(t,n){return o.put(e,t,n).then(function(t){return c(t)})},patch:function(t,n){return o.patch(e,t,n).then(function(t){return c(t)})},head:function(t,n){return o.head(e,t,n).then(function(t){return c(t)})},"delete":function(t){return o["delete"](e,t).then(function(t){return c(t)})},one:function(t,e){return r(t,e,f)},all:function(t){return i(t,f)},url:function(){return[n.url(),t,e].join("/")}};return f=u(a(o),f)}var o=function(t){return t&&t.__esModule?t["default"]:t};t.exports=r;var u=o(n(1)),i=o(n(3)),s=o(n(8)),c=o(n(9)),a=o(n(5))},function(t,e,n){"use strict";function r(t){function e(){return t}return e=u(e,{addRequestInterceptor:function(n){return t.requestInterceptors().push(n),e},requestInterceptors:function(){return t.requestInterceptors()},addResponseInterceptor:function(n){return t.responseInterceptors().push(n),e},responseInterceptors:function(){return t.responseInterceptors},header:function(n,r){return t.headers()[n]=r,e},headers:function(){return t.headers()}})}var o=function(t){return t&&t.__esModule?t["default"]:t};t.exports=r;var u=o(n(1))},function(t,e,n){"use strict";function r(t,e,n,r){return r=void 0!==r?!!r:!1,function(o,u){if(r)try{o=JSON.parse(o)}catch(i){}for(var s in t)o=t[s](o,u,e,n);if(!r)try{o=JSON.stringify(o)}catch(i){}return o}}function o(t){var e={request:function(e,n){return n.method=e,-1!==["post","put","patch"].indexOf(e)&&(n.transformRequest=[r(n.requestInterceptors||[],n.method,n.url)],delete n.requestInterceptors),n.transformResponse=[r(n.responseInterceptors||[],n.method,n.url,!0)],delete n.responseInterceptors,t(n)}};return i(function(){return t},e)}var u=function(t){return t&&t.__esModule?t["default"]:t};t.exports=o;var i=u(n(1))},function(t,e,n){t.exports=n(10)},function(t,e,n){"use strict";function r(t,e){function n(){for(var t=a,e=[];t;)e=e.concat(t.requestInterceptors()),t=t._parent?t._parent():null;return e}function r(){for(var t=a,e=[];t;)e=e.concat(t.responseInterceptors()),t=t._parent?t._parent():null;return e}function o(){for(var t=a,e={};t;)u(e,t.headers()),t=t._parent?t._parent():null;return e}function s(t){var e=void 0===arguments[1]?{}:arguments[1],i=void 0===arguments[2]?{}:arguments[2],s=void 0===arguments[3]?null:arguments[3],c={url:t,params:e||{},headers:u({},o(),i||{}),responseInterceptors:r()};return s&&(c.data=s,c.requestInterceptors=n()),c}var c={_parent:e,headers:{},requestInterceptors:[],responseInterceptors:[]},a={get:function(e,n,r){return c._parent().request("get",s(t+"/"+e,n,r))},getAll:function(e,n){return c._parent().request("get",s(t,e,n))},post:function(e,n){return n=n||{},n["Content-Type"]||(n["Content-Type"]="application/json;charset=UTF-8"),c._parent().request("post",s(t,{},n,e))},put:function(e,n,r){return r=r||{},r["Content-Type"]||(r["Content-Type"]="application/json;charset=UTF-8"),c._parent().request("put",s(t+"/"+e,{},r,n))},patch:function(e,n,r){return r=r||{},r["Content-Type"]||(r["Content-Type"]="application/json;charset=UTF-8"),c._parent().request("patch",s(t+"/"+e,{},r,n))},"delete":function(e,n){return c._parent().request("delete",s(t+"/"+e,{},n))},head:function(e,n){return c._parent().request("head",s(t+"/"+e,{},n))}};return a=u(function(){return c._parent()},a),i(a,c),a}var o=function(t){return t&&t.__esModule?t["default"]:t};t.exports=r;{var u=o(n(1)),i=o(n(2));o(n(11))}},function(t,e,n){"use strict";var r=function(t){return t&&t.__esModule?t["default"]:t},o=r(n(12));t.exports=function(t,e){return new Promise(function(n,r){var u=t.status;return u>=200&&400>u?n(o(t,e)):void r(o(t))})}},function(t,e,n){function r(){i.forEach(arguments,function(t){f[t]=function(e,n){return f(i.merge(n||{},{method:t,url:e}))}})}function o(){i.forEach(arguments,function(t){f[t]=function(e,n,r){return f(i.merge(r||{},{method:t,url:e,data:n}))}})}var u=n(13),i=n(14),s=n(15),c=n(16),a=n(17);!function(){var t=n(20);t&&"function"==typeof t.polyfill&&t.polyfill()}();var f=t.exports=function p(t){t=i.merge({method:"get",headers:{},transformRequest:u.transformRequest,transformResponse:u.transformResponse},t),t.withCredentials=t.withCredentials||u.withCredentials;var e=[c,void 0],n=Promise.resolve(t);for(p.interceptors.request.forEach(function(t){e.unshift(t.fulfilled,t.rejected)}),p.interceptors.response.forEach(function(t){e.push(t.fulfilled,t.rejected)});e.length;)n=n.then(e.shift(),e.shift());return n.success=function(t){return s("success","then","https://github.com/mzabriskie/axios/blob/master/README.md#response-api"),n.then(function(e){t(e.data,e.status,e.headers,e.config)}),n},n.error=function(t){return s("error","catch","https://github.com/mzabriskie/axios/blob/master/README.md#response-api"),n.then(null,function(e){t(e.data,e.status,e.headers,e.config)}),n},n};f.defaults=u,f.all=function(t){return Promise.all(t)},f.spread=n(18),f.interceptors={request:new a,response:new a},r("delete","get","head"),o("post","put","patch")},function(t,e,n){"use strict";function r(t,e,n){var r={one:function(t,e){return n.one(t,e)},all:function(t){return n.all(t)},save:function(t){return n.put(e,t)},remove:function(t){return n["delete"](t)},url:function(){return n.url()},id:function(t){var e=function(){return t.apply(this,arguments)};return e.toString=function(){return t.toString()},e}(function(){return t}),data:function(t){var e=function(){return t.apply(this,arguments)};return e.toString=function(){return t.toString()},e}(function(){return e})};return u(function(){return e},r)}var o=function(t){return t&&t.__esModule?t["default"]:t};t.exports=r;var u=o(n(1))},function(t,e,n){"use strict";function r(t,e){var n={status:function(){return t.status},body:function(){var n=void 0===arguments[0]?!0:arguments[0];return n&&e?"[object Array]"===Object.prototype.toString.call(t.data)?t.data.map(function(t){return i(t.id,t,e(t.id))}):i(t.data.id,t.data,e(t.data.id)):t.data},headers:function(){return t.headers},config:function(){return t.config}};return u(function(){return t},n)}var o=function(t){return t&&t.__esModule?t["default"]:t};t.exports=r;var u=o(n(1)),i=o(n(11))},function(t,e,n){"use strict";var r=n(14),o=/^\s*(\[|\{[^\{])/,u=/[\}\]]\s*$/,i=/^\)\]\}',?\n/,s={"Content-Type":"application/x-www-form-urlencoded"};t.exports={transformRequest:[function(t,e){return r.isArrayBuffer(t)?t:r.isArrayBufferView(t)?t.buffer:!r.isObject(t)||r.isFile(t)||r.isBlob(t)?t:(!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]="application/json;charset=utf-8"),JSON.stringify(t))}],transformResponse:[function(t){return"string"==typeof t&&(t=t.replace(i,""),o.test(t)&&u.test(t)&&(t=JSON.parse(t))),t}],headers:{common:{Accept:"application/json, text/plain, */*"},patch:r.merge(s),post:r.merge(s),put:r.merge(s)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN"}},function(t){function e(t){return"[object Array]"===m.call(t)}function n(t){return"[object ArrayBuffer]"===m.call(t)}function r(t){return"[object FormData]"===m.call(t)}function o(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer}function u(t){return"string"==typeof t}function i(t){return"number"==typeof t}function s(t){return"undefined"==typeof t}function c(t){return null!==t&&"object"==typeof t}function a(t){return"[object Date]"===m.call(t)}function f(t){return"[object File]"===m.call(t)}function p(t){return"[object Blob]"===m.call(t)}function l(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}function h(t,n){if(null!==t&&"undefined"!=typeof t){var r=e(t)||"object"==typeof t&&!isNaN(t.length);if("object"==typeof t||r||(t=[t]),r)for(var o=0,u=t.length;u>o;o++)n.call(null,t[o],o,t);else for(var i in t)t.hasOwnProperty(i)&&n.call(null,t[i],i,t)}}function d(){var t={};return h(arguments,function(e){h(e,function(e,n){t[n]=e})}),t}var m=Object.prototype.toString;t.exports={isArray:e,isArrayBuffer:n,isFormData:r,isArrayBufferView:o,isString:u,isNumber:i,isObject:c,isUndefined:s,isDate:a,isFile:f,isBlob:p,forEach:h,merge:d,trim:l}},function(t){"use strict";t.exports=function(t,e,n){try{console.warn("DEPRECATED method `"+t+"`."+(e?" Use `"+e+"` instead.":"")+" This method will be removed in a future release."),n&&console.warn("For more information about usage see "+n)}catch(r){}}},function(t,e,n){(function(e){"use strict";t.exports=function(t){return new Promise(function(r,o){try{"undefined"!=typeof window?n(19)(r,o,t):"undefined"!=typeof e&&n(19)(r,o,t)}catch(u){o(u)}})}}).call(e,n(21))},function(t,e,n){"use strict";function r(){this.handlers=[]}var o=n(14);r.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},r.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},r.prototype.forEach=function(t){o.forEach(this.handlers,function(e){null!==e&&t(e)})},t.exports=r},function(t){t.exports=function(t){return function(e){t.apply(null,e)}}},function(t,e,n){var r=n(13),o=n(14),u=n(22),i=n(23),s=n(24),c=n(25),a=n(26);t.exports=function(t,e,n){var f=c(n.data,n.headers,n.transformRequest),p=o.merge(r.headers.common,r.headers[n.method]||{},n.headers||{});o.isFormData(f)&&delete p["Content-Type"];var l=new(XMLHttpRequest||ActiveXObject)("Microsoft.XMLHTTP");l.open(n.method.toUpperCase(),u(n.url,n.params),!0),l.onreadystatechange=function(){if(l&&4===l.readyState){var r=s(l.getAllResponseHeaders()),o=-1!==["text",""].indexOf(n.responseType||"")?l.responseText:l.response,u={data:c(o,r,n.transformResponse),status:l.status,statusText:l.statusText,headers:r,config:n};(l.status>=200&&l.status<300?t:e)(u),l=null}};var h=a(n.url)?i.read(n.xsrfCookieName||r.xsrfCookieName):void 0;if(h&&(p[n.xsrfHeaderName||r.xsrfHeaderName]=h),o.forEach(p,function(t,e){f||"content-type"!==e.toLowerCase()?l.setRequestHeader(e,t):delete p[e]}),n.withCredentials&&(l.withCredentials=!0),n.responseType)try{l.responseType=n.responseType}catch(d){if("json"!==l.responseType)throw d}o.isArrayBuffer(f)&&(f=new DataView(f)),l.send(f)}},function(t,e,n){var r;(function(t,o,u){/*!
2
+ * @overview es6-promise - a tiny implementation of Promises/A+.
3
+ * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
4
+ * @license Licensed under MIT license
5
+ * See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE
6
+ * @version 2.0.1
7
+ */
8
+ (function(){"use strict";function i(t){return"function"==typeof t||"object"==typeof t&&null!==t}function s(t){return"function"==typeof t}function c(t){return"object"==typeof t&&null!==t}function a(){}function f(){return function(){t.nextTick(d)}}function p(){var t=0,e=new X(d),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function l(){var t=new MessageChannel;return t.port1.onmessage=d,function(){t.port2.postMessage(0)}}function h(){return function(){setTimeout(d,1)}}function d(){for(var t=0;F>t;t+=2){var e=V[t],n=V[t+1];e(n),V[t]=void 0,V[t+1]=void 0}F=0}function m(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function y(){return new TypeError("A promises callback cannot return that same promise.")}function g(t){try{return t.then}catch(e){return z.error=e,z}}function w(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function _(t,e,n){L(function(t){var r=!1,o=w(n,e,function(n){r||(r=!0,e!==n?j(t,n):E(t,n))},function(e){r||(r=!0,T(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,T(t,o))},t)}function b(t,e){e._state===K?E(t,e._result):t._state===Y?T(t,e._result):O(e,void 0,function(e){j(t,e)},function(e){T(t,e)})}function x(t,e){if(e.constructor===t.constructor)b(t,e);else{var n=g(e);n===z?T(t,z.error):void 0===n?E(t,e):s(n)?_(t,e,n):E(t,e)}}function j(t,e){t===e?T(t,v()):i(e)?x(t,e):E(t,e)}function A(t){t._onerror&&t._onerror(t._result),I(t)}function E(t,e){t._state===$&&(t._result=e,t._state=K,0===t._subscribers.length||L(I,t))}function T(t,e){t._state===$&&(t._state=Y,t._result=e,L(A,t))}function O(t,e,n,r){var o=t._subscribers,u=o.length;t._onerror=null,o[u]=e,o[u+K]=n,o[u+Y]=r,0===u&&t._state&&L(I,t)}function I(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r,o,u=t._result,i=0;i<e.length;i+=3)r=e[i],o=e[i+n],r?q(n,r,o,u):o(u);t._subscribers.length=0}}function C(){this.error=null}function S(t,e){try{return t(e)}catch(n){return G.error=n,G}}function q(t,e,n,r){var o,u,i,c,a=s(n);if(a){if(o=S(n,r),o===G?(c=!0,u=o.error,o=null):i=!0,e===o)return void T(e,y())}else o=r,i=!0;e._state!==$||(a&&i?j(e,o):c?T(e,u):t===K?E(e,o):t===Y&&T(e,o))}function R(t,e){try{e(function(e){j(t,e)},function(e){T(t,e)})}catch(n){T(t,n)}}function M(t,e,n,r){this._instanceConstructor=t,this.promise=new t(m,r),this._abortOnReject=n,this._validateInput(e)?(this._input=e,this.length=e.length,this._remaining=e.length,this._init(),0===this.length?E(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&E(this.promise,this._result))):T(this.promise,this._validationError())}function P(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function k(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function N(t){this._id=ne++,this._state=void 0,this._result=void 0,this._subscribers=[],m!==t&&(s(t)||P(),this instanceof N||k(),R(this,t))}var U;U=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var D,B=U,F=(Date.now||function(){return(new Date).getTime()},Object.create||function(t){if(arguments.length>1)throw new Error("Second argument not supported");if("object"!=typeof t)throw new TypeError("Argument must be an object");return a.prototype=t,new a},0),L=function(t,e){V[F]=t,V[F+1]=e,F+=2,2===F&&D()},H="undefined"!=typeof window?window:{},X=H.MutationObserver||H.WebKitMutationObserver,J="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,V=new Array(1e3);D="undefined"!=typeof t&&"[object process]"==={}.toString.call(t)?f():X?p():J?l():h();var $=void 0,K=1,Y=2,z=new C,G=new C;M.prototype._validateInput=function(t){return B(t)},M.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},M.prototype._init=function(){this._result=new Array(this.length)};var W=M;M.prototype._enumerate=function(){for(var t=this.length,e=this.promise,n=this._input,r=0;e._state===$&&t>r;r++)this._eachEntry(n[r],r)},M.prototype._eachEntry=function(t,e){var n=this._instanceConstructor;c(t)?t.constructor===n&&t._state!==$?(t._onerror=null,this._settledAt(t._state,e,t._result)):this._willSettleAt(n.resolve(t),e):(this._remaining--,this._result[e]=this._makeResult(K,e,t))},M.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===$&&(this._remaining--,this._abortOnReject&&t===Y?T(r,n):this._result[e]=this._makeResult(t,e,n)),0===this._remaining&&E(r,this._result)},M.prototype._makeResult=function(t,e,n){return n},M.prototype._willSettleAt=function(t,e){var n=this;O(t,void 0,function(t){n._settledAt(K,e,t)},function(t){n._settledAt(Y,e,t)})};var Q=function(t,e){return new W(this,t,!0,e).promise},Z=function(t,e){function n(t){j(u,t)}function r(t){T(u,t)}var o=this,u=new o(m,e);if(!B(t))return T(u,new TypeError("You must pass an array to race.")),u;for(var i=t.length,s=0;u._state===$&&i>s;s++)O(o.resolve(t[s]),void 0,n,r);return u},te=function(t,e){var n=this;if(t&&"object"==typeof t&&t.constructor===n)return t;var r=new n(m,e);return j(r,t),r},ee=function(t,e){var n=this,r=new n(m,e);return T(r,t),r},ne=0,re=N;N.all=Q,N.race=Z,N.resolve=te,N.reject=ee,N.prototype={constructor:N,then:function(t,e){var n=this,r=n._state;if(r===K&&!t||r===Y&&!e)return this;var o=new this.constructor(m),u=n._result;if(r){var i=arguments[r-1];L(function(){q(r,o,i,u)})}else O(n,o,t,e);return o},"catch":function(t){return this.then(null,t)}};var oe=function(){var t;t="undefined"!=typeof o?o:"undefined"!=typeof window&&window.document?window:self;var e="Promise"in t&&"resolve"in t.Promise&&"reject"in t.Promise&&"all"in t.Promise&&"race"in t.Promise&&function(){var e;return new t.Promise(function(t){e=t}),s(e)}();e||(t.Promise=re)},ue={Promise:re,polyfill:oe};n(27).amd?(r=function(){return ue}.call(e,n,e,u),!(void 0!==r&&(u.exports=r))):"undefined"!=typeof u&&u.exports?u.exports=ue:"undefined"!=typeof this&&(this.ES6Promise=ue)}).call(this)}).call(e,n(21),function(){return this}(),n(28)(t))},function(t){function e(){}var n=t.exports={};n.nextTick=function(){var t="undefined"!=typeof window&&window.setImmediate,e="undefined"!=typeof window&&window.MutationObserver,n="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(t)return function(t){return window.setImmediate(t)};var r=[];if(e){var o=document.createElement("div"),u=new MutationObserver(function(){var t=r.slice();r.length=0,t.forEach(function(t){t()})});return u.observe(o,{attributes:!0}),function(t){r.length||o.setAttribute("yes","no"),r.push(t)}}return n?(window.addEventListener("message",function(t){var e=t.source;if((e===window||null===e)&&"process-tick"===t.data&&(t.stopPropagation(),r.length>0)){var n=r.shift();n()}},!0),function(t){r.push(t),window.postMessage("process-tick","*")}):function(t){setTimeout(t,0)}}(),n.title="browser",n.browser=!0,n.env={},n.argv=[],n.on=e,n.addListener=e,n.once=e,n.off=e,n.removeListener=e,n.removeAllListeners=e,n.emit=e,n.binding=function(){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(){throw new Error("process.chdir is not supported")}},function(t,e,n){"use strict";function r(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}var o=n(14);t.exports=function(t,e){if(!e)return t;var n=[];return o.forEach(e,function(t,e){null!==t&&"undefined"!=typeof t&&(o.isArray(t)||(t=[t]),o.forEach(t,function(t){o.isDate(t)?t=t.toISOString():o.isObject(t)&&(t=JSON.stringify(t)),n.push(r(e)+"="+r(t))}))}),n.length>0&&(t+=(-1===t.indexOf("?")?"?":"&")+n.join("&")),t}},function(t,e,n){"use strict";var r=n(14);t.exports={write:function(t,e,n,o,u,i){var s=[];s.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(o)&&s.push("path="+o),r.isString(u)&&s.push("domain="+u),i===!0&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}},function(t,e,n){"use strict";var r=n(14);t.exports=function(t){var e,n,o,u={};return t?(r.forEach(t.split("\n"),function(t){o=t.indexOf(":"),e=r.trim(t.substr(0,o)).toLowerCase(),n=r.trim(t.substr(o+1)),e&&(u[e]=u[e]?u[e]+", "+n:n)}),u):u}},function(t,e,n){"use strict";var r=n(14);t.exports=function(t,e,n){return r.forEach(n,function(n){t=n(t,e)}),t}},function(t,e,n){"use strict";function r(t){var e=t;return o&&(i.setAttribute("href",e),e=i.href),i.setAttribute("href",e),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}var o=/(msie|trident)/i.test(navigator.userAgent),u=n(14),i=document.createElement("a"),s=r(window.location.href);t.exports=function(t){var e=u.isString(t)?r(t):t;return e.protocol===s.protocol&&e.host===s.host}},function(t){t.exports=function(){throw new Error("define cannot be used indirect")}},function(t){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}}])});
metadata ADDED
@@ -0,0 +1,76 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: restfuljs-rails
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.6.1
5
+ platform: ruby
6
+ authors:
7
+ - Aurélien Malisart
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-04-03 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: railties
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '3.1'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '3.1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rails
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 3.2.12
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 3.2.12
41
+ description: |2
42
+ The restful.js JavaScript library ready to play with Rails.
43
+ email: aurelien.malisart@gmail.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - MIT-LICENSE
49
+ - README.md
50
+ - lib/restfuljs-rails.rb
51
+ - vendor/assets/javascripts/restful.min.js
52
+ homepage: https://github.com/aurels/restfuljs-rails
53
+ licenses:
54
+ - MIT
55
+ metadata: {}
56
+ post_install_message:
57
+ rdoc_options: []
58
+ require_paths:
59
+ - lib
60
+ required_ruby_version: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: '0'
65
+ required_rubygems_version: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ requirements: []
71
+ rubyforge_project:
72
+ rubygems_version: 2.2.2
73
+ signing_key:
74
+ specification_version: 4
75
+ summary: The restful.js JavaScript library ready to play with Rails.
76
+ test_files: []