backbone-associations-rails 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 65883d06d6ef10ec4877577919d59cadc6e4df08
4
- data.tar.gz: 31e495fa9772139d53630d9b317312dbade04040
3
+ metadata.gz: d616699296c2980933bde0877f747bcc169069fc
4
+ data.tar.gz: 6fcec89b13e618e1af25a661c29638b583196782
5
5
  SHA512:
6
- metadata.gz: eb746c09065f531825b7e792946146f7d09ba166d0ef6e29dc9d4bf06ab7f9b10c74a581131adc9a10e0b69ac9cb3f3975f0189c87503ed404be7fae9c7fb34b
7
- data.tar.gz: 43b297c57776cb946725518ee95604ca6d7ae90e3acb03d8e53ba37ab700103312e38b03e6072cf977a57519db1a0c6728892307396f91ace07ed0463ecc7296
6
+ metadata.gz: ef841be302b39200de2d48979cffa63b65248e72e281fd70094997be4149d80c604807dd4fab9dd50bfdacd3c9b818e24ef3ebb9abbc9441a37821dc2b749504
7
+ data.tar.gz: 03934bc3febae9abe070d54999b791c2dcf2d7efb630162c6653e3e12cf9147734b378115191dc47f740c055a9e19f6124acd88b92d97b3252ab7cb55b6a2dd9
data/Rakefile CHANGED
@@ -46,7 +46,7 @@ namespace :backbone_associations do
46
46
 
47
47
  # Update backbone-associations
48
48
  puts "Updating backbone-associations..."
49
- base_url = "https://raw.github.com/dhruvaray/backbone-associations/#{sha}"
49
+ base_url = "https://raw.githubusercontent.com/dhruvaray/backbone-associations/#{sha}"
50
50
  files = %w{backbone-associations.js backbone-associations-min.js backbone-associations.js.map}
51
51
  Dir.chdir './vendor/assets/javascripts' do
52
52
  files.each {|file| `curl -O #{base_url}/#{file}`}
@@ -1,7 +1,7 @@
1
1
  module Backbone
2
2
  module Associations
3
3
  module Rails
4
- VERSION = '0.6.1'
4
+ VERSION = '0.6.2'
5
5
  end
6
6
  end
7
7
  end
