From 05a1df741c5997d464c916fe2cf52d7ec3951662 Mon Sep 17 00:00:00 2001 From: Abe Haskins Date: Tue, 7 Jun 2016 13:10:27 -0700 Subject: [PATCH 1/9] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a49bb6d..00cc74f 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Coverage Status](https://img.shields.io/coveralls/firebase/backbonefire.svg?branch=master&style=flat)](https://coveralls.io/r/firebase/backbonefire?branch=master) [![Version](https://badge.fury.io/gh/firebase%2Fbackbonefire.svg?branch=master)](http://badge.fury.io/gh/firebase%2Fbackbonefire) -BackboneFire is the officially supported [Backbone](http://backbonejs.org) binding for Firebasem data. The bindings let you use special model and collection types that allow for synchronizing data with [Firebase](http://www.firebase.com/?utm_medium=web&utm_source=backbonefire). +BackboneFire is the officially supported [Backbone](http://backbonejs.org) binding for Firebase data. The bindings let you use special model and collection types that allow for synchronizing data with [Firebase](http://www.firebase.com/?utm_medium=web&utm_source=backbonefire). ## Live Demo From bd12e78f7ceae7259e8cf40ed9e368599cf87d55 Mon Sep 17 00:00:00 2001 From: jwngr Date: Fri, 17 Jun 2016 16:44:49 -0700 Subject: [PATCH 2/9] Removed support@firebase.com and updated LICENSE --- LICENSE | 16 +++++++++------- bower.json | 2 +- package.json | 2 +- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/LICENSE b/LICENSE index 4756c28..e2d638c 100644 --- a/LICENSE +++ b/LICENSE @@ -1,19 +1,21 @@ -Copyright 2015 Firebase, https://www.firebase.com/ +The MIT License (MIT) + +Copyright (c) 2016 Firebase Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the “Software”), to deal +of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/bower.json b/bower.json index 275ef98..181b482 100644 --- a/bower.json +++ b/bower.json @@ -3,7 +3,7 @@ "description": "The officially supported Backbone binding for Firebase", "version": "0.0.0", "authors": [ - "Firebase (https://www.firebase.com/)" + "Firebase (https://firebase.google.com/)" ], "homepage": "https://github.com/firebase/backbonefire/", "repository": { diff --git a/package.json b/package.json index 2da174d..522ecd1 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "backbonefire", "description": "The officially supported Backbone binding for Firebase", "version": "0.0.0", - "author": "Firebase (https://www.firebase.com/)", + "author": "Firebase (https://firebase.google.com/)", "homepage": "https://github.com/firebase/backbonefire/", "repository": { "type": "git", From 9c70a824cd9653751cc87e49fedf94e672ce61d6 Mon Sep 17 00:00:00 2001 From: JP Ventura Date: Sat, 29 Oct 2016 18:20:58 -0200 Subject: [PATCH 3/9] :bug: Install npm and karma-cli on travis Travis CI is falling because it is not finding npm and karma-cli in order to perform the tests (seems like they are not installed on the VMs). We just need configure before_install option at .travis.yml, ensuring that packages are present before starting the unit tests. --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index c279fe9..4d64de7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,9 @@ node_js: - '0.10' - '0.12' - stable +before_install: + - npm install -g npm + - npm install -g karma-cli sudo: false install: - npm install -g bower From 56add294656aa3cb9e95dc5e0e2aac00fcb1bf90 Mon Sep 17 00:00:00 2001 From: JP Ventura Date: Thu, 27 Oct 2016 16:23:19 -0200 Subject: [PATCH 4/9] :books: Update version number references to v0.5.1 Update all files that mention BackboneFire reference number to v0.5.1. --- bower.json | 2 +- examples/todos/bower.json | 2 +- examples/todos/js/backbonefire.js | 2 +- examples/todos/package.json | 2 +- package.json | 2 +- src/backbonefire.js | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bower.json b/bower.json index 181b482..d7e6f8f 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "backbonefire", "description": "The officially supported Backbone binding for Firebase", - "version": "0.0.0", + "version": "0.5.1", "authors": [ "Firebase (https://firebase.google.com/)" ], diff --git a/examples/todos/bower.json b/examples/todos/bower.json index 3398958..2b9a16d 100644 --- a/examples/todos/bower.json +++ b/examples/todos/bower.json @@ -1,6 +1,6 @@ { "name": "todomvc-backbonefire", - "version": "0.0.0", + "version": "0.5.1", "private": true, "dependencies": { "backbone": "~1.1.0", diff --git a/examples/todos/js/backbonefire.js b/examples/todos/js/backbonefire.js index afaefa0..ea64d1b 100644 --- a/examples/todos/js/backbonefire.js +++ b/examples/todos/js/backbonefire.js @@ -9,7 +9,7 @@ define([ * bindings let you use special model and collection types that allow for * synchronizing data with Firebase. * - * BackboneFire 0.0.0 + * BackboneFire 0.5.1 * https://github.com/firebase/backbonefire/ * License: MIT */ diff --git a/examples/todos/package.json b/examples/todos/package.json index eb53247..5707bd4 100644 --- a/examples/todos/package.json +++ b/examples/todos/package.json @@ -1,6 +1,6 @@ { "name": "backbone-fire-todo", - "version": "0.0.0", + "version": "0.5.1", "description": "Todo example using Backbone Fire.", "main": "index.html", "scripts": { diff --git a/package.json b/package.json index 522ecd1..086cfb7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "backbonefire", "description": "The officially supported Backbone binding for Firebase", - "version": "0.0.0", + "version": "0.5.1", "author": "Firebase (https://firebase.google.com/)", "homepage": "https://github.com/firebase/backbonefire/", "repository": { diff --git a/src/backbonefire.js b/src/backbonefire.js index 0e208b5..e1eb477 100644 --- a/src/backbonefire.js +++ b/src/backbonefire.js @@ -3,7 +3,7 @@ * bindings let you use special model and collection types that allow for * synchronizing data with Firebase. * - * BackboneFire 0.0.0 + * BackboneFire 0.5.1 * https://github.com/firebase/backbonefire/ * License: MIT */ From b3816204c2ed58e46e7ed17bcc16ee654c7311eb Mon Sep 17 00:00:00 2001 From: JP Ventura Date: Sat, 29 Oct 2016 13:36:36 -0200 Subject: [PATCH 5/9] :wrench: Ignore automatic files Minor .gitignore upgrade: - Remove duplicated folders - Upgrade list of automatically created files that should be ignored - Use GitHub Node.js .gitignore template (see https://goo.gl/hx0XE) - Also ignore Emacs and VSCode automatic files --- .gitignore | 65 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 60 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 3249e0f..65eab82 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,61 @@ -dist/ -test/coverage/ -node_modules/ -bower_components/ +# Logs +*.log +logs +npm-debug.log* + +# Runtime data +*.pid +*.pid.lock +*.seed +pids + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +bower_components +jspm_packages +node_modules + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Directory used by test tools like Coverage and Grump +dist test/coverage -.idea \ No newline at end of file + +# Emacs +*~ +.*~ +.\#* +\#* + +# JetBrains WebStorm +.idea + +# Microsoft Visual Studio Code +.vscode From 8aa640727231cfc47683888520083f68ccac3a74 Mon Sep 17 00:00:00 2001 From: JP Ventura Date: Sat, 29 Oct 2016 18:03:38 -0200 Subject: [PATCH 6/9] :bug: Upgrade karma development package Update required in order to Travis CI run the unit tests --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 086cfb7..2713532 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "grunt-karma": "^0.8.3", "grunt-notify": "~0.2.7", "istanbul": "^0.3.2", - "karma": "~0.12.8", + "karma": "~0.13.9", "karma-chai": "0.0.2", "karma-coverage": "^0.2.6", "karma-failed-reporter": "0.0.2", From fdb9316fd60f19a509f1b65b1d79c6f80c16e56b Mon Sep 17 00:00:00 2001 From: JP Ventura Date: Wed, 2 Nov 2016 13:43:23 -0200 Subject: [PATCH 7/9] :lipstick: Sort dependencies lexicographically --- bower.json | 2 +- package.json | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bower.json b/bower.json index d7e6f8f..ca7fe8f 100644 --- a/bower.json +++ b/bower.json @@ -32,8 +32,8 @@ "index.html" ], "dependencies": { - "firebase": "2.0.x", "backbone": "<=1.1.0", + "firebase": "2.0.x", "underscore": "~1.5.2" }, "devDependencies": { diff --git a/package.json b/package.json index 2713532..eab45db 100644 --- a/package.json +++ b/package.json @@ -38,14 +38,18 @@ "grunt": "~0.4.1", "grunt-cli": "0.1.13", "grunt-contrib-concat": "^0.5.0", + "grunt-contrib-connect": "^0.9.0", "grunt-contrib-jshint": "~0.6.2", "grunt-contrib-uglify": "~0.2.2", "grunt-contrib-watch": "~0.5.1", + "grunt-copy": "^0.1.0", "grunt-karma": "^0.8.3", "grunt-notify": "~0.2.7", + "grunt-serve": "^0.1.6", "istanbul": "^0.3.2", "karma": "~0.13.9", "karma-chai": "0.0.2", + "karma-chrome-launcher": "^0.1.4", "karma-coverage": "^0.2.6", "karma-failed-reporter": "0.0.2", "karma-mocha": "~0.1.0", @@ -54,11 +58,7 @@ "karma-sinon": "~1.0.0", "karma-spec-reporter": "0.0.13", "mocha": "~1.14.0", - "requirejs": "~2.1.9", - "karma-chrome-launcher": "^0.1.4", - "grunt-copy": "^0.1.0", - "grunt-contrib-connect": "^0.9.0", - "grunt-serve": "^0.1.6" + "requirejs": "~2.1.9" }, "scripts": { "test": "grunt test", From 5091e9223a191439a4ff47d55835cbe9332bf23b Mon Sep 17 00:00:00 2001 From: JP Ventura Date: Wed, 2 Nov 2016 16:03:21 -0200 Subject: [PATCH 8/9] :package: Update npm and bower package dependencies Updated all package dependencies to its latest version, except Firebase and Backbone. This is an intermediary step before actually upgrading to latest backend version. Removed gulp-server and use gulp-contrib-connect instead (updating Gruntfile.js task also is required to perform the unit tests). We also installed chai and sinon because they are required by karma-chai and karma-sinon respectivelly. --- Gruntfile.js | 5 ++--- bower.json | 2 +- package.json | 53 ++++++++++++++++++++++++++-------------------------- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index a23b837..5bfb80e 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -96,18 +96,17 @@ module.exports = function(grunt) { }); grunt.loadNpmTasks('grunt-contrib-concat'); + grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-notify'); grunt.loadNpmTasks('grunt-karma'); - grunt.loadNpmTasks('grunt-copy'); - grunt.loadNpmTasks('grunt-serve'); // Unit tests grunt.registerTask('test', ['karma:unit']); grunt.registerTask('build', ['jshint', 'concat', 'uglify']); grunt.registerTask('default', ['build', 'test']); - grunt.registerTask('todo', ['build', 'serve']); + grunt.registerTask('todo', ['build', 'connect']); }; diff --git a/bower.json b/bower.json index ca7fe8f..77e3ecf 100644 --- a/bower.json +++ b/bower.json @@ -34,7 +34,7 @@ "dependencies": { "backbone": "<=1.1.0", "firebase": "2.0.x", - "underscore": "~1.5.2" + "underscore": "~1.8.3" }, "devDependencies": { "mockfirebase": "~0.3.0" diff --git a/package.json b/package.json index eab45db..0b37a03 100644 --- a/package.json +++ b/package.json @@ -33,32 +33,33 @@ "firebase": "2.0.x" }, "devDependencies": { - "chai-backbone": "~0.9.2", - "coveralls": "^2.11.1", - "grunt": "~0.4.1", - "grunt-cli": "0.1.13", - "grunt-contrib-concat": "^0.5.0", - "grunt-contrib-connect": "^0.9.0", - "grunt-contrib-jshint": "~0.6.2", - "grunt-contrib-uglify": "~0.2.2", - "grunt-contrib-watch": "~0.5.1", - "grunt-copy": "^0.1.0", - "grunt-karma": "^0.8.3", - "grunt-notify": "~0.2.7", - "grunt-serve": "^0.1.6", - "istanbul": "^0.3.2", - "karma": "~0.13.9", - "karma-chai": "0.0.2", - "karma-chrome-launcher": "^0.1.4", - "karma-coverage": "^0.2.6", - "karma-failed-reporter": "0.0.2", - "karma-mocha": "~0.1.0", - "karma-phantomjs-launcher": "~0.1.0", - "karma-requirejs": "~0.2.0", - "karma-sinon": "~1.0.0", - "karma-spec-reporter": "0.0.13", - "mocha": "~1.14.0", - "requirejs": "~2.1.9" + "chai": "~3.5.0", + "chai-backbone": "~0.9.4", + "coveralls": "^2.11.14", + "grunt": "~1.0.1", + "grunt-cli": "1.2.0", + "grunt-contrib-concat": "^1.0.1", + "grunt-contrib-connect": "^1.0.2", + "grunt-contrib-copy": "~1.0.0", + "grunt-contrib-jshint": "~1.0.0", + "grunt-contrib-uglify": "~2.0.0", + "grunt-contrib-watch": "~1.0.0", + "grunt-karma": "^2.0.0", + "grunt-notify": "~0.4.5", + "istanbul": "^0.4.5", + "karma": "~1.3.0", + "karma-chai": "0.1.0", + "karma-chrome-launcher": "^2.0.0", + "karma-coverage": "^1.1.1", + "karma-failed-reporter": "0.0.3", + "karma-mocha": "~1.2.0", + "karma-phantomjs-launcher": "~1.0.2", + "karma-requirejs": "~1.1.0", + "karma-sinon": "~1.0.5", + "karma-spec-reporter": "0.0.26", + "mocha": "~3.1.2", + "requirejs": "~2.3.2", + "sinon" : "~1.17.6" }, "scripts": { "test": "grunt test", From 058ad9992fe643918916d575c56a3e719d5b6c51 Mon Sep 17 00:00:00 2001 From: JP Ventura Date: Wed, 2 Nov 2016 15:18:06 -0200 Subject: [PATCH 9/9] :rotating_light: Fix Firebase.Collection#fetch test Fix Backbone.Firebase.Collection#fetch test to properly check if a collection was successfully synced with Firebase backend. --- test/specs/collection_test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/specs/collection_test.js b/test/specs/collection_test.js index b114e20..6cd3eb0 100644 --- a/test/specs/collection_test.js +++ b/test/specs/collection_test.js @@ -395,9 +395,9 @@ describe('Backbone.Firebase.Collection', function() { collection.fetch(); collection.on('sync', function() { successCalled = true; + expect(successCalled).to.be.ok; }); collection.firebase.flush(); - expect(successCalled).to.be.ok; }); });