normalizr-rails 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.travis.yml +5 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +42 -0
- data/Rakefile +10 -0
- data/app/assets/javascripts/normalizr.js +1 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/normalizr/rails.rb +11 -0
- data/lib/normalizr/rails/version.rb +5 -0
- data/normalizr-rails.gemspec +27 -0
- metadata +100 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 32c44c2ef246ea68aebe108878e611f46577d621
|
4
|
+
data.tar.gz: 5b17dba2005754b140a30194b2bf7ec0cfca3c93
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e2ee8a9918c9f37e7a45875e6d428d97e00d4091ab405eb6859e4d75a472be8a30724b3aa73fdf1edd4fbdcc71c05503e40a6c09e8ba25f455bebce72d468e3e
|
7
|
+
data.tar.gz: 59f99dfe2191ae8d4f5ad3dc3836265cd4b75bfc1f49ca6949e79be9100715ff6f44f9bbb0db9f192f381d9141ee29c073ed5d9453ba9ac60b015b1948ba5e22
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 ACT.md
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
# Normalizr::Rails
|
2
|
+
|
3
|
+
Rails wrapper for normalizr JavaScript library (https://github.com/paularmstrong/normalizr). The version number of this gem follows the version number of the original JavaScript library.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'normalizr-rails'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install normalizr-rails
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
Add the following code to ``application.js``:
|
24
|
+
```
|
25
|
+
//= require normalizr
|
26
|
+
```
|
27
|
+
|
28
|
+
## Development
|
29
|
+
|
30
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
31
|
+
|
32
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
33
|
+
|
34
|
+
## Contributing
|
35
|
+
|
36
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/actmd/normalizr-rails.
|
37
|
+
|
38
|
+
|
39
|
+
## License
|
40
|
+
|
41
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
42
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.normalizr=e():t.normalizr=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(t,e,r){t[e]=r}function i(t,e,r,n){var i=n.assignEntity,a=void 0===i?o:i,u=e&&e.getDefaults&&e.getDefaults(),c=e&&e.getAssignEntity&&e.getAssignEntity(),f=(0,k["default"])(u)?d({},u):{};for(var s in t)if(t.hasOwnProperty(s)){var p=l(t[s],e[s],r,n);a.call(null,f,s,p,t,e),c&&c.call(null,f,s,p,t,e)}return f}function a(t,e,r,n){return function(t){return l(t,e,r,n)}}function u(t,e,r,n){return function(o){var i=t.getSchemaKey(o),a=l(o,e[i],r,n);return{id:a,schema:i}}}function c(t,e,r,n){var o=e.getItemSchema(),i=a(e,o,r,n);return Array.isArray(t)?t.map(i):Object.keys(t).reduce(function(e,r){return e[r]=i(t[r]),e},{})}function f(t,e,r,n){var o=e.getItemSchema();return u(e,o,r,n)(t)}function s(t,e,r){for(var n in e)e.hasOwnProperty(n)&&(t.hasOwnProperty(n)&&!(0,A["default"])(t[n],e[n])?console.warn("When merging two "+r+', found unequal data in their "'+n+'" values. Using the earlier value.',t[n],e[n]):t[n]=e[n])}function p(t,e,r,n){var o=n.mergeIntoEntity,a=void 0===o?s:o,u=e.getKey(),c=e.getId(t);r.hasOwnProperty(u)||(r[u]={}),r[u].hasOwnProperty(c)||(r[u][c]={});var f=r[u][c],p=i(t,e,r,n);return a(f,p,u),c}function l(t,e,r,n){return(0,k["default"])(t)&&(0,k["default"])(e)?e instanceof g["default"]?p(t,e,r,n):e instanceof x["default"]?c(t,e,r,n):e instanceof w["default"]?f(t,e,r,n):i(t,e,r,n):t}function v(t,e){return new x["default"](t,e)}function h(t,e){return new x["default"](t,e)}function y(t,e){return new w["default"](t,e)}function _(t,e){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];if(!(0,k["default"])(t))throw new Error("Normalize accepts an object or an array as its input.");if(!(0,k["default"])(e)||Array.isArray(e))throw new Error("Normalize accepts an object for schema.");var n={},o=l(t,e,n,r);return{entities:n,result:o}}Object.defineProperty(e,"__esModule",{value:!0}),e.Schema=void 0;var d=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};e.arrayOf=v,e.valuesOf=h,e.unionOf=y,e.normalize=_;var b=r(20),g=n(b),j=r(21),x=n(j),m=r(11),w=n(m),O=r(74),A=n(O),S=r(3),k=n(S);e.Schema=g["default"]},function(t,e,r){(function(t,n){var o=r(37),i={"function":!0,object:!0},a=i[typeof e]&&e&&!e.nodeType?e:void 0,u=i[typeof t]&&t&&!t.nodeType?t:void 0,c=o(a&&u&&"object"==typeof n&&n),f=o(i[typeof self]&&self),s=o(i[typeof window]&&window),p=o(i[typeof this]&&this),l=c||s!==(p&&p.window)&&s||f||p||Function("return this")();t.exports=l}).call(e,r(79)(t),function(){return this}())},function(t,e,r){function n(t,e){var r=t[e];return o(r)?r:void 0}var o=r(75);t.exports=n},function(t,e){function r(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}t.exports=r},function(t,e,r){function n(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}var o=r(52),i=r(53),a=r(54),u=r(55),c=r(56);n.prototype.clear=o,n.prototype["delete"]=i,n.prototype.get=a,n.prototype.has=u,n.prototype.set=c,t.exports=n},function(t,e,r){function n(t,e){for(var r=t.length;r--;)if(o(t[r][0],e))return r;return-1}var o=r(71);t.exports=n},function(t,e,r){function n(t,e){var r=t.__data__;return o(e)?r["string"==typeof e?"string":"hash"]:r.map}var o=r(50);t.exports=n},function(t,e,r){var n=r(2),o=n(Object,"create");t.exports=o},function(t,e){function r(t){return!!t&&"object"==typeof t}t.exports=r},function(t,e){var r=Array.isArray;t.exports=r},function(t,e){function r(t){return"number"==typeof t&&t>-1&&t%1==0&&n>=t}var n=9007199254740991;t.exports=r},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),a=r(3),u=n(a),c=function(){function t(e,r){if(o(this,t),!(0,u["default"])(e))throw new Error("UnionSchema requires item schema to be an object.");if(!r||!r.schemaAttribute)throw new Error("UnionSchema requires schemaAttribute option.");this._itemSchema=e;var n=r.schemaAttribute;this._getSchema="function"==typeof n?n:function(t){return t[n]}}return i(t,[{key:"getItemSchema",value:function(){return this._itemSchema}},{key:"getSchemaKey",value:function(t){return this._getSchema(t)}}]),t}();e["default"]=c},function(t,e,r){var n=r(2),o=r(1),i=n(o,"Map");t.exports=i},function(t,e,r){function n(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}var o=r(57),i=r(58),a=r(59),u=r(60),c=r(61);n.prototype.clear=o,n.prototype["delete"]=i,n.prototype.get=a,n.prototype.has=u,n.prototype.set=c,t.exports=n},function(t,e,r){function n(t,e){return a.call(t,e)||"object"==typeof t&&e in t&&null===o(t)}var o=r(41),i=Object.prototype,a=i.hasOwnProperty;t.exports=n},function(t,e,r){function n(t,e,r,n,c,f){var s=c&u,p=t.length,l=e.length;if(p!=l&&!(s&&l>p))return!1;var v=f.get(t);if(v)return v==e;var h=-1,y=!0,_=c&a?new o:void 0;for(f.set(t,e);++h<p;){var d=t[h],b=e[h];if(n)var g=s?n(b,d,h,e,t,f):n(d,b,h,t,e,f);if(void 0!==g){if(g)continue;y=!1;break}if(_){if(!i(e,function(t,e){return _.has(e)||d!==t&&!r(d,t,n,c,f)?void 0:_.add(e)})){y=!1;break}}else if(d!==b&&!r(d,b,n,c,f)){y=!1;break}}return f["delete"](t),y}var o=r(26),i=r(31),a=1,u=2;t.exports=n},function(t,e){function r(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(r){}return e}t.exports=r},function(t,e){function r(t){if(null!=t){try{return n.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var n=Function.prototype.toString;t.exports=r},function(t,e,r){function n(t){return null!=t&&a(o(t))&&!i(t)}var o=r(40),i=r(19),a=r(10);t.exports=n},function(t,e,r){function n(t){var e=o(t)?c.call(t):"";return e==i||e==a}var o=r(3),i="[object Function]",a="[object GeneratorFunction]",u=Object.prototype,c=u.toString;t.exports=n},function(t,e){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=function(){function t(e){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(r(this,t),!e||"string"!=typeof e)throw new Error("A string non-empty key is required");this._key=e,this._assignEntity=n.assignEntity;var o=n.idAttribute||"id";this._getId="function"==typeof o?o:function(t){return t[o]},this._idAttribute=o,this._meta=n.meta,this._defaults=n.defaults}return n(t,[{key:"getAssignEntity",value:function(){return this._assignEntity}},{key:"getKey",value:function(){return this._key}},{key:"getId",value:function(t){return this._getId(t)}},{key:"getIdAttribute",value:function(){return this._idAttribute}},{key:"getMeta",value:function(t){if(!t||"string"!=typeof t)throw new Error("A string non-empty property name is required");return this._meta&&this._meta[t]}},{key:"getDefaults",value:function(){return this._defaults}},{key:"define",value:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e])}}]),t}();e["default"]=o},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),a=r(3),u=n(a),c=r(11),f=n(c),s=function(){function t(e){var r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(o(this,t),!(0,u["default"])(e))throw new Error("ArraySchema requires item schema to be an object.");if(r.schemaAttribute){var n=r.schemaAttribute;this._itemSchema=new f["default"](e,{schemaAttribute:n})}else this._itemSchema=e}return i(t,[{key:"getItemSchema",value:function(){return this._itemSchema}}]),t}();e["default"]=s},function(t,e,r){var n=r(2),o=r(1),i=n(o,"DataView");t.exports=i},function(t,e,r){function n(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}var o=r(43),i=r(44),a=r(45),u=r(46),c=r(47);n.prototype.clear=o,n.prototype["delete"]=i,n.prototype.get=a,n.prototype.has=u,n.prototype.set=c,t.exports=n},function(t,e,r){var n=r(2),o=r(1),i=n(o,"Promise");t.exports=i},function(t,e,r){var n=r(2),o=r(1),i=n(o,"Set");t.exports=i},function(t,e,r){function n(t){var e=-1,r=t?t.length:0;for(this.__data__=new o;++e<r;)this.add(t[e])}var o=r(13),i=r(63),a=r(64);n.prototype.add=n.prototype.push=i,n.prototype.has=a,t.exports=n},function(t,e,r){function n(t){this.__data__=new o(t)}var o=r(4),i=r(66),a=r(67),u=r(68),c=r(69),f=r(70);n.prototype.clear=i,n.prototype["delete"]=a,n.prototype.get=u,n.prototype.has=c,n.prototype.set=f,t.exports=n},function(t,e,r){var n=r(1),o=n.Symbol;t.exports=o},function(t,e,r){var n=r(1),o=n.Uint8Array;t.exports=o},function(t,e,r){var n=r(2),o=r(1),i=n(o,"WeakMap");t.exports=i},function(t,e){function r(t,e){for(var r=-1,n=t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}t.exports=r},function(t,e,r){function n(t,e,r,u,c){return t===e?!0:null==t||null==e||!i(t)&&!a(e)?t!==t&&e!==e:o(t,e,n,r,u,c)}var o=r(33),i=r(3),a=r(8);t.exports=n},function(t,e,r){function n(t,e,r,n,_,b){var g=f(t),j=f(e),x=h,m=h;g||(x=c(t),x=x==v?y:x),j||(m=c(e),m=m==v?y:m);var w=x==y&&!s(t),O=m==y&&!s(e),A=x==m;if(A&&!w)return b||(b=new o),g||p(t)?i(t,e,r,n,_,b):a(t,e,x,r,n,_,b);if(!(_&l)){var S=w&&d.call(t,"__wrapped__"),k=O&&d.call(e,"__wrapped__");if(S||k){var E=S?t.value():t,P=k?e.value():e;return b||(b=new o),r(E,P,n,_,b)}}return A?(b||(b=new o),u(t,e,r,n,_,b)):!1}var o=r(27),i=r(15),a=r(38),u=r(39),c=r(42),f=r(9),s=r(16),p=r(77),l=2,v="[object Arguments]",h="[object Array]",y="[object Object]",_=Object.prototype,d=_.hasOwnProperty;t.exports=n},function(t,e){function r(t){return n(Object(t))}var n=Object.keys;t.exports=r},function(t,e){function r(t){return function(e){return null==e?void 0:e[t]}}t.exports=r},function(t,e){function r(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}t.exports=r},function(t,e){function r(t){return t&&t.Object===Object?t:null}t.exports=r},function(t,e,r){function n(t,e,r,n,o,m,O){switch(r){case x:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case j:return!(t.byteLength!=e.byteLength||!n(new i(t),new i(e)));case p:case l:return+t==+e;case v:return t.name==e.name&&t.message==e.message;case y:return t!=+t?e!=+e:t==+e;case _:case b:return t==e+"";case h:var A=u;case d:var S=m&s;if(A||(A=c),t.size!=e.size&&!S)return!1;var k=O.get(t);return k?k==e:(m|=f,O.set(t,e),a(A(t),A(e),n,o,m,O));case g:if(w)return w.call(t)==w.call(e)}return!1}var o=r(28),i=r(29),a=r(15),u=r(62),c=r(65),f=1,s=2,p="[object Boolean]",l="[object Date]",v="[object Error]",h="[object Map]",y="[object Number]",_="[object RegExp]",d="[object Set]",b="[object String]",g="[object Symbol]",j="[object ArrayBuffer]",x="[object DataView]",m=o?o.prototype:void 0,w=m?m.valueOf:void 0;t.exports=n},function(t,e,r){function n(t,e,r,n,u,c){var f=u&a,s=i(t),p=s.length,l=i(e),v=l.length;if(p!=v&&!f)return!1;for(var h=p;h--;){var y=s[h];if(!(f?y in e:o(e,y)))return!1}var _=c.get(t);if(_)return _==e;var d=!0;c.set(t,e);for(var b=f;++h<p;){y=s[h];var g=t[y],j=e[y];if(n)var x=f?n(j,g,y,e,t,c):n(g,j,y,t,e,c);if(!(void 0===x?g===j||r(g,j,n,u,c):x)){d=!1;break}b||(b="constructor"==y)}if(d&&!b){var m=t.constructor,w=e.constructor;m!=w&&"constructor"in t&&"constructor"in e&&!("function"==typeof m&&m instanceof m&&"function"==typeof w&&w instanceof w)&&(d=!1)}return c["delete"](t),d}var o=r(14),i=r(78),a=2;t.exports=n},function(t,e,r){var n=r(35),o=n("length");t.exports=o},function(t,e){function r(t){return n(Object(t))}var n=Object.getPrototypeOf;t.exports=r},function(t,e,r){function n(t){return d.call(t)}var o=r(22),i=r(12),a=r(24),u=r(25),c=r(30),f=r(17),s="[object Map]",p="[object Object]",l="[object Promise]",v="[object Set]",h="[object WeakMap]",y="[object DataView]",_=Object.prototype,d=_.toString,b=f(o),g=f(i),j=f(a),x=f(u),m=f(c);(o&&n(new o(new ArrayBuffer(1)))!=y||i&&n(new i)!=s||a&&n(a.resolve())!=l||u&&n(new u)!=v||c&&n(new c)!=h)&&(n=function(t){var e=d.call(t),r=e==p?t.constructor:void 0,n=r?f(r):void 0;if(n)switch(n){case b:return y;case g:return s;case j:return l;case x:return v;case m:return h}return e}),t.exports=n},function(t,e,r){function n(){this.__data__=o?o(null):{}}var o=r(7);t.exports=n},function(t,e){function r(t){return this.has(t)&&delete this.__data__[t]}t.exports=r},function(t,e,r){function n(t){var e=this.__data__;if(o){var r=e[t];return r===i?void 0:r}return u.call(e,t)?e[t]:void 0}var o=r(7),i="__lodash_hash_undefined__",a=Object.prototype,u=a.hasOwnProperty;t.exports=n},function(t,e,r){function n(t){var e=this.__data__;return o?void 0!==e[t]:a.call(e,t)}var o=r(7),i=Object.prototype,a=i.hasOwnProperty;t.exports=n},function(t,e,r){function n(t,e){var r=this.__data__;return r[t]=o&&void 0===e?i:e,this}var o=r(7),i="__lodash_hash_undefined__";t.exports=n},function(t,e,r){function n(t){var e=t?t.length:void 0;return u(e)&&(a(t)||c(t)||i(t))?o(e,String):null}var o=r(36),i=r(72),a=r(9),u=r(10),c=r(76);t.exports=n},function(t,e){function r(t,e){return e=null==e?n:e,!!e&&("number"==typeof t||o.test(t))&&t>-1&&t%1==0&&e>t}var n=9007199254740991,o=/^(?:0|[1-9]\d*)$/;t.exports=r},function(t,e){function r(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}t.exports=r},function(t,e){function r(t){var e=t&&t.constructor,r="function"==typeof e&&e.prototype||n;return t===r}var n=Object.prototype;t.exports=r},function(t,e){function r(){this.__data__=[]}t.exports=r},function(t,e,r){function n(t){var e=this.__data__,r=o(e,t);if(0>r)return!1;var n=e.length-1;return r==n?e.pop():a.call(e,r,1),!0}var o=r(5),i=Array.prototype,a=i.splice;t.exports=n},function(t,e,r){function n(t){var e=this.__data__,r=o(e,t);return 0>r?void 0:e[r][1]}var o=r(5);t.exports=n},function(t,e,r){function n(t){return o(this.__data__,t)>-1}var o=r(5);t.exports=n},function(t,e,r){function n(t,e){var r=this.__data__,n=o(r,t);return 0>n?r.push([t,e]):r[n][1]=e,this}var o=r(5);t.exports=n},function(t,e,r){function n(){this.__data__={hash:new o,map:new(a||i),string:new o}}var o=r(23),i=r(4),a=r(12);t.exports=n},function(t,e,r){function n(t){return o(this,t)["delete"](t)}var o=r(6);t.exports=n},function(t,e,r){function n(t){return o(this,t).get(t)}var o=r(6);t.exports=n},function(t,e,r){function n(t){return o(this,t).has(t)}var o=r(6);t.exports=n},function(t,e,r){function n(t,e){return o(this,t).set(t,e),this}var o=r(6);t.exports=n},function(t,e){function r(t){var e=-1,r=Array(t.size);return t.forEach(function(t,n){r[++e]=[n,t]}),r}t.exports=r},function(t,e){function r(t){return this.__data__.set(t,n),this}var n="__lodash_hash_undefined__";t.exports=r},function(t,e){function r(t){return this.__data__.has(t)}t.exports=r},function(t,e){function r(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}t.exports=r},function(t,e,r){function n(){this.__data__=new o}var o=r(4);t.exports=n},function(t,e){function r(t){return this.__data__["delete"](t)}t.exports=r},function(t,e){function r(t){return this.__data__.get(t)}t.exports=r},function(t,e){function r(t){return this.__data__.has(t)}t.exports=r},function(t,e,r){function n(t,e){var r=this.__data__;return r instanceof o&&r.__data__.length==a&&(r=this.__data__=new i(r.__data__)),r.set(t,e),this}var o=r(4),i=r(13),a=200;t.exports=n},function(t,e){function r(t,e){return t===e||t!==t&&e!==e}t.exports=r},function(t,e,r){function n(t){return o(t)&&u.call(t,"callee")&&(!f.call(t,"callee")||c.call(t)==i)}var o=r(73),i="[object Arguments]",a=Object.prototype,u=a.hasOwnProperty,c=a.toString,f=a.propertyIsEnumerable;t.exports=n},function(t,e,r){function n(t){return i(t)&&o(t)}var o=r(18),i=r(8);t.exports=n},function(t,e,r){function n(t,e){return o(t,e)}var o=r(32);t.exports=n},function(t,e,r){function n(t){if(!a(t))return!1;var e=o(t)||i(t)?v:f;return e.test(u(t))}var o=r(19),i=r(16),a=r(3),u=r(17),c=/[\\^$.*+?()[\]{}|]/g,f=/^\[object .+?Constructor\]$/,s=Object.prototype,p=Function.prototype.toString,l=s.hasOwnProperty,v=RegExp("^"+p.call(l).replace(c,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=n},function(t,e,r){function n(t){return"string"==typeof t||!o(t)&&i(t)&&c.call(t)==a}var o=r(9),i=r(8),a="[object String]",u=Object.prototype,c=u.toString;t.exports=n},function(t,e,r){function n(t){return i(t)&&o(t.length)&&!!M[z.call(t)]}var o=r(10),i=r(8),a="[object Arguments]",u="[object Array]",c="[object Boolean]",f="[object Date]",s="[object Error]",p="[object Function]",l="[object Map]",v="[object Number]",h="[object Object]",y="[object RegExp]",_="[object Set]",d="[object String]",b="[object WeakMap]",g="[object ArrayBuffer]",j="[object DataView]",x="[object Float32Array]",m="[object Float64Array]",w="[object Int8Array]",O="[object Int16Array]",A="[object Int32Array]",S="[object Uint8Array]",k="[object Uint8ClampedArray]",E="[object Uint16Array]",P="[object Uint32Array]",M={};M[x]=M[m]=M[w]=M[O]=M[A]=M[S]=M[k]=M[E]=M[P]=!0,M[a]=M[u]=M[g]=M[c]=M[j]=M[f]=M[s]=M[p]=M[l]=M[v]=M[h]=M[y]=M[_]=M[d]=M[b]=!1;var I=Object.prototype,z=I.toString;t.exports=n},function(t,e,r){function n(t){var e=f(t);if(!e&&!u(t))return i(t);var r=a(t),n=!!r,s=r||[],p=s.length;for(var l in t)!o(t,l)||n&&("length"==l||c(l,p))||e&&"constructor"==l||s.push(l);return s}var o=r(14),i=r(34),a=r(48),u=r(18),c=r(49),f=r(51);t.exports=n},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}}])});
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "normalizr/rails"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'normalizr/rails/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "normalizr-rails"
|
8
|
+
spec.version = Normalizr::Rails::VERSION
|
9
|
+
spec.authors = ["Joon Lee"]
|
10
|
+
spec.email = ["joon@act.md"]
|
11
|
+
|
12
|
+
spec.summary = %q{Rails wrapper for normalizr JavaScript library}
|
13
|
+
spec.description = %q{Rails wrapper for normalizr JavaScript library (https://github.com/paularmstrong/normalizr). The version number of this gem follows the version number of the original JavaScript library.}
|
14
|
+
spec.homepage = "https://github.com/actmd/normalizr-rails"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
18
|
+
f.match(%r{^(test|spec|features)/})
|
19
|
+
end
|
20
|
+
spec.bindir = "exe"
|
21
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
|
+
spec.require_paths = ["lib"]
|
23
|
+
|
24
|
+
spec.add_development_dependency "bundler", "~> 1.13"
|
25
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
26
|
+
spec.add_development_dependency "minitest", "~> 5.0"
|
27
|
+
end
|
metadata
ADDED
@@ -0,0 +1,100 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: normalizr-rails
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.2.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Joon Lee
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-11-02 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.13'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.13'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: minitest
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '5.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '5.0'
|
55
|
+
description: Rails wrapper for normalizr JavaScript library (https://github.com/paularmstrong/normalizr).
|
56
|
+
The version number of this gem follows the version number of the original JavaScript
|
57
|
+
library.
|
58
|
+
email:
|
59
|
+
- joon@act.md
|
60
|
+
executables: []
|
61
|
+
extensions: []
|
62
|
+
extra_rdoc_files: []
|
63
|
+
files:
|
64
|
+
- ".gitignore"
|
65
|
+
- ".travis.yml"
|
66
|
+
- Gemfile
|
67
|
+
- LICENSE.txt
|
68
|
+
- README.md
|
69
|
+
- Rakefile
|
70
|
+
- app/assets/javascripts/normalizr.js
|
71
|
+
- bin/console
|
72
|
+
- bin/setup
|
73
|
+
- lib/normalizr/rails.rb
|
74
|
+
- lib/normalizr/rails/version.rb
|
75
|
+
- normalizr-rails.gemspec
|
76
|
+
homepage: https://github.com/actmd/normalizr-rails
|
77
|
+
licenses:
|
78
|
+
- MIT
|
79
|
+
metadata: {}
|
80
|
+
post_install_message:
|
81
|
+
rdoc_options: []
|
82
|
+
require_paths:
|
83
|
+
- lib
|
84
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
89
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
90
|
+
requirements:
|
91
|
+
- - ">="
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
requirements: []
|
95
|
+
rubyforge_project:
|
96
|
+
rubygems_version: 2.6.8
|
97
|
+
signing_key:
|
98
|
+
specification_version: 4
|
99
|
+
summary: Rails wrapper for normalizr JavaScript library
|
100
|
+
test_files: []
|