@@ -1,16 +1,18 @@
1
- (function(x,f){if("function"===typeof define&&define.amd)define(["underscore","backbone"],function(h,r){return f(x,r,h)});else if("undefined"!==typeof exports){var h=require("underscore"),r=require("backbone");f(x,r,h);"undefined"!==typeof module&&module.exports&&(module.exports=r);exports=r}else f(x,x.Backbone,x._)})(this,function(x,f,h){var r,u,y,z,l,v,F,G,p,C,H,t={};r=f.Model;u=f.Collection;y=r.prototype;l=u.prototype;z=f.Events;f.Associations={VERSION:"0.6.1"};f.Associations.scopes=[];var I=function(){return p},
2
- D=function(a){if(!h.isString(a)||1>h.size(a))a=".";p=a;F=RegExp("[\\"+p+"\\[\\]]+","g");G=RegExp("[^\\"+p+"\\[\\]]+","g")};try{Object.defineProperty(f.Associations,"SEPARATOR",{enumerable:!0,get:I,set:D})}catch(L){}f.Associations.Many=f.Many="Many";f.Associations.One=f.One="One";f.Associations.Self=f.Self="Self";f.Associations.SEPARATOR=".";f.Associations.getSeparator=I;f.Associations.setSeparator=D;f.Associations.EVENTS_BUBBLE=!0;f.Associations.EVENTS_WILDCARD=!0;f.Associations.EVENTS_NC=!1;D();
3
- v=f.AssociatedModel=f.Associations.AssociatedModel=r.extend({relations:void 0,_proxyCalls:void 0,on:function(a,d,c){var b=z.on.apply(this,arguments);if(f.Associations.EVENTS_NC)return b;var s=/\s+/;h.isString(a)&&a&&!s.test(a)&&d&&(s=E(a))&&(t[s]="undefined"===typeof t[s]?1:t[s]+1);return b},off:function(a,d,c){if(f.Associations.EVENTS_NC)return z.off.apply(this,arguments);var b=/\s+/,s=this._events,e={},g=s?h.keys(s):[],m=!a&&!d&&!c,w=h.isString(a)&&!b.test(a);if(m||w)for(var b=0,k=g.length;b<k;b++)e[g[b]]=
4
- s[g[b]]?s[g[b]].length:0;var q=z.off.apply(this,arguments);if(m||w)for(b=0,k=g.length;b<k;b++)(m=E(g[b]))&&(t[m]=s[g[b]]?t[m]-(e[g[b]]-s[g[b]].length):t[m]-e[g[b]]);return q},get:function(a){var d=y.get.call(this,a);return d?d:this._getAttr.apply(this,arguments)},set:function(a,d,c){var b;h.isObject(a)||null==a?(b=a,c=d):(b={},b[a]=d);a=this._set(b,c);this._processPendingEvents();return a},_set:function(a,d){var c,b,f,e,g=this;if(!a)return this;for(c in a)if(b||(b={}),c.match(F)){var m=J(c);e=h.initial(m);
5
- m=m[m.length-1];e=this.get(e);e instanceof v&&(e=b[e.cid]||(b[e.cid]={model:e,data:{}}),e.data[m]=a[c])}else e=b[this.cid]||(b[this.cid]={model:this,data:{}}),e.data[c]=a[c];if(b)for(f in b)e=b[f],this._setAttr.call(e.model,e.data,d)||(g=!1);else g=this._setAttr.call(this,a,d);return g},_setAttr:function(a,d){var c;d||(d={});if(d.unset)for(c in a)a[c]=void 0;this.parents=this.parents||[];this.relations&&h.each(this.relations,function(b){var c=b.key,e=b.relatedModel,g=b.collectionType,m=b.scope||x,
6
- w=b.map,k=this.attributes[c],q=k&&k.idAttribute,n,p,l,t=!1;!e||e.prototype instanceof r||(e=h.isFunction(e)?e.call(this,b,a):e);e&&h.isString(e)&&(e=e===f.Self?this.constructor:A(e,m));w&&h.isString(w)&&(w=A(w,m));p=b.options?h.extend({},b.options,d):d;if(a[c]){n=h.result(a,c);n=w?w.call(this,n,g?g:e):n;if(b.type===f.Many){if(g&&h.isFunction(g)&&g.prototype instanceof r)throw Error("type is of Backbone.Model. Specify derivatives of Backbone.Collection");!g||g.prototype instanceof u||(g=h.isFunction(g)?
7
- g.call(this,b,a):g);g&&h.isString(g)&&(g=A(g,m));if(!e&&!g)throw Error("specify either a relatedModel or collectionType");if(g&&!g.prototype instanceof u)throw Error("collectionType must inherit from Backbone.Collection");k?(k._deferEvents=!0,k[p.reset?"reset":"set"](n instanceof u?n.models:n,p),b=k):(t=!0,n instanceof u?b=n:(b=g?new g:this._createCollection(e,m),b[p.reset?"reset":"set"](n,p)))}else if(b.type===f.One){if(!e)throw Error("specify a relatedModel for Backbone.One type");if(!(e.prototype instanceof
8
- f.AssociatedModel))throw Error("specify an AssociatedModel for Backbone.One type");b=n instanceof v?n:new e(n,p);k&&b.attributes[q]&&k.attributes[q]===b.attributes[q]?(k._deferEvents=!0,k._set(n instanceof v?n.attributes:n,p),b=k):t=!0}else throw Error("type attribute must be specified and have the values Backbone.One or Backbone.Many");l=a[c]=b;if(t||l&&!l._proxyCallback)l._proxyCallback=function(){return f.Associations.EVENTS_BUBBLE&&this._bubbleEvent.call(this,c,l,arguments)},l.on("all",l._proxyCallback,
9
- this)}a.hasOwnProperty(c)&&(k=a[c],q=this.attributes[c],k?(k.parents=k.parents||[],-1==h.indexOf(k.parents,this)&&k.parents.push(this)):q&&0<q.parents.length&&(q.parents=h.difference(q.parents,[this]),q._proxyCallback&&q.off("all",q._proxyCallback,this)))},this);return y.set.call(this,a,d)},_bubbleEvent:function(a,d,c){var b=c[0].split(":"),h=b[0],e="nested-change"==c[0],g="change"===h,m=c[1],l=-1,k=d._proxyCalls,b=b[1],q=!b||-1==b.indexOf(p),n;if(!e&&(q&&(H=E(c[0])||a),f.Associations.EVENTS_NC||
10
- t[H])){if(f.Associations.EVENTS_WILDCARD&&/\[\*\]/g.test(b))return this;d instanceof u&&(g||b)&&(l=d.indexOf(C||m));this instanceof r&&(C=this);b=a+(-1!==l&&(g||b)?"["+l+"]":"")+(b?p+b:"");f.Associations.EVENTS_WILDCARD&&(n=b.replace(/\[\d+\]/g,"[*]"));e=[];e.push.apply(e,c);e[0]=h+":"+b;f.Associations.EVENTS_WILDCARD&&b!==n&&(e[0]=e[0]+" "+h+":"+n);k=d._proxyCalls=k||{};if(this._isEventAvailable.call(this,k,b))return this;k[b]=!0;g&&(this._previousAttributes[a]=d._previousAttributes,this.changed[a]=
11
- d);this.trigger.apply(this,e);f.Associations.EVENTS_NC&&(g&&this.get(b)!=c[2])&&(a=["nested-change",b,c[1]],c[2]&&a.push(c[2]),this.trigger.apply(this,a));k&&b&&delete k[b];C=void 0;return this}},_isEventAvailable:function(a,d){return h.find(a,function(a,b){return-1!==d.indexOf(b,d.length-b.length)})},_createCollection:function(a,d){var c,b=a;h.isString(b)&&(b=A(b,d));if(b&&b.prototype instanceof v||h.isFunction(b))c=new u,c.model=b;else throw Error("type must inherit from Backbone.AssociatedModel");
12
- return c},_processPendingEvents:function(){this._processedEvents||(this._processedEvents=!0,this._deferEvents=!1,h.each(this._pendingEvents,function(a){a.c.trigger.apply(a.c,a.a)}),this._pendingEvents=[],h.each(this.relations,function(a){(a=this.attributes[a.key])&&a._processPendingEvents()},this),delete this._processedEvents)},trigger:function(a){this._deferEvents?(this._pendingEvents=this._pendingEvents||[],this._pendingEvents.push({c:this,a:arguments})):y.trigger.apply(this,arguments)},toJSON:function(a){var d=
13
- {},c;d[this.idAttribute]=this.id;this.visited||(this.visited=!0,d=y.toJSON.apply(this,arguments),a&&a.serialize_keys&&(d=h.pick(d,a.serialize_keys)),this.relations&&h.each(this.relations,function(b){var f=b.key,e=b.remoteKey,g=this.attributes[f],m=!b.isTransient;b=b.serialize||[];delete d[f];m&&(b.length&&(a?a.serialize_keys=b:a={serialize_keys:b}),c=g&&g.toJSON?g.toJSON(a):g,d[e||f]=h.isArray(c)?h.compact(c):c)},this),delete this.visited);return d},clone:function(a){return new this.constructor(this.toJSON(a))},
14
- cleanup:function(){h.each(this.relations,function(a){(a=this.attributes[a.key])&&(a.parents=h.difference(a.parents,[this]))},this);this.off()},_getAttr:function(a){var d=this;a=J(a);var c,b;if(!(1>h.size(a))){for(b=0;b<a.length;b++){c=a[b];if(!d)break;d=d instanceof u?isNaN(c)?void 0:d.at(c):d.attributes[c]}return d}}});var J=function(a){return""===a?[""]:h.isString(a)?a.match(G):a||[]},E=function(a){if(!a)return a;a=a.split(":");return 1<a.length?(a=a[a.length-1],a=a.split(p),1<a.length?a[a.length-
15
- 1].split("[")[0]:a[0].split("[")[0]):""},A=function(a,d){var c,b=[d];b.push.apply(b,f.Associations.scopes);for(var l,e=0,g=b.length;e<g;++e)if(l=b[e])if(c=h.reduce(a.split(p),function(a,b){return a[b]},l))break;return c},K=function(a,d,c){var b,f;h.find(a,function(a){if(b=h.find(a.relations,function(b){return a.get(b.key)===d},this))return f=a,!0},this);return b&&b.map?b.map.call(f,c,d):c},B={};h.each(["set","remove","reset"],function(a){B[a]=u.prototype[a];l[a]=function(d,c){this.model.prototype instanceof
16
- v&&this.parents&&(arguments[0]=K(this.parents,this,d));return B[a].apply(this,arguments)}});B.trigger=l.trigger;l.trigger=function(a){this._deferEvents?(this._pendingEvents=this._pendingEvents||[],this._pendingEvents.push({c:this,a:arguments})):B.trigger.apply(this,arguments)};l._processPendingEvents=v.prototype._processPendingEvents;l.on=v.prototype.on;l.off=v.prototype.off;return f});
1
+ (function(q,f){if("function"===typeof define&&define.amd)define(["underscore","backbone"],function(g,i){return f(q,i,g)});else if("undefined"!==typeof exports){var g=require("underscore"),i=require("backbone");f(q,i,g);"undefined"!==typeof module&&module.exports&&(module.exports=i);exports=i}else f(q,q.Backbone,q._)})(this,function(q,f,g){var i,p,t,w,n,v,D,E,k,z,F,s={};i=f.Model;p=f.Collection;t=i.prototype;n=p.prototype;w=f.Events;f.Associations={VERSION:"0.6.2"};f.Associations.scopes=[];var G=function(){return k},
2
+ A=function(a){if(!g.isString(a)||1>g.size(a))a=".";k=a;D=RegExp("[\\"+k+"\\[\\]]+","g");E=RegExp("[^\\"+k+"\\[\\]]+","g")};try{Object.defineProperty(f.Associations,"SEPARATOR",{enumerable:!0,get:G,set:A})}catch(J){}f.Associations.Many=f.Many="Many";f.Associations.One=f.One="One";f.Associations.Self=f.Self="Self";f.Associations.SEPARATOR=".";f.Associations.getSeparator=G;f.Associations.setSeparator=A;f.Associations.EVENTS_BUBBLE=!0;f.Associations.EVENTS_WILDCARD=!0;f.Associations.EVENTS_NC=!1;A();
3
+ v=f.AssociatedModel=f.Associations.AssociatedModel=i.extend({relations:void 0,_proxyCalls:void 0,constructor:function(a,c){c&&c.__parents__&&(this.parents=[c.__parents__]);i.apply(this,arguments)},on:function(a,c,d){var b=w.on.apply(this,arguments);if(f.Associations.EVENTS_NC)return b;var l=/\s+/;g.isString(a)&&a&&!l.test(a)&&c&&(l=B(a))&&(s[l]="undefined"===typeof s[l]?1:s[l]+1);return b},off:function(a,c,d){if(f.Associations.EVENTS_NC)return w.off.apply(this,arguments);var b=/\s+/,l=this._events,
4
+ e={},h=l?g.keys(l):[],m=!a&&!c&&!d,i=g.isString(a)&&!b.test(a);if(m||i)for(var b=0,j=h.length;b<j;b++)e[h[b]]=l[h[b]]?l[h[b]].length:0;var p=w.off.apply(this,arguments);if(m||i){b=0;for(j=h.length;b<j;b++)(m=B(h[b]))&&(s[m]=l[h[b]]?s[m]-(e[h[b]]-l[h[b]].length):s[m]-e[h[b]])}return p},get:function(a){var c=this.__attributes__,d=t.get.call(this,a),c=c?x(d)?d:c[a]:d;return x(c)?c:this._getAttr.apply(this,arguments)},set:function(a,c,d){var b;g.isObject(a)||null==a?(b=a,d=c):(b={},b[a]=c);a=this._set(b,
5
+ d);this._processPendingEvents();return a},_set:function(a,c){var d,b,l,e,h=this;if(!a)return this;this.__attributes__=a;for(d in a)if(b||(b={}),d.match(D)){var f=H(d);e=g.initial(f);f=f[f.length-1];e=this.get(e);e instanceof i&&(e=b[e.cid]||(b[e.cid]={model:e,data:{}}),e.data[f]=a[d])}else e=b[this.cid]||(b[this.cid]={model:this,data:{}}),e.data[d]=a[d];if(b)for(l in b)e=b[l],this._setAttr.call(e.model,e.data,c)||(h=!1);else h=this._setAttr.call(this,a,c);delete this.__attributes__;return h},_setAttr:function(a,
6
+ c){var d;c||(c={});if(c.unset)for(d in a)a[d]=void 0;this.parents=this.parents||[];this.relations&&g.each(this.relations,function(b){var d=b.key,e=b.scope||q,h=this._transformRelatedModel(b,a),m=this._transformCollectionType(b,h,a),u=g.isString(b.map)?C(b.map,e):b.map,j=this.attributes[d],k=j&&j.idAttribute,o,r,n=!1;o=b.options?g.extend({},b.options,c):c;if(a[d]){e=g.result(a,d);e=u?u.call(this,e,m?m:h):e;if(x(e))if(b.type===f.Many)j?(j._deferEvents=!0,j[o.reset?"reset":"set"](e instanceof p?e.models:
7
+ e,o),h=j):(n=!0,e instanceof p?h=e:(h=this._createCollection(m||p,b.collectionOptions||(h?{model:h}:{})),h[o.reset?"reset":"set"](e,o)));else if(b.type===f.One)b=e instanceof i?e.attributes.hasOwnProperty(k):e.hasOwnProperty(k),m=e instanceof i?e.attributes[k]:e[k],j&&b&&j.attributes[k]===m?(j._deferEvents=!0,j._set(e instanceof i?e.attributes:e,o),h=j):(n=!0,e instanceof i?h=e:(o.__parents__=this,h=new h(e,o),delete o.__parents__));else throw Error("type attribute must be specified and have the values Backbone.One or Backbone.Many");
8
+ else h=e;r=a[d]=h;if(n||r&&!r._proxyCallback)r._proxyCallback||(r._proxyCallback=function(){return f.Associations.EVENTS_BUBBLE&&this._bubbleEvent.call(this,d,r,arguments)}),r.on("all",r._proxyCallback,this)}a.hasOwnProperty(d)&&this._setupParents(a[d],this.attributes[d])},this);return t.set.call(this,a,c)},_bubbleEvent:function(a,c,d){var b=d[0].split(":"),g=b[0],e="nested-change"==d[0],h="change"===g,m=d[1],u=-1,j=c._proxyCalls,b=b[1],n=!b||-1==b.indexOf(k),o;if(!e&&(n&&(F=B(d[0])||a),f.Associations.EVENTS_NC||
9
+ s[F])){if(f.Associations.EVENTS_WILDCARD&&/\[\*\]/g.test(b))return this;if(c instanceof p&&(h||b))u=c.indexOf(z||m);this instanceof i&&(z=this);b=a+(-1!==u&&(h||b)?"["+u+"]":"")+(b?k+b:"");f.Associations.EVENTS_WILDCARD&&(o=b.replace(/\[\d+\]/g,"[*]"));e=[];e.push.apply(e,d);e[0]=g+":"+b;f.Associations.EVENTS_WILDCARD&&b!==o&&(e[0]=e[0]+" "+g+":"+o);j=c._proxyCalls=j||{};if(this._isEventAvailable.call(this,j,b))return this;j[b]=!0;h&&(this._previousAttributes[a]=c._previousAttributes,this.changed[a]=
10
+ c);this.trigger.apply(this,e);f.Associations.EVENTS_NC&&(h&&this.get(b)!=d[2])&&(a=["nested-change",b,d[1]],d[2]&&a.push(d[2]),this.trigger.apply(this,a));j&&b&&delete j[b];z=void 0;return this}},_isEventAvailable:function(a,c){return g.find(a,function(a,b){return-1!==c.indexOf(b,c.length-b.length)})},_setupParents:function(a,c){a&&(a.parents=a.parents||[],-1==g.indexOf(a.parents,this)&&a.parents.push(this));c&&(0<c.parents.length&&c!=a)&&(c.parents=g.difference(c.parents,[this]),c._proxyCallback&&
11
+ c.off("all",c._proxyCallback,this))},_createCollection:function(a,c){var c=g.defaults(c,{model:a.model}),d=new a([],g.isFunction(c)?c.call(this):c);d.parents=[this];return d},_processPendingEvents:function(){this._processedEvents||(this._processedEvents=!0,this._deferEvents=!1,g.each(this._pendingEvents,function(a){a.c.trigger.apply(a.c,a.a)}),this._pendingEvents=[],g.each(this.relations,function(a){(a=this.attributes[a.key])&&a._processPendingEvents&&a._processPendingEvents()},this),delete this._processedEvents)},
12
+ _transformRelatedModel:function(a,c){var d=a.relatedModel,b=a.scope||q;d&&!(d.prototype instanceof i)&&(d=g.isFunction(d)?d.call(this,a,c):d);d&&g.isString(d)&&(d=d===f.Self?this.constructor:C(d,b));if(a.type===f.One){if(!d)throw Error("specify a relatedModel for Backbone.One type");if(!(d.prototype instanceof f.Model))throw Error("specify an AssociatedModel or Backbone.Model for Backbone.One type");}return d},_transformCollectionType:function(a,c,d){var b=a.collectionType,l=a.scope||q;if(b&&g.isFunction(b)&&
13
+ b.prototype instanceof i)throw Error("type is of Backbone.Model. Specify derivatives of Backbone.Collection");b&&!(b.prototype instanceof p)&&(b=g.isFunction(b)?b.call(this,a,d):b);b&&g.isString(b)&&(b=C(b,l));if(b&&!b.prototype instanceof p)throw Error("collectionType must inherit from Backbone.Collection");if(a.type===f.Many&&!c&&!b)throw Error("specify either a relatedModel or collectionType");return b},trigger:function(a){this._deferEvents?(this._pendingEvents=this._pendingEvents||[],this._pendingEvents.push({c:this,
14
+ a:arguments})):t.trigger.apply(this,arguments)},toJSON:function(a){var c={},d;c[this.idAttribute]=this.id;this.visited||(this.visited=!0,c=t.toJSON.apply(this,arguments),a&&a.serialize_keys&&(c=g.pick(c,a.serialize_keys)),this.relations&&g.each(this.relations,function(b){var f=b.key,e=b.remoteKey,h=this.attributes[f],i=!b.isTransient,b=b.serialize||[],k=g.clone(a);delete c[f];i&&(b.length&&(k?k.serialize_keys=b:k={serialize_keys:b}),d=h&&h.toJSON?h.toJSON(k):h,c[e||f]=g.isArray(d)?g.compact(d):d)},
15
+ this),delete this.visited);return c},clone:function(a){return new this.constructor(this.toJSON(a))},cleanup:function(a){a=a||{};g.each(this.relations,function(a){if(a=this.attributes[a.key])a._proxyCallback&&a.off("all",a._proxyCallback,this),a.parents=g.difference(a.parents,[this])},this);!a.listen&&this.off()},destroy:function(a){var a=a?g.clone(a):{},a=g.defaults(a,{remove_references:!0,listen:!0}),c=this;if(a.remove_references&&a.wait){var d=a.success;a.success=function(b){d&&d(c,b,a);c.cleanup(a)}}var b=
16
+ t.destroy.apply(this,[a]);a.remove_references&&!a.wait&&c.cleanup(a);return b},_getAttr:function(a){var c=this,d=this.__attributes__,a=H(a),b,f;if(!(1>g.size(a))){for(f=0;f<a.length;f++){b=a[f];if(!c)break;c=c instanceof p?isNaN(b)?void 0:c.at(b):d?x(c.attributes[b])?c.attributes[b]:d[b]:c.attributes[b]}return c}}});var H=function(a){return""===a?[""]:g.isString(a)?a.match(E):a||[]},B=function(a){if(!a)return a;a=a.split(":");return 1<a.length?(a=a[a.length-1],a=a.split(k),1<a.length?a[a.length-1].split("[")[0]:
17
+ a[0].split("[")[0]):""},C=function(a,c){var d,b=[c];b.push.apply(b,f.Associations.scopes);for(var i,e=0,h=b.length;e<h;++e)if(i=b[e])if(d=g.reduce(a.split(k),function(a,b){return a[b]},i))break;return d},I=function(a,c,d){var b,f;g.find(a,function(a){if(b=g.find(a.relations,function(b){return a.get(b.key)===c},this))return f=a,!0},this);return b&&b.map?b.map.call(f,d,c):d},x=function(a){return!g.isUndefined(a)&&!g.isNull(a)},y={};g.each(["set","remove","reset"],function(a){y[a]=p.prototype[a];n[a]=
18
+ function(c,d){this.model.prototype instanceof v&&this.parents&&(arguments[0]=I(this.parents,this,c));return y[a].apply(this,arguments)}});y.trigger=n.trigger;n.trigger=function(a){this._deferEvents?(this._pendingEvents=this._pendingEvents||[],this._pendingEvents.push({c:this,a:arguments})):y.trigger.apply(this,arguments)};n._processPendingEvents=v.prototype._processPendingEvents;n.on=v.prototype.on;n.off=v.prototype.off;return f});
@@ -1,7 +1,7 @@
1
1
  //
