transistor 0.1.12 → 0.1.13

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: 26c4978b8aff1f37bd9f221e81c3bc8f8512dae1
4
- data.tar.gz: 6f0ced1c834e8fd20228618b1fa16e1e1bcaaf3d
3
+ metadata.gz: 2d178c3147bacf80e1c61f14dd8ecd04fed439e7
4
+ data.tar.gz: 2453e312f4f8d6464c102c7b75ef335da734bfba
5
5
  SHA512:
6
- metadata.gz: a9abb7b84a6290f0d0b0ff3a6019b30514631dab98a7f40a5f909bda8e1be01fc8edfc46cd341c248bdd660c3dc23c789ed62644ae6b45dc7ee5b60c6e57e6f2
7
- data.tar.gz: b3554103a8e4ecc8f43d2b1f7ce10401a361d0d3b608e78b86d4ddb3ec5d1269c3a734fdd0d7d33c81b751713d4aefe75c03b2918ddef3d62786dec5255e25e4
6
+ metadata.gz: 785123f561c28cd6a201337b568eba543e5fe7727702855864110599b6640237733335178e2e392a2c5602a16077e95ecafa69380c2edfdd7710bcd80ac3838e
7
+ data.tar.gz: 112d86e77d2a34378f3dafcc7ad2e76b37be20fb9ceb07a469a47bec82179c7ff8203a055c7e372d9ae0615ec746a1868bcfa4a4b9d5977a2bdf36db4662a1c2
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- transistor (0.1.12)
4
+ transistor (0.1.13)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1 +1 @@
1
- if(window.Transistor===undefined){window.Transistor={}}(function(k){var r=(function(){return function(e){var l,o,h,p,f,s,b,g,i,q,n;l=e.backbone;o=e.underscore;h=e.channel;p=e.radio;f=e.control;s=(function(){return{}}());b=new l.Collection();b.on('change',function(a,c){var d=o.clone(a.attributes),j=a.id;if(c.from_radiotower===undefined){if(!f){throw"BackboneCollection is not mutable by user. The model with id "+a.id+" has been changed";}else{delete d.id;f.update(h,j,d)}}});g={add:b.add,remove:b.remove,reset:b.reset,set:b.set};i={add:function(a){f.insert(h,a)},remove:function(a){f.remove(h,a.id)},set:function(a){f.set(h,a)}};i.reset=i.set;(function(d){var j=true,m=function(c){d[c]=(function(a){return function(){if(j){if(!f){throw"BackboneCollection is not mutable by user.";}else{i[a].apply(i,arguments)}}else{return g[a].apply(b,arguments)}}}(c))};g.asPublic=function(a){j=false;a();j=true};m('add');m('remove');m('reset');m('set')}(b));n=function(d){g.asPublic(function(){var a=[],c;for(c=0;c<d.length;c+=1){a.push(new l.Model(d[c]))}b.set(a)})};q=k.Binder({init:function(a){n(a);if(e.on_init!==undefined){e.on_init(b)}},set:n,insert:function(a){g.asPublic(function(){b.add(new l.Model(a))})},update:function(c,d){g.asPublic(function(){var a=b.get(c);a.clear({silent:true});a.set(d,{from_radiotower:true})})},remove:function(c){g.asPublic(function(){var a=b.get(c);b.remove(a)})}});p.tune(h,q);return b}}());if(k.Backbone===undefined){k.Backbone={}}k.Backbone.Collection=r}(window.Transistor));
1
+ if(window.Transistor===undefined){window.Transistor={}}(function(k){var q=(function(){return function(e){var l,r,h,o,f,s,b,g,i,p,n;l=e.backbone;r=e.underscore;h=e.channel;o=e.radio;f=e.control;s=(function(){return{}}());b=new l.Collection();b.on('change',function(a,c){var d=(a.get('object')||{}),j=a.id;if(c.from_radiotower===undefined){if(!f){throw"BackboneCollection is not mutable by user. The model with id "+a.id+" has been changed";}else{delete d.id;f.update(h,j,d)}}});g={add:b.add,remove:b.remove,reset:b.reset,set:b.set};i={add:function(a){f.insert(h,a)},remove:function(a){f.remove(h,a.id)},set:function(a){f.set(h,a)}};i.reset=i.set;(function(d){var j=true,m=function(c){d[c]=(function(a){return function(){if(j){if(!f){throw"BackboneCollection is not mutable by user.";}else{i[a].apply(i,arguments)}}else{return g[a].apply(b,arguments)}}}(c))};g.asPublic=function(a){j=false;a();j=true};m('add');m('remove');m('reset');m('set')}(b));n=function(d){g.asPublic(function(){var a=[],c;for(c=0;c<d.length;c+=1){a.push(new l.Model(d[c]))}b.set(a)})};p=k.Binder({init:function(a){n(a);if(e.on_init!==undefined){e.on_init(b)}},set:n,insert:function(a){g.asPublic(function(){b.add(new l.Model(a))})},update:function(c,d){g.asPublic(function(){var a=b.get(c);a.clear({silent:true});a.set(d,{from_radiotower:true})})},remove:function(c){g.asPublic(function(){var a=b.get(c);b.remove(a)})}});o.tune(h,p);return b}}());if(k.Backbone===undefined){k.Backbone={}}k.Backbone.Collection=q}(window.Transistor));
@@ -23,7 +23,7 @@ if (window.Transistor === undefined) {
23
23
 
24
24
  backbone_collection = new Backbone.Collection();
25
25
  backbone_collection.on('change', function (model, options) {
26
- var entry = U.clone(model.attributes),
26
+ var entry = (model.get('object') || {}),
27
27
  id = model.id;
28
28
 
29
29
  if (options.from_radiotower === undefined) {
@@ -23,7 +23,7 @@ if (window.Transistor === undefined) {
23
23
 
24
24
  backbone_collection = new Backbone.Collection();
25
25
  backbone_collection.on('change', function (model, options) {
26
- var entry = U.clone(model.attributes),
26
+ var entry = (model.get('object') || {}),
27
27
  id = model.id;
28
28
 
29
29
  if (options.from_radiotower === undefined) {
@@ -23,7 +23,7 @@ if (window.Transistor === undefined) {
23
23
 
24
24
  backbone_collection = new Backbone.Collection();
25
25
  backbone_collection.on('change', function (model, options) {
26
- var entry = U.clone(model.attributes),
26
+ var entry = (model.get('object') || {}),
27
27
  id = model.id;
28
28
 
29
29
  if (options.from_radiotower === undefined) {
@@ -126,14 +126,14 @@ describe("Transistor.Backbone.Collection", function () {
126
126
  });
127
127
 
128
128
  it('delegates model change events to update', function () {
129
- radio.trigger('news', 'init', [{id: 100, a:2, b:3}, {id: 101, a:12, b:23}]);
129
+ radio.trigger('news', 'init', [{id: 100, a:2, b:3}, {id: 101, object: 133, a:12, b:23}]);
130
130
 
131
131
  var model = collection.get(101);
132
132
 
133
- model.set('a', 24);
133
+ model.set('object', {attr: 24});
134
134
 
135
135
  assertEqual(control.calls, [
136
- ['update', ['news', 101, {a: 24, b:23}]]
136
+ ['update', ['news', 101, {attr: 24}]]
137
137
  ]);
138
138
  })
139
139
  });
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "transistor"
5
- spec.version = "0.1.12"
5
+ spec.version = "0.1.13"
6
6
 
7
7
  spec.authors = ["Jakob Holderbaum"]
8
8
  spec.email = ["jakob@featurefabrik.de"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: transistor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12
4
+ version: 0.1.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jakob Holderbaum