Skip to content

Commit e0b0c23

Browse files
committed
Merge pull request #27 from firebase/jw-firebase-2
Bumped Firebase dependency to 2.0.0
2 parents 537a3bd + 1906d84 commit e0b0c23

File tree

9 files changed

+18
-17
lines changed

9 files changed

+18
-17
lines changed

bower.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
"changelog.txt"
3333
],
3434
"dependencies": {
35-
"react": "^0.11.1",
36-
"firebase": "1.1.x"
35+
"react": "0.12.x",
36+
"firebase": "2.0.x"
3737
},
3838
"devDependencies": {
3939
"jasmine": "~2.0.0"

changelog.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
feature - Added optional cancel callback to `bindAsObject()` and `bindAsArray()` to handle cases where reading from Firebase fails.
2+
feature - Upgraded Firebase dependency to 2.0.x.

examples/commentsBox/bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "commentsBox",
33
"description": "react.js comment tutorial updated for ReactFire mixin",
4-
"version": "0.1.6",
4+
"version": "0.4.0",
55
"homepage": "https://github.com/llad/ReactFire",
66
"authors": [
77
"Mark Woodall <[email protected]>"

examples/todoApp/bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "todoApp",
33
"description": "ReactFireMixin Todo app demo",
4-
"version": "0.1.6",
4+
"version": "0.4.0",
55
"main": "index.html",
66
"license": "MIT",
77
"authors": [

examples/todoApp/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ <h2>React + ReactFire</h2>
5151
<div style="clear: both; margin-bottom: 10px;"></div>
5252
</div>
5353
</body>
54-
</html>
54+
</html>

examples/todoApp/js/todoAppFirebaseExplicit.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ var TodoApp2 = React.createClass({
1616

1717
componentWillMount: function() {
1818
this.firebaseRef = new Firebase("https://ReactFireTodoApp.firebaseio.com/items/");
19-
this.firebaseRef.limit(25).on("child_added", function(dataSnapshot) {
19+
this.firebaseRef.limitToLast(25).on("child_added", function(dataSnapshot) {
2020
// Only keep track of 25 items at a time
2121
if (this.items.length === 25) {
2222
this.items.splice(0, 1);
@@ -60,4 +60,4 @@ var TodoApp2 = React.createClass({
6060
}
6161
});
6262

63-
React.renderComponent(<TodoApp2 />, document.getElementById("todoApp2"));
63+
React.renderComponent(<TodoApp2 />, document.getElementById("todoApp2"));

examples/todoApp/js/todoAppFirebaseImplicit.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var TodoApp3 = React.createClass({
1717

1818
componentWillMount: function() {
1919
var firebaseRef = new Firebase("https://ReactFireTodoApp.firebaseio.com/items/");
20-
this.bindAsArray(firebaseRef.limit(25), "items");
20+
this.bindAsArray(firebaseRef.limitToLast(25), "items");
2121
},
2222

2323
onChange: function(e) {
@@ -47,4 +47,4 @@ var TodoApp3 = React.createClass({
4747
}
4848
});
4949

50-
React.renderComponent(<TodoApp3 />, document.getElementById("todoApp3"));
50+
React.renderComponent(<TodoApp3 />, document.getElementById("todoApp3"));

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@
3232
"package.json"
3333
],
3434
"dependencies": {
35-
"envify": "^2.0.0",
36-
"firebase": "1.1.x",
37-
"react": "^0.11.1"
35+
"firebase": "2.0.x",
36+
"react": "0.12.x"
3837
},
3938
"devDependencies": {
4039
"coveralls": "^2.11.1",

tests/specs/reactfire.spec.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ describe("ReactFireMixin Tests:", function() {
8585
componentWillMount: function() {
8686
var _this = this;
8787

88-
expect(function() { _this.bindAsArray(firebaseRef.limit(10), "items"); }).not.toThrow();
88+
expect(function() { _this.bindAsArray(firebaseRef.limitToLast(10), "items"); }).not.toThrow();
8989
},
9090

9191
render: function() {
@@ -126,7 +126,7 @@ describe("ReactFireMixin Tests:", function() {
126126
mixins: [ReactFireMixin],
127127

128128
componentWillMount: function() {
129-
this.bindAsArray(firebaseRef.limit(2), "items");
129+
this.bindAsArray(firebaseRef.limitToLast(2), "items");
130130
},
131131

132132
componentDidMount: function() {
@@ -225,7 +225,7 @@ describe("ReactFireMixin Tests:", function() {
225225
componentWillMount: function() {
226226
var _this = this;
227227

228-
expect(function() { _this.bindAsObject(firebaseRef.limit(10), "items"); }).not.toThrow();
228+
expect(function() { _this.bindAsObject(firebaseRef.limitToLast(10), "items"); }).not.toThrow();
229229
},
230230

231231
render: function() {
@@ -266,7 +266,7 @@ describe("ReactFireMixin Tests:", function() {
266266
mixins: [ReactFireMixin],
267267

268268
componentWillMount: function() {
269-
this.bindAsObject(firebaseRef.limit(2), "items");
269+
this.bindAsObject(firebaseRef.limitToLast(2), "items");
270270
},
271271

272272
componentDidMount: function() {
@@ -367,7 +367,7 @@ describe("ReactFireMixin Tests:", function() {
367367
var _this = this;
368368

369369
validBindVars.forEach(function(validBindVar) {
370-
_this.bindAsArray(firebaseRef.limit(10), validBindVar);
370+
_this.bindAsArray(firebaseRef.limitToLast(10), validBindVar);
371371
expect(function() { _this.unbind(validBindVar); }).not.toThrow();
372372
});
373373
},

0 commit comments

Comments
 (0)