2
- // Backbone-associations.js 0.6.1
2
+ // Backbone-associations.js 0.6.2
3
3
  //
4
- // (c) 2013 Dhruva Ray, Jaynti Kanani, Persistent Systems Ltd.
4
+ // (c) 2014 Dhruva Ray, Jaynti Kanani, Persistent Systems Ltd.
5
5
  // Backbone-associations may be freely distributed under the MIT license.
6
6
  // For all details and documentation:
7
7
  // https://github.com/dhruvaray/backbone-associations/
@@ -51,7 +51,7 @@
51
51
  BackboneEvent = Backbone.Events;
52
52
 
53
53
  Backbone.Associations = {
54
- VERSION: "0.6.1"
54
+ VERSION: "0.6.2"
55
55
  };
56
56
 
57
57
  // Alternative scopes other than root
@@ -108,6 +108,13 @@
108
108
  // and prevent redundant event to be triggered in case of cyclic model graphs.
109
109
  _proxyCalls:undefined,
110
110
 
111
+ // Override constructor to set parents
112
+ constructor: function (attributes, options) {
113
+ // Set parent's opportunistically.
114
+ options && options.__parents__ && (this.parents = [options.__parents__]);
115
+ BackboneModel.apply(this, arguments);
116
+ },
117
+
111
118
  on: function (name, callback, context) {
112
119
 
113
120
  var result = BackboneEvent.on.apply(this, arguments);
@@ -169,8 +176,10 @@
169
176
 
170
177
  // Get the value of an attribute.
171
178
  get:function (attr) {
172
- var obj = ModelProto.get.call(this, attr);
173
- return obj ? obj : this._getAttr.apply(this, arguments);
179
+ var cache = this.__attributes__,
180
+ val = ModelProto.get.call(this, attr),
181
+ obj = cache ? (isValuePresent(val) ? val : cache[attr]) : val;
182
+ return isValuePresent(obj) ? obj : this._getAttr.apply(this, arguments);
174
183
  },
175
184
 
176
185
  // Set a hash of model attributes on the Backbone Model.
@@ -196,6 +205,10 @@
196
205
  _set:function (attributes, options) {
197
206
  var attr, modelMap, modelId, obj, result = this;
198
207
  if (!attributes) return this;
208
+
209
+ // temp cache of attributes
210
+ this.__attributes__ = attributes;
211
+
199
212
  for (attr in attributes) {
200
213
  //Create a map for each unique object whose attributes we want to set
201
214
  modelMap || (modelMap = {});
@@ -203,8 +216,9 @@
203
216
  var pathTokens = getPathArray(attr), initials = _.initial(pathTokens),
204
217
  last = pathTokens[pathTokens.length - 1],
205
218
  parentModel = this.get(initials);
206
- if (parentModel instanceof AssociatedModel) {
207
- obj = modelMap[parentModel.cid] || (modelMap[parentModel.cid] = {'model':parentModel, 'data':{}});
219
+ if (parentModel instanceof BackboneModel) {
220
+ obj = modelMap[parentModel.cid] ||
221
+ (modelMap[parentModel.cid] = {'model': parentModel, 'data': {}});
208
222
  obj.data[last] = attributes[attr];
209
223
  }
210
224
  } else {
@@ -222,6 +236,9 @@
222
236
  } else {
223
237
  result = this._setAttr.call(this, attributes, options);
224
238
  }
239
+
240
+ delete this.__attributes__;
241
+
225
242
  return result;
226
243
 
227
244
  },
@@ -242,108 +259,90 @@
242
259
  // if `relations` are available.
243
260
  _.each(this.relations, function (relation) {
244
261
  var relationKey = relation.key,
245
- relatedModel = relation.relatedModel,
246
- collectionType = relation.collectionType,
247
262
  activationContext = relation.scope || root,
248
- map = relation.map,
263
+ relatedModel = this._transformRelatedModel(relation, attributes),
264
+ collectionType = this._transformCollectionType(relation, relatedModel, attributes),
265
+ map = _.isString(relation.map) ? map2Scope(relation.map, activationContext) : relation.map,
249
266
  currVal = this.attributes[relationKey],
250
267
  idKey = currVal && currVal.idAttribute,
251
268
  val, relationOptions, data, relationValue, newCtx = false;
252
269
 
253
- // Call function if relatedModel is implemented as a function
254
- if (relatedModel && !(relatedModel.prototype instanceof BackboneModel))
255
- relatedModel = _.isFunction(relatedModel) ?
256
- relatedModel.call(this, relation, attributes) :
257
- relatedModel;
258
-
259
- // Get class if relation and map is stored as a string.
260
- if (relatedModel && _.isString(relatedModel)) {
261
- relatedModel = (relatedModel === Backbone.Self) ?
262
- this.constructor :
263
- map2Scope(relatedModel, activationContext);
264
- }
265
-
266
- map && _.isString(map) && (map = map2Scope(map, activationContext));
267
270
  // Merge in `options` specific to this relation.
268
271
  relationOptions = relation.options ? _.extend({}, relation.options, options) : options;
269
272
 
270
273
  if (attributes[relationKey]) {
274
+
271
275
  // Get value of attribute with relation key in `val`.
272
276
  val = _.result(attributes, relationKey);
277
+
273
278
  // Map `val` if a transformation function is provided.
274
279
  val = map ? map.call(this, val, collectionType ? collectionType : relatedModel) : val;
280
+ if (!isValuePresent(val)) {
281
+ data = val;
282
+ } else {
283
+ // If `relation.type` is `Backbone.Many`,
284
+ // Create `Backbone.Collection` with passed data and perform Backbone `set`.
285
+ if (relation.type === Backbone.Many) {
275
286
 
276
- // If `relation.type` is `Backbone.Many`,
277
- // Create `Backbone.Collection` with passed data and perform Backbone `set`.
278
- if (relation.type === Backbone.Many) {
279
-
280
- if (collectionType && _.isFunction(collectionType) &&
281
- (collectionType.prototype instanceof BackboneModel))
282
- throw new Error('type is of Backbone.Model. Specify derivatives of Backbone.Collection');
283
-
284
- // Call function if collectionType is implemented as a function
285
- if (collectionType && !(collectionType.prototype instanceof BackboneCollection))
286
- collectionType = _.isFunction(collectionType) ?
287
- collectionType.call(this, relation, attributes) : collectionType;
288
-
289
- collectionType && _.isString(collectionType) &&
290
- (collectionType = map2Scope(collectionType, activationContext));
291
-
292
- if ((!relatedModel) && (!collectionType))
293
- throw new Error('specify either a relatedModel or collectionType');
294
-
295
- // `collectionType` of defined `relation` should be instance of `Backbone.Collection`.
296
- if (collectionType && !collectionType.prototype instanceof BackboneCollection) {
297
- throw new Error('collectionType must inherit from Backbone.Collection');
298
- }
299
-
300
- if (currVal) {
301
- // Setting this flag will prevent events from firing immediately. That way clients
302
- // will not get events until the entire object graph is updated.
303
- currVal._deferEvents = true;
304
-
305
- // Use Backbone.Collection's `reset` or smart `set` method
306
- currVal[relationOptions.reset ? 'reset' : 'set'](
307
- val instanceof BackboneCollection ? val.models : val, relationOptions);
287
+ if (currVal) {
288
+ // Setting this flag will prevent events from firing immediately. That way clients
289
+ // will not get events until the entire object graph is updated.
290
+ currVal._deferEvents = true;
308
291
 
309
- data = currVal;
292
+ // Use Backbone.Collection's `reset` or smart `set` method
293
+ currVal[relationOptions.reset ? 'reset' : 'set'](
294
+ val instanceof BackboneCollection ? val.models : val, relationOptions);
310
295
 
311
- } else {
312
- newCtx = true;
296
+ data = currVal;
313
297
 
314
- if (val instanceof BackboneCollection) {
315
- data = val;
316
298
  } else {
317
- data = collectionType ?
318
- new collectionType() : this._createCollection(relatedModel, activationContext);
319
- data[relationOptions.reset ? 'reset' : 'set'](val, relationOptions);
299
+ newCtx = true;
300
+
301
+ if (val instanceof BackboneCollection) {
302
+ data = val;
303
+ } else {
304
+ data = this._createCollection(
305
+ collectionType || BackboneCollection,
306
+ relation.collectionOptions || (relatedModel ? {model: relatedModel} : {})
307
+ );
308
+ data[relationOptions.reset ? 'reset' : 'set'](val, relationOptions);
309
+ }
320
310
  }
321
- }
322
311
 
323
- } else if (relation.type === Backbone.One) {
324
-
325
- if (!relatedModel)
326
- throw new Error('specify a relatedModel for Backbone.One type');
312
+ } else if (relation.type === Backbone.One) {
313
+
314
+ var hasOwnProperty = (val instanceof BackboneModel) ?
315
+ val.attributes.hasOwnProperty(idKey) :
316
+ val.hasOwnProperty(idKey);
317
+ var newIdKey = (val instanceof BackboneModel) ?
318
+ val.attributes[idKey] :
319
+ val[idKey];
320
+
321
+ //Is the passed in data for the same key?
322
+ if (currVal && hasOwnProperty &&
323
+ currVal.attributes[idKey] === newIdKey) {
324
+ // Setting this flag will prevent events from firing immediately. That way clients
325
+ // will not get events until the entire object graph is updated.
326
+ currVal._deferEvents = true;
327
+ // Perform the traditional `set` operation
328
+ currVal._set(val instanceof BackboneModel ? val.attributes : val, relationOptions);
329
+ data = currVal;
330
+ } else {
331
+ newCtx = true;
327
332
 
328
- if (!(relatedModel.prototype instanceof Backbone.AssociatedModel))
329
- throw new Error('specify an AssociatedModel for Backbone.One type');
333
+ if (val instanceof BackboneModel) {
334
+ data = val;
335
+ } else {
336
+ relationOptions.__parents__ = this;
337
+ data = new relatedModel(val, relationOptions);
338
+ delete relationOptions.__parents__;
339
+ }
330
340
 
331
- data = val instanceof AssociatedModel ? val : new relatedModel(val, relationOptions);
332
- //Is the passed in data for the same key?
333
- if (currVal && data.attributes[idKey] &&
334
- currVal.attributes[idKey] === data.attributes[idKey]) {
335
- // Setting this flag will prevent events from firing immediately. That way clients
336
- // will not get events until the entire object graph is updated.
337
- currVal._deferEvents = true;
338
- // Perform the traditional `set` operation
339
- currVal._set(val instanceof AssociatedModel ? val.attributes : val, relationOptions);
340
- data = currVal;
341
+ }
341
342
  } else {
342
- newCtx = true;
343
+ throw new Error('type attribute must be specified and ' +
344
+ 'have the values Backbone.One or Backbone.Many');
343
345
  }
344
-
345
- } else {
346
- throw new Error('type attribute must be specified and have the values Backbone.One or Backbone.Many');
347
346
  }
348
347
 
349
348
 
@@ -353,28 +352,19 @@
353
352
  // Add proxy events to respective parents.
354
353
  // Only add callback if not defined or new Ctx has been identified.
355
354
  if (newCtx || (relationValue && !relationValue._proxyCallback)) {
356
- relationValue._proxyCallback = function () {
357
- return Backbone.Associations.EVENTS_BUBBLE &&
358
- this._bubbleEvent.call(this, relationKey, relationValue, arguments);
359
- };
355
+ if(!relationValue._proxyCallback) {
356
+ relationValue._proxyCallback = function () {
357
+ return Backbone.Associations.EVENTS_BUBBLE &&
358
+ this._bubbleEvent.call(this, relationKey, relationValue, arguments);
359
+ };
360
+ }
360
361
  relationValue.on("all", relationValue._proxyCallback, this);
361
362
  }
362
363
 
363
364
  }
364
365
  //Distinguish between the value of undefined versus a set no-op
365
- if (attributes.hasOwnProperty(relationKey)) {
366
- //Maintain reverse pointers - a.k.a parents
367
- var updated = attributes[relationKey];
368
- var original = this.attributes[relationKey];
369
- if (updated) {
370
- updated.parents = updated.parents || [];
371
- (_.indexOf(updated.parents, this) == -1) && updated.parents.push(this);
372
- } else if (original && original.parents.length > 0) { // New value is undefined
373
- original.parents = _.difference(original.parents, [this]);
374
- // Don't bubble to this parent anymore
375
- original._proxyCallback && original.off("all", original._proxyCallback, this);
376
- }
377
- }
366
+ if (attributes.hasOwnProperty(relationKey))
367
+ this._setupParents(attributes[relationKey], this.attributes[relationKey]);
378
368
  }, this);
379
369
  }
380
370
  // Return results for `BackboneModel.set`.
@@ -484,18 +474,27 @@
484
474
  });
485
475
  },
486
476
 
487
- // Returns New `collection` of type `relation.relatedModel`.
488
- _createCollection: function (type, context) {
489
- var collection, relatedModel = type;
490
- _.isString(relatedModel) && (relatedModel = map2Scope(relatedModel, context));
491
- // Creates new `Backbone.Collection` and defines model class.
492
- if (relatedModel && (relatedModel.prototype instanceof AssociatedModel) || _.isFunction(relatedModel)) {
493
- collection = new BackboneCollection();
494
- collection.model = relatedModel;
495
- } else {
496
- throw new Error('type must inherit from Backbone.AssociatedModel');
477
+ //Maintain reverse pointers - a.k.a parents
478
+ _setupParents: function (updated, original) {
479
+ // Set new parent for updated
480
+ if (updated) {
481
+ updated.parents = updated.parents || [];
482
+ (_.indexOf(updated.parents, this) == -1) && updated.parents.push(this);
483
+ }
484
+ // Remove `this` from the earlier set value's parents (if the new value is different).
485
+ if (original && original.parents.length > 0 && original != updated) {
486
+ original.parents = _.difference(original.parents, [this]);
487
+ // Don't bubble to this parent anymore
488
+ original._proxyCallback && original.off("all", original._proxyCallback, this);
497
489
  }
498
- return collection;
490
+ },
491
+
492
+ // Returns new `collection` (or derivatives) of type `options.model`.
493
+ _createCollection: function (type, options) {
494
+ options = _.defaults(options, {model: type.model});
495
+ var c = new type([], _.isFunction(options) ? options.call(this) : options);
496
+ c.parents = [this];
497
+ return c;
499
498
  },
500
499
 
501
500
  // Process all pending events after the entire object graph has been updated
@@ -515,13 +514,78 @@
515
514
  // Traverse down the object graph and call process pending events on sub-trees
516
515
  _.each(this.relations, function (relation) {
517
516
  var val = this.attributes[relation.key];
518
- val && val._processPendingEvents();
517
+ val && val._processPendingEvents && val._processPendingEvents();
519
518
  }, this);
520
519
 
521
520
  delete this._processedEvents;
522
521
  }
523
522
  },
524
523
 
524
+ // Process the raw `relatedModel` value set in a relation
525
+ _transformRelatedModel: function (relation, attributes) {
526
+
527
+ var relatedModel = relation.relatedModel;
528
+ var activationContext = relation.scope || root;
529
+
530
+ // Call function if relatedModel is implemented as a function
531
+ if (relatedModel && !(relatedModel.prototype instanceof BackboneModel))
532
+ relatedModel = _.isFunction(relatedModel) ?
533
+ relatedModel.call(this, relation, attributes) :
534
+ relatedModel;
535
+
536
+ // Get class if relation and map is stored as a string.
537
+ if (relatedModel && _.isString(relatedModel)) {
538
+ relatedModel = (relatedModel === Backbone.Self) ?
539
+ this.constructor :
540
+ map2Scope(relatedModel, activationContext);
541
+ }
542
+
543
+ // Error checking
544
+ if (relation.type === Backbone.One) {
545
+
546
+ if (!relatedModel)
547
+ throw new Error('specify a relatedModel for Backbone.One type');
548
+
549
+ if (!(relatedModel.prototype instanceof Backbone.Model))
550
+ throw new Error('specify an AssociatedModel or Backbone.Model for Backbone.One type');
551
+ }
552
+
553
+ return relatedModel;
554
+ },
555
+
556
+ // Process the raw `collectionType` value set in a relation
557
+ _transformCollectionType: function (relation, relatedModel, attributes) {
558
+
559
+ var collectionType = relation.collectionType;
560
+ var activationContext = relation.scope || root;
561
+
562
+ if (collectionType && _.isFunction(collectionType) &&
563
+ (collectionType.prototype instanceof BackboneModel))
564
+ throw new Error('type is of Backbone.Model. Specify derivatives of Backbone.Collection');
565
+
566
+ // Call function if collectionType is implemented as a function
567
+ if (collectionType && !(collectionType.prototype instanceof BackboneCollection))
568
+ collectionType = _.isFunction(collectionType) ?
569
+ collectionType.call(this, relation, attributes) : collectionType;
570
+
571
+ collectionType && _.isString(collectionType) &&
572
+ (collectionType = map2Scope(collectionType, activationContext));
573
+
574
+ // `collectionType` of defined `relation` should be instance of `Backbone.Collection`.
575
+ if (collectionType && !collectionType.prototype instanceof BackboneCollection) {
576
+ throw new Error('collectionType must inherit from Backbone.Collection');
577
+ }
578
+
579
+ // Error checking
580
+ if (relation.type === Backbone.Many) {
581
+ if ((!relatedModel) && (!collectionType))
582
+ throw new Error('specify either a relatedModel or collectionType');
583
+ }
584
+
585
+ return collectionType;
586
+
587
+ },
588
+
525
589
  // Override trigger to defer events in the object graph.
526
590
  trigger:function (name) {
527
591
  // Defer event processing
@@ -555,7 +619,8 @@
555
619
  remoteKey = relation.remoteKey,
556
620
  attr = this.attributes[key],
557
621
  serialize = !relation.isTransient,
558
- serialize_keys = relation.serialize || []
622
+ serialize_keys = relation.serialize || [],
623
+ _options = _.clone(options);
559
624
 
560
625
  // Remove default Backbone serialization for associations.
561
626
  delete json[key];
@@ -566,12 +631,12 @@
566
631
 
567
632
  // Pass the keys to serialize as options to the toJSON method.
568
633
  if (serialize_keys.length) {
569
- options ?
570
- (options.serialize_keys = serialize_keys) :
571
- (options = {serialize_keys: serialize_keys})
634
+ _options ?
635
+ (_options.serialize_keys = serialize_keys) :
636
+ (_options = {serialize_keys: serialize_keys})
572
637
  }
573
638
 
574
- aJson = attr && attr.toJSON ? attr.toJSON(options) : attr;
639
+ aJson = attr && attr.toJSON ? attr.toJSON(_options) : attr;
575
640
  json[remoteKey || key] = _.isArray(aJson) ? _.compact(aJson) : aJson;
576
641
  }
577
642
 
@@ -591,18 +656,51 @@
591
656
  // Call this if you want to set an `AssociatedModel` to a falsy value like undefined/null directly.
592
657
  // Not calling this will leak memory and have wrong parents.
593
658
  // See test case "parent relations"
594
- cleanup:function () {
659
+ cleanup:function (options) {
660
+ options = options || {};
661
+
595
662
  _.each(this.relations, function (relation) {
596
663
  var val = this.attributes[relation.key];
597
- val && (val.parents = _.difference(val.parents, [this]));
664
+ if(val) {
665
+ val._proxyCallback && val.off("all", val._proxyCallback, this);
666
+ val.parents = _.difference(val.parents, [this]);
667
+ }
598
668
  }, this);
599
- this.off();
669
+
670
+ (!options.listen) && this.off();
671
+ },
672
+
673
+ // Override destroy to perform house-keeping on `parents` collection
674
+ destroy: function(options) {
675
+ options = options ? _.clone(options) : {};
676
+ options = _.defaults(options, {remove_references: true, listen: true});
677
+ var model = this;
678
+
679
+ if(options.remove_references && options.wait) {
680
+ // Proxy success implementation
681
+ var success = options.success;
682
+
683
+ // Substitute with an implementation which will remove references to `model`
684
+ options.success = function (resp) {
685
+ if (success) success(model, resp, options);
686
+ model.cleanup(options);
687
+ }
688
+ }
689
+ // Call the base implementation
690
+ var xhr = ModelProto.destroy.apply(this, [options]);
691
+
692
+ if(options.remove_references && !options.wait) {
693
+ model.cleanup(options);
694
+ }
695
+
696
+ return xhr;
600
697
  },
601
698
 
602
699
  // Navigate the path to the leaf object in the path to query for the attribute value
603
700
  _getAttr:function (path) {
604
701
 
605
702
  var result = this,
703
+ cache = this.__attributes__,
606
704
  //Tokenize the path
607
705
  attrs = getPathArray(path),
608
706
  key,
@@ -614,7 +712,10 @@
614
712
  //Navigate the path to get to the result
615
713
  result = result instanceof BackboneCollection
616
714
  ? (isNaN(key) ? undefined : result.at(key))
617
- : result.attributes[key];
715
+ : (cache ?
716
+ (isValuePresent(result.attributes[key]) ? result.attributes[key] : cache[key]) :
717
+ result.attributes[key]
718
+ );
618
719
  }
619
720
  return result;
620
721
  }
@@ -631,7 +732,7 @@
631
732
 
632
733
  if (!path) return path;
633
734
 
634
- //event_type:<path>
735
+ // event_type:<path>
635
736
  var tokens = path.split(":");
636
737
 
637
738
  if (tokens.length > 1) {
@@ -649,7 +750,7 @@
649
750
  var target,
650
751
  scopes = [context];
651
752
 
652
- //Check global scopes after passed-in context
753
+ // Check global scopes after passed-in context
653
754
  scopes.push.apply(scopes, Backbone.Associations.scopes);
654
755
 
655
756
  for (var ctx, i = 0, l = scopes.length; i < l; ++i) {
@@ -664,7 +765,7 @@
664
765
  };
665
766
 
666
767
 
667
- //Infer the relation from the collection's parents and find the appropriate map for the passed in `models`
768
+ // Infer the relation from the collection's parents and find the appropriate map for the passed in `models`
668
769
  var map2models = function (parents, target, models) {
669
770
  var relation, surrogate;
670
771
  //Iterate over collection's parents
@@ -686,6 +787,11 @@
686
787
  return models;
687
788
  };
688
789
 
790
+ // Utility method to check for null or undefined value
791
+ var isValuePresent = function (value) {
792
+ return (!_.isUndefined(value)) && (!_.isNull(value));
793
+ };
794
+
689
795
  var proxies = {};
690
796
  // Proxy Backbone collection methods
691
797
  _.each(['set', 'remove', 'reset'], function (method) {
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "version":3,
3
3
  "file":"backbone-associations-min.js",
4
- "lineCount":16,
5
- "mappings":"AASC,SAAQ,CAACA,CAAD,CAAOC,CAAP,CAAgB,CAErB,GAAsB,UAAtB,GAAI,MAAOC,OAAX,EAAoCA,MAAAC,IAApC,CACID,MAAA,CAAO,CAAC,YAAD,CAAe,UAAf,CAAP,CAAmC,QAAQ,CAACE,CAAD,CAAIC,CAAJ,CAAc,CAGrD,MAAOJ,EAAA,CAAQD,CAAR,CAAcK,CAAd,CAAwBD,CAAxB,CAH8C,CAAzD,CADJ,KAQO,IAAuB,WAAvB,GAAI,MAAOE,QAAX,CAAoC,CAAA,IACnCF,EAAIG,OAAA,CAAQ,YAAR,CAD+B,CAEnCF,EAAWE,OAAA,CAAQ,UAAR,CACfN,EAAA,CAAQD,CAAR,CAAcK,CAAd,CAAwBD,CAAxB,CACsB,YAAtB,GAAI,MAAOI,OAAX,EAAqCA,MAAAF,QAArC,GACIE,MAAAF,QADJ,CACqBD,CADrB,CAGAC,QAAA,CAAUD,CAP6B,CAApC,IAWHJ,EAAA,CAAQD,CAAR,CAAcA,CAAAK,SAAd,CAA6BL,CAAAI,EAA7B,CArBiB,CAAxB,CAAA,CAwBC,IAxBD,CAwBO,QAAQ,CAACJ,CAAD,CAAOK,CAAP,CAAiBD,CAAjB,CAAoB,CAAA,IAQ5BK,CAR4B,CAQbC,CARa,CAQOC,CARP,CAQ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,CAElB9L,EAAA,CAAgB8L,CAAhB,CAAA;AAA0B,QAAS,CAAClF,CAAD,CAAS1E,CAAT,CAAkB,CAE7C,IAAAmD,MAAA3E,UAAJ,WAAoCT,EAApC,EAAuD,IAAAmC,QAAvD,GAEIE,SAAA,CAAU,CAAV,CAFJ,CAEmBiJ,CAAA,CAAW,IAAAnJ,QAAX,CAAyB,IAAzB,CAA+BwE,CAA/B,CAFnB,CAIA,OAAOiF,EAAA,CAAQC,CAAR,CAAAzJ,MAAA,CAAsB,IAAtB,CAA4BC,SAA5B,CAN0C,CAHJ,CAArD,CAcAuJ,EAAA,QAAA,CAAqB7L,CAAA,QACrBA,EAAA,QAAA,CAA6B,QAAS,CAACwC,CAAD,CAAO,CACrC,IAAAkE,aAAJ,EACI,IAAA2C,eAEA,CAFsB,IAAAA,eAEtB,EAF6C,EAE7C,CAAA,IAAAA,eAAAhB,KAAA,CAAyB,GAAG,IAAH,GAAW/F,SAAX,CAAzB,CAHJ,EAKIuJ,CAAA,QAAAxJ,MAAA,CAAyB,IAAzB,CAA+BC,SAA/B,CANqC,CAW7CtC,EAAAwE,sBAAA,CAAwCvE,CAAAS,UAAA8D,sBACxCxE,EAAAuC,GAAA,CAAqBtC,CAAAS,UAAA6B,GACrBvC,EAAAgD,IAAA,CAAsB/C,CAAAS,UAAAsC,IAEtB,OAAOxD,EAzxByB,CAxBnC;",
6
6
  "sources":["backbone-associations.js"],
7
- "names":["root","factory","define","amd","_","Backbone","exports","require","module","BackboneModel","BackboneCollection","ModelProto","BackboneEvent","CollectionProto","AssociatedModel","pathChecker","delimiters","pathSeparator","sourceModel","sourceKey","endPoints","Model","Collection","prototype","Events","Associations","scopes","getSeparator","setSeparator","value","isString","size","RegExp","Object","defineProperty","e","Many","One","Self","SEPARATOR","EVENTS_BUBBLE","EVENTS_WILDCARD","EVENTS_NC","extend","undefined","on","name","callback","context","result","apply","arguments","eventSplitter","test","endPoint","getPathEndPoint","off","events","_events","listeners","names","keys","all","atomic_event","i","l","length","get","attr","obj","call","_getAttr","set","key","options","attributes","isObject","_set","_processPendingEvents","modelMap","modelId","match","pathTokens","getPathArray","initials","initial","last","parentModel","cid","data","_setAttr","model","unset","parents","relations","each","relation","relationKey","relatedModel","collectionType","activationContext","scope","map","currVal","idKey","idAttribute","val","relationOptions","relationValue","newCtx","isFunction","constructor","map2Scope","type","Error","_deferEvents","reset","models","_createCollection","_proxyCallback","relationValue._proxyCallback","_bubbleEvent","hasOwnProperty","updated","original","indexOf","push","difference","eventArguments","opt","split","eventType","catch_all","isChangeEvent","eventObject","indexEventObject","_proxyCalls","eventPath","eSrc","basecolEventPath","replace","cargs","_isEventAvailable","_previousAttributes","changed","trigger","ncargs","path","find","eventKey","collection","_processedEvents","_pendingEvents","c","a","toJSON","json","aJson","id","visited","serialize_keys","pick","remoteKey","serialize","isTransient","isArray","compact","clone","cleanup","attrs","isNaN","at","tokens","target","ctx","reduce","memo","elem","map2models","surrogate","parent","rel","proxies","method"]
7
+ "names":["root","factory","define","amd","_","Backbone","exports","require","module","BackboneModel","BackboneCollection","ModelProto","BackboneEvent","CollectionProto","AssociatedModel","pathChecker","delimiters","pathSeparator","sourceModel","sourceKey","endPoints","Model","Collection","prototype","Events","Associations","scopes","getSeparator","setSeparator","value","isString","size","RegExp","Object","defineProperty","e","Many","One","Self","SEPARATOR","EVENTS_BUBBLE","EVENTS_WILDCARD","EVENTS_NC","extend","undefined","constructor","attributes","options","__parents__","parents","apply","arguments","on","name","callback","context","result","eventSplitter","test","endPoint","getPathEndPoint","off","events","_events","listeners","names","keys","all","atomic_event","i","l","length","get","attr","cache","__attributes__","val","call","obj","isValuePresent","_getAttr","set","key","isObject","_set","_processPendingEvents","modelMap","modelId","match","pathTokens","getPathArray","initials","initial","last","parentModel","cid","data","_setAttr","model","unset","relations","each","relation","relationKey","activationContext","scope","relatedModel","_transformRelatedModel","collectionType","_transformCollectionType","map","map2Scope","currVal","idKey","idAttribute","relationOptions","relationValue","newCtx","type","_deferEvents","reset","models","_createCollection","collectionOptions","hasOwnProperty","newIdKey","Error","_proxyCallback","relationValue._proxyCallback","_bubbleEvent","_setupParents","eventArguments","opt","split","eventType","catch_all","isChangeEvent","eventObject","indexEventObject","_proxyCalls","eventPath","eSrc","indexOf","basecolEventPath","replace","cargs","push","_isEventAvailable","_previousAttributes","changed","trigger","ncargs","path","find","eventKey","updated","original","difference","defaults","c","isFunction","_processedEvents","_pendingEvents","a","toJSON","json","aJson","id","visited","serialize_keys","pick","remoteKey","serialize","isTransient","_options","clone","isArray","compact","cleanup","listen","destroy","remove_references","wait","success","options.success","resp","xhr","attrs","isNaN","at","tokens","target","ctx","reduce","memo","elem","map2models","surrogate","parent","rel","isUndefined","isNull","proxies","method"]
8
8
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: backbone-associations-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stafford Brunk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-24 00:00:00.000000000 Z
11
+ date: 2014-11-20 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Backbone-associations provides a way of specifying 1:1 and 1:N relationships
14
14
  between Backbone models. Additionally, parent model instances (and objects extended
@@ -20,7 +20,7 @@ executables: []
20
20
  extensions: []
21
21
  extra_rdoc_files: []
22
22
  files:
23
- - .gitignore
23
+ - ".gitignore"
24
24
  - Gemfile
25
25
  - LICENSE.txt
26
26
  - README.md
@@ -41,17 +41,17 @@ require_paths:
41
41
  - lib
42
42
  required_ruby_version: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - '>='
44
+ - - ">="
45
45
  - !ruby/object:Gem::Version
46
46
  version: '0'
47
47
  required_rubygems_version: !ruby/object:Gem::Requirement
48
48
  requirements:
49
- - - '>='
49
+ - - ">="
50
50
  - !ruby/object:Gem::Version
51
51
  version: '0'
52
52
  requirements: []
53
53
  rubyforge_project:
54
- rubygems_version: 2.0.14
54
+ rubygems_version: 2.2.2
55
55
  signing_key:
56
56
  specification_version: 4
57
57
  summary: Packages the backbone.associations library for use with the asset pipline