transistor 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 38fb5023d99658503f8e850dad52d2007bc21a74
4
- data.tar.gz: 5efd7e1a39bce05a841d4b2fe2782e2c64a527a9
3
+ metadata.gz: 13bd16d56516dfac6937434d665747d47feb5670
4
+ data.tar.gz: 72a09a02bce338965b7372834712c21e85d9c27d
5
5
  SHA512:
6
- metadata.gz: 6b3e0f34d9caf895dea9b0712291a408429363ef4b3d055da9b14fd77b9df2a44588e02984f647fd57b9a379fe333f1fb6ddfe207c86b643080c33bf3471a201
7
- data.tar.gz: 9b85d2026d2371d1c33c7713b3d54fcbf2dea4f5851c3ca840cb57f88fb7cd6194fd2c44a0225b1f536661dd8d402a58dcf75fed84861dbb0fd17806870c75ff
6
+ metadata.gz: c2060b5cfa2de000ebc9ae33b5b0d8bec20f2da752bc3a08ac5a5d067c6df3a72cd99227339b9aecdfee65b2a014234aa042c030ee4d6888b5f5a57baf5b8934
7
+ data.tar.gz: a124b6f4552084681b7b2f40626a44ff76c34a9ca0c80a160f9d8a42d3a364cdf9b5b0f5d603d1d152e351d853bf4d18849186afbc9f32399034553e5e5a4161
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- transistor (0.1.6)
4
+ transistor (0.1.7)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -161,6 +161,7 @@ to the Collection in creation:
161
161
  // control is also initialized
162
162
 
163
163
  var collection = Transistor.Backbone.Collection({
164
+ backbone: Backbone,
164
165
  channel: 'the/news',
165
166
  radio: radio,
166
167
  control: control
@@ -1 +1 @@
1
- if(window.Transistor===undefined){window.Transistor={}}(function(i){var o=(function(){return function(k){var e,m,f,p,b,d,g,n;e=k.channel;m=k.radio;f=k.control;p=(function(){return{}}());b=new Backbone.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 l=true,j=function(c){h[c]=(function(a){return function(){if(l){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){l=false;a();l=true};j('add');j('remove');j('reset');j('set')}(b));n=i.Binder({set:function(h){d.asPublic(function(){var c=_.map(h,function(a){return new Backbone.Model(a)});b.set(c)})},insert:function(a){d.asPublic(function(){b.add(new Backbone.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)})}});m.tune(e,n);return b}}());if(i.Backbone===undefined){i.Backbone={}}i.Backbone.Collection=o}(window.Transistor));
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));
@@ -7,8 +7,9 @@ if (window.Transistor === undefined) {
7
7
  (function (transistor) {
8
8
  var BackboneCollection = (function () {
9
9
  return function (options) {
10
- var channel, radio, control, H, backbone_collection, collection_interface, control_interface, binder;
10
+ var Backbone, channel, radio, control, H, backbone_collection, collection_interface, control_interface, binder;
11
11
 
12
+ Backbone = options.backbone;
12
13
  channel = options.channel;
13
14
  radio = options.radio;
14
15
  control = options.control;
@@ -7,8 +7,9 @@ if (window.Transistor === undefined) {
7
7
  (function (transistor) {
8
8
  var BackboneCollection = (function () {
9
9
  return function (options) {
10
- var channel, radio, control, H, backbone_collection, collection_interface, control_interface, binder;
10
+ var Backbone, channel, radio, control, H, backbone_collection, collection_interface, control_interface, binder;
11
11
 
12
+ Backbone = options.backbone;
12
13
  channel = options.channel;
13
14
  radio = options.radio;
14
15
  control = options.control;
@@ -7,8 +7,9 @@ if (window.Transistor === undefined) {
7
7
  (function (transistor) {
8
8
  var BackboneCollection = (function () {
9
9
  return function (options) {
10
- var channel, radio, control, H, backbone_collection, collection_interface, control_interface, binder;
10
+ var Backbone, channel, radio, control, H, backbone_collection, collection_interface, control_interface, binder;
11
11
 
12
+ Backbone = options.backbone;
12
13
  channel = options.channel;
13
14
  radio = options.radio;
14
15
  control = options.control;
@@ -20,6 +20,7 @@ describe("Transistor.Backbone.Collection", function () {
20
20
  }());
21
21
 
22
22
  collection = new Transistor.Backbone.Collection({
23
+ backbone: Backbone;
23
24
  channel: 'news',
24
25
  radio: radio
25
26
  })
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.6"
5
+ spec.version = "0.1.7"
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.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jakob Holderbaum