transistor 0.1.7 → 0.1.8

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: 13bd16d56516dfac6937434d665747d47feb5670
4
- data.tar.gz: 72a09a02bce338965b7372834712c21e85d9c27d
3
+ metadata.gz: 5242812c3750c6ee59145051f4c6d2d59acd23fa
4
+ data.tar.gz: 846c98563b15147ca787ae4e404cbaddb48f31ff
5
5
  SHA512:
6
- metadata.gz: c2060b5cfa2de000ebc9ae33b5b0d8bec20f2da752bc3a08ac5a5d067c6df3a72cd99227339b9aecdfee65b2a014234aa042c030ee4d6888b5f5a57baf5b8934
7
- data.tar.gz: a124b6f4552084681b7b2f40626a44ff76c34a9ca0c80a160f9d8a42d3a364cdf9b5b0f5d603d1d152e351d853bf4d18849186afbc9f32399034553e5e5a4161
6
+ metadata.gz: 81d53501ae3943a0a11d1e6f17b19df1987488a971d7a94fea45aa5b36275c3b1a4a07c717108ecb6b2ec617b483af284c9b11486228ed0b9d86ef39216882fe
7
+ data.tar.gz: 599a2d62bdf1b622b5016deed58c637dc0c5a9929221d8905f0eac4b27cb47b678c230e6d0204422a251b0bc8db8f2af80ad9fcc5484b18d7401a28ce7d9e1c0
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- transistor (0.1.7)
4
+ transistor (0.1.8)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1 +1 @@
1
- if(window.Transistor===undefined){window.Transistor={}}(function(i){var p=(function(){return function(j){var k,e,n,f,q,b,d,g,o;k=j.backbone;e=j.channel;n=j.radio;f=j.control;q=(function(){return{}}());b=new k.Collection();d={add:b.add,remove:b.remove,reset:b.reset,set:b.set};g={add:function(a){f.insert(e,a)},remove:function(a){f.remove(e,a.id)},set:function(a){f.set(e,a)}};g.reset=g.set;(function(h){var m=true,l=function(c){h[c]=(function(a){return function(){if(m){if(!f){throw"BackboneCollection is not mutable by user.";}else{g[a].apply(g,arguments)}}else{return d[a].apply(b,arguments)}}}(c))};d.asPublic=function(a){m=false;a();m=true};l('add');l('remove');l('reset');l('set')}(b));o=i.Binder({set:function(h){d.asPublic(function(){var c=_.map(h,function(a){return new k.Model(a)});b.set(c)})},insert:function(a){d.asPublic(function(){b.add(new k.Model(a))})},update:function(c,h){d.asPublic(function(){var a=b.get(c);a.clear({silent:true});a.set(h)})},remove:function(c){d.asPublic(function(){var a=b.get(c);b.remove(a)})}});n.tune(e,o);return b}}());if(i.Backbone===undefined){i.Backbone={}}i.Backbone.Collection=p}(window.Transistor));
1
+ if(window.Transistor===undefined){window.Transistor={}}(function(i){var p=(function(){return function(j){var k,f,n,g,q,b,d,h,o;k=j.backbone;f=j.channel;n=j.radio;g=j.control;q=(function(){return{}}());b=new k.Collection();d={add:b.add,remove:b.remove,reset:b.reset,set:b.set};h={add:function(a){g.insert(f,a)},remove:function(a){g.remove(f,a.id)},set:function(a){g.set(f,a)}};h.reset=h.set;(function(e){var m=true,l=function(c){e[c]=(function(a){return function(){if(m){if(!g){throw"BackboneCollection is not mutable by user.";}else{h[a].apply(h,arguments)}}else{return d[a].apply(b,arguments)}}}(c))};d.asPublic=function(a){m=false;a();m=true};l('add');l('remove');l('reset');l('set')}(b));o=i.Binder({set:function(e){d.asPublic(function(){var a=[],c;for(c=0;c<e.length;c+=1){a.push(new k.Model(e[c]))}b.set(a)})},insert:function(a){d.asPublic(function(){b.add(new k.Model(a))})},update:function(c,e){d.asPublic(function(){var a=b.get(c);a.clear({silent:true});a.set(e)})},remove:function(c){d.asPublic(function(){var a=b.get(c);b.remove(a)})}});n.tune(f,o);return b}}());if(i.Backbone===undefined){i.Backbone={}}i.Backbone.Collection=p}(window.Transistor));
@@ -69,9 +69,12 @@ if (window.Transistor === undefined) {
69
69
  binder = transistor.Binder({
70
70
  set: function (collection) {
71
71
  collection_interface.asPublic(function () {
72
- var models = _.map(collection, function (entry) {
73
- return new Backbone.Model(entry);
74
- });
72
+ var models = [], i;
73
+
74
+ for (i = 0; i < collection.length; i += 1) {
75
+ models.push(new Backbone.Model(collection[i]));
76
+ }
77
+
75
78
  backbone_collection.set(models);
76
79
  });
77
80
  },
@@ -69,9 +69,12 @@ if (window.Transistor === undefined) {
69
69
  binder = transistor.Binder({
70
70
  set: function (collection) {
71
71
  collection_interface.asPublic(function () {
72
- var models = _.map(collection, function (entry) {
73
- return new Backbone.Model(entry);
74
- });
72
+ var models = [], i;
73
+
74
+ for (i = 0; i < collection.length; i += 1) {
75
+ models.push(new Backbone.Model(collection[i]));
76
+ }
77
+
75
78
  backbone_collection.set(models);
76
79
  });
77
80
  },
@@ -69,9 +69,12 @@ if (window.Transistor === undefined) {
69
69
  binder = transistor.Binder({
70
70
  set: function (collection) {
71
71
  collection_interface.asPublic(function () {
72
- var models = _.map(collection, function (entry) {
73
- return new Backbone.Model(entry);
74
- });
72
+ var models = [], i;
73
+
74
+ for (i = 0; i < collection.length; i += 1) {
75
+ models.push(new Backbone.Model(collection[i]));
76
+ }
77
+
75
78
  backbone_collection.set(models);
76
79
  });
77
80
  },
@@ -20,7 +20,7 @@ describe("Transistor.Backbone.Collection", function () {
20
20
  }());
21
21
 
22
22
  collection = new Transistor.Backbone.Collection({
23
- backbone: Backbone;
23
+ backbone: Backbone,
24
24
  channel: 'news',
25
25
  radio: radio
26
26
  })
@@ -62,6 +62,7 @@ describe("Transistor.Backbone.Collection", function () {
62
62
  }());
63
63
 
64
64
  collection = Transistor.Backbone.Collection({
65
+ backbone: Backbone,
65
66
  channel: 'news',
66
67
  radio: radio,
67
68
  control: control
data/transistor.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "transistor"
5
- spec.version = "0.1.7"
5
+ spec.version = "0.1.8"
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.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jakob Holderbaum