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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd37786e6d96a13a39bf95ec3ad6cbf0eda91457
|
4
|
+
data.tar.gz: 9f12f3b1c03a9591def5bcc98b33d5d11f2e43a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e11a417f12d2d5a815e7a3c7714e7d9dc0e2e182726d320932a58f13f04ad0b0600a4e333546ae8e490c6604c33f74c6f5585489f57b1fe61728d840c63b98f
|
7
|
+
data.tar.gz: b631bd137a26d3c82a435d2b4229f5f4837ad022b1af4764f59d49fd64d2572519df099769b93c19046aaddde97f8a03ba36c5fddd158d21da92a1a5800cf328
|
data/CHANGELOG
CHANGED
data/backbone-support.gemspec
CHANGED
@@ -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(
|
21
|
-
s.add_development_dependency(
|
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.
|
10
|
+
this.stopListening();
|
11
11
|
this.remove();
|
12
12
|
this._leaveChildren();
|
13
13
|
this._removeFromParent();
|
@@ -216,14 +216,14 @@ describe("Support.CompositeView", function() {
|
|
216
216
|
expect(view.children.size()).toEqual(1);
|
217
217
|
});
|
218
218
|
|
219
|
-
it("
|
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.
|
226
|
-
this.
|
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.
|
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.
|
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-
|
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: '
|
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: '
|
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: []
|