backbone-support 0.5.0 → 0.5.1

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: e9ffe52a5316ecd3a32212b66cfa6cdfb530ef8e
4
- data.tar.gz: 4cc867fc3ece887b2f73fc3dc216c705e4e7b48c
3
+ metadata.gz: bd37786e6d96a13a39bf95ec3ad6cbf0eda91457
4
+ data.tar.gz: 9f12f3b1c03a9591def5bcc98b33d5d11f2e43a4
5
5
  SHA512:
6
- metadata.gz: af84d8073f5b27a768b341dce5852f9ac1d8799ac8ee3be0c4c30a7bbf41aca6e7905f20387ece1364c9784e461856f5bf41e058c8d5a91cf7f324b8d04eceb7
7
- data.tar.gz: 65e5644b534351753aaf045c3ecd8edfcc330613d228bcf6f331dfa9bda5f96ee1afa1f0a6d483340634b842dd4134813aeead2935eac6148d9803717f83392f
6
+ metadata.gz: 5e11a417f12d2d5a815e7a3c7714e7d9dc0e2e182726d320932a58f13f04ad0b0600a4e333546ae8e490c6604c33f74c6f5585489f57b1fe61728d840c63b98f
7
+ data.tar.gz: b631bd137a26d3c82a435d2b4229f5f4837ad022b1af4764f59d49fd64d2572519df099769b93c19046aaddde97f8a03ba36c5fddd158d21da92a1a5800cf328
data/CHANGELOG CHANGED
@@ -1,3 +1,8 @@
1
+ 0.5.1 (Feb 23, 2015)
2
+
3
+ - Stop using deprecated APIs internally and switch to `stopListening` and
4
+ `listenTo`.
5
+
1
6
  0.5.0 (Feb 16, 2015)
2
7
 
3
8
  - Update Backbone to v1.1.2
@@ -10,6 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.homepage = 'http://github.com/thoughtbot/backbone-support'
11
11
  s.summary = 'SwappingController and CompositeView for Backbone.js'
12
12
  s.description = 'SwappingController and CompositeView for Backbone.js'
13
+ s.license = "MIT"
13
14
 
14
15
  s.files = `git ls-files`.split("\n")
15
16
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
@@ -17,6 +18,6 @@ Gem::Specification.new do |s|
17
18
  s.require_paths = ["lib"]
18
19
 
19
20
  s.add_development_dependency('jasmine', '~> 2.0')
20
- s.add_development_dependency('rake')
21
- s.add_development_dependency('headless')
21
+ s.add_development_dependency("rake", "~> 10.4")
22
+ s.add_development_dependency("headless", "~> 1.0")
22
23
  end
@@ -7,7 +7,7 @@ _.extend(Support.CompositeView.prototype, Backbone.View.prototype, Support.Obser
7
7
  leave: function() {
8
8
  this.trigger('leave');
9
9
  this.unbind();
10
- this.unbindFromAll();
10
+ this.stopListening();
11
11
  this.remove();
12
12
  this._leaveChildren();
13
13
  this._removeFromParent();
@@ -1,3 +1,3 @@
1
1
  module BackboneSupport
2
- VERSION = "0.5.0".freeze
2
+ VERSION = "0.5.1".freeze
3
3
  end
@@ -216,14 +216,14 @@ describe("Support.CompositeView", function() {
216
216
  expect(view.children.size()).toEqual(1);
217
217
  });
218
218
 
219
- it("removes any bindings that were bound via bindTo", function() {
219
+ it("stops listening to events on other objects", function() {
220
220
  var model1 = new Backbone.Model({}),
221
221
  model2 = new Backbone.Model({}),
222
222
  eventListener = sinon.spy(),
223
223
  bindToView = new (Support.CompositeView.extend({
224
224
  initialize: function(options) {
225
- this.bindTo(options.model1, 'change', eventListener);
226
- this.bindTo(options.model2, 'change', eventListener);
225
+ this.listenTo(options.model1, "change", eventListener);
226
+ this.listenTo(options.model2, "change", eventListener);
227
227
  }
228
228
  }))({
229
229
  model1: model1,
@@ -241,7 +241,7 @@ describe("Support.CompositeView", function() {
241
241
  var eventListener = sinon.spy();
242
242
  var view = new (Support.CompositeView.extend({
243
243
  initialize: function(options) {
244
- this.bindTo(this, 'leave', eventListener);
244
+ this.on('leave', eventListener);
245
245
  }
246
246
  }))({model: {}});
247
247
 
@@ -262,21 +262,4 @@ describe("Support.CompositeView", function() {
262
262
  expect(eventListener.called).toBeTruthy();
263
263
  });
264
264
  });
265
-
266
- describe("#unbindFromAll", function() {
267
- it("calls the unbindFromAll method when leaving the view", function() {
268
- var view = new orangeView();
269
- var spy = sinon.spy(view, 'unbindFromAll');
270
- var callback = sinon.spy();
271
- var source = new Backbone.Model({
272
- title: 'Model or Collection'
273
- });
274
-
275
- view.render();
276
- view.bindTo(source, 'foo', callback);
277
- view.leave();
278
-
279
- expect(spy.called).toBeTruthy();
280
- });
281
- });
282
265
  });
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: backbone-support
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chad Pytel
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2015-02-16 00:00:00.000000000 Z
14
+ date: 2015-02-23 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: jasmine
@@ -31,30 +31,30 @@ dependencies:
31
31
  name: rake
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  requirements:
34
- - - ">="
34
+ - - "~>"
35
35
  - !ruby/object:Gem::Version
36
- version: '0'
36
+ version: '10.4'
37
37
  type: :development
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
- - - ">="
41
+ - - "~>"
42
42
  - !ruby/object:Gem::Version
43
- version: '0'
43
+ version: '10.4'
44
44
  - !ruby/object:Gem::Dependency
45
45
  name: headless
46
46
  requirement: !ruby/object:Gem::Requirement
47
47
  requirements:
48
- - - ">="
48
+ - - "~>"
49
49
  - !ruby/object:Gem::Version
50
- version: '0'
50
+ version: '1.0'
51
51
  type: :development
52
52
  prerelease: false
53
53
  version_requirements: !ruby/object:Gem::Requirement
54
54
  requirements:
55
- - - ">="
55
+ - - "~>"
56
56
  - !ruby/object:Gem::Version
57
- version: '0'
57
+ version: '1.0'
58
58
  description: SwappingController and CompositeView for Backbone.js
59
59
  email:
60
60
  - support@thoughtbot.com
@@ -91,7 +91,8 @@ files:
91
91
  - vendor/assets/javascripts/backbone.js
92
92
  - vendor/assets/javascripts/underscore.js
93
93
  homepage: http://github.com/thoughtbot/backbone-support
94
- licenses: []
94
+ licenses:
95
+ - MIT
95
96
  metadata: {}
96
97
  post_install_message:
97
98
  rdoc_options: []