Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Commit a2f860c

Browse files
committed
Merge pull request #364 from firebase/release_0.8
Release 0.8
2 parents 3d2cf53 + 7140e60 commit a2f860c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+8690
-9571
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
bower_components/
22
node_modules/
3+
tests/coverage/
34
.idea

.travis.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
language: node_js
22
node_js:
33
- '0.10'
4-
branches:
5-
only:
6-
- master
74
addons:
85
sauce_connect: true
96
before_install:
107
- export DISPLAY=:99.0
118
- sh -e /etc/init.d/xvfb start
129
install:
10+
- git clone git://github.com/n1k0/casperjs.git ~/casperjs
11+
- export PATH=$PATH:~/casperjs/bin
1312
- npm install -g grunt-cli
1413
- npm install -g bower
1514
- npm install

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
v0.8.0
2+
-------------
3+
Release Date: 2014-07-29
4+
5+
* NOTE: this release introduces several breaking changes as we works towards a stable 1.0.0 release.
6+
* Moved many roles of $firebase into $FirebaseObject. $firebase is now just an Angular array wrapper around the base Firebase API.
7+
* Introduced $FirebaseArray to provide better array support.
8+
* Added support for extending the base $FirebaseObject and $FirebaseArray factories.

Gruntfile.js

Lines changed: 41 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,26 @@ module.exports = function(grunt) {
33
'use strict';
44

55
grunt.initConfig({
6+
pkg: grunt.file.readJSON('package.json'),
7+
meta: {
8+
banner: '/*!\n * <%= pkg.title || pkg.name %> <%= pkg.version %> <%= grunt.template.today("yyyy-mm-dd") %>\n' +
9+
'<%= pkg.homepage ? " * " + pkg.homepage + "\\n" : "" %>' +
10+
' * Copyright (c) <%= grunt.template.today("yyyy") %> Firebase, Inc.\n' +
11+
' * MIT LICENSE: http://firebase.mit-license.org/\n */\n\n'
12+
},
13+
14+
// merge files from src/ into angularfire.js
15+
concat: {
16+
app: {
17+
options: { banner: '<%= meta.banner %>' },
18+
src: [
19+
'src/module.js',
20+
'src/**/*.js'
21+
],
22+
dest: 'dist/angularfire.js'
23+
}
24+
},
25+
626
// Run shell commands
727
shell: {
828
options: {
@@ -31,41 +51,46 @@ module.exports = function(grunt) {
3151

3252
// Minify JavaScript
3353
uglify : {
54+
options: {
55+
preserveComments: 'some'
56+
},
3457
app : {
3558
files : {
36-
'angularfire.min.js' : ['angularfire.js']
59+
'dist/angularfire.min.js' : ['dist/angularfire.js']
3760
}
3861
}
3962
},
4063

4164
// Lint JavaScript
4265
jshint : {
4366
options : {
44-
jshintrc: '.jshintrc'
67+
jshintrc: '.jshintrc',
68+
ignores: ['src/polyfills.js'],
4569
},
46-
all : ['angularfire.js']
70+
all : ['src/**/*.js']
4771
},
4872

4973
// Auto-run tasks on file changes
5074
watch : {
5175
scripts : {
52-
files : 'angularfire.js',
53-
tasks : ['build', 'test:unit', 'notify:watch'],
76+
files : ['src/**/*.js', 'tests/unit/**/*.spec.js', 'tests/lib/**/*.js', 'tests/mocks/**/*.js'],
77+
tasks : ['test:unit', 'notify:watch'],
5478
options : {
55-
interrupt : true
79+
interrupt : true,
80+
atBegin: true
5681
}
5782
}
5883
},
5984

6085
// Unit tests
6186
karma: {
6287
options: {
63-
configFile: 'tests/automatic_karma.conf.js',
88+
configFile: 'tests/automatic_karma.conf.js'
6489
},
65-
singlerun: {
66-
autowatch: false,
67-
singleRun: true
90+
manual: {
91+
configFile: 'tests/manual_karma.conf.js',
6892
},
93+
singlerun: {},
6994
watch: {
7095
autowatch: true,
7196
singleRun: false,
@@ -113,6 +138,11 @@ module.exports = function(grunt) {
113138
grunt.registerTask('test', ['test:unit', 'test:e2e']);
114139
grunt.registerTask('test:unit', ['karma:singlerun']);
115140
grunt.registerTask('test:e2e', ['connect:testserver', 'protractor:singlerun']);
141+
grunt.registerTask('test:manual', ['karma:manual']);
142+
143+
// Travis CI testing
144+
//grunt.registerTask('test:travis', ['build', 'test:unit', 'connect:testserver', 'protractor:saucelabs']);
145+
grunt.registerTask('test:travis', ['build', 'test:unit']);
116146

117147
// Sauce tasks
118148
grunt.registerTask('sauce:unit', ['karma:saucelabs']);
@@ -123,7 +153,7 @@ module.exports = function(grunt) {
123153
grunt.registerTask('test:watch:unit', ['karma:watch']);
124154

125155
// Build tasks
126-
grunt.registerTask('build', ['jshint', 'uglify']);
156+
grunt.registerTask('build', ['concat', 'jshint', 'uglify']);
127157

128158
// Default task
129159
grunt.registerTask('default', ['build', 'test']);

README.md

Lines changed: 51 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,73 @@
1-
AngularFire
2-
===========
3-
AngularFire is an officially supported [AngularJS](http://angularjs.org/) binding
4-
for [Firebase](http://www.firebase.com/?utm_medium=web&utm_source=angularFire).
5-
Firebase is a full backend so you don't need servers to build your Angular app!
61

7-
*Please visit the
8-
[Firebase + Angular Quickstart guide](https://www.firebase.com/quickstart/angularjs.html)
9-
for more information*.
2+
# AngularFire
103

11-
We also have a [tutorial](https://www.firebase.com/tutorial/#tutorial/angular/0),
12-
[documentation](https://www.firebase.com/docs/angular/index.html) and an
13-
[API reference](https://www.firebase.com/docs/angular/reference.html).
4+
[![Build Status](https://travis-ci.org/firebase/angularfire.svg)](https://travis-ci.org/firebase/angularfire)
5+
[![Version](https://badge.fury.io/gh/firebase%2Fangularfire.svg)](http://badge.fury.io/gh/firebase%2Fangularfire)
146

15-
Join our [Firebase + Angular Google Group](https://groups.google.com/forum/#!forum/firebase-angular) to ask questions, provide feedback, and share apps you've built with Firebase and Angular.
7+
AngularFire is the officially supported [AngularJS](http://angularjs.org/) binding
8+
for [Firebase](http://www.firebase.com/?utm_medium=web&utm_source=angularfire).
9+
Firebase is a full backend so you don't need servers to build your Angular app. AngularFire provides you with the `$firebase` service which allows you to easily keep your `$scope` variables in sync with your Firebase backend.
1610

17-
Development
18-
-----------
19-
[![Build Status](https://travis-ci.org/firebase/angularFire.png)](https://travis-ci.org/firebase/angularFire)
20-
[![Bower version](https://badge.fury.io/bo/angularfire.png)](http://badge.fury.io/bo/angularfire)
21-
[![Built with Grunt](https://cdn.gruntjs.com/builtwith.png)](http://gruntjs.com/)
11+
## Downloading AngularFire
2212

23-
If you'd like to hack on AngularFire itself, you'll need
24-
[node.js](http://nodejs.org/download/) and [Bower](http://bower.io).
13+
In order to use AngularFire in your project, you need to include the following files in your HTML:
2514

26-
You can also start hacking on AngularFire in a matter of seconds on
27-
[Nitrous.IO](https://www.nitrous.io/?utm_source=github.com&utm_campaign=angularFire&utm_medium=hackonnitrous)
15+
```html
16+
<!-- AngularJS -->
17+
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.17/angular.min.js"></script>
18+
19+
<!-- Firebase -->
20+
<script src="https://cdn.firebase.com/js/client/1.0.18/firebase.js"></script>
21+
22+
<!-- AngularFire -->
23+
<script src="https://cdn.firebase.com/libs/angularfire/0.8.0/angularfire.min.js"></script>
24+
```
2825

29-
[![Hack firebase/angularFire on
30-
Nitrous.IO](https://d3o0mnbgv6k92a.cloudfront.net/assets/hack-l-v1-3cc067e71372f6045e1949af9d96095b.png)](https://www.nitrous.io/hack_button?source=embed&runtime=nodejs&repo=firebase%2FangularFire&file_to_open=README.md)
26+
Use the URL above to download both the minified and non-minified versions of AngularFire from the Firebase CDN. You can also download them from the root of this GitHub repository. [Firebase](https://www.firebase.com/docs/web-quickstart.html?utm_medium=web&utm_source=angularfire) and [AngularJS](http://angularjs.org/) can be downloaded directly from their respective websites.
3127

32-
To get your dev environment set up, run the following commands:
28+
You can also install AngularFire via Bower and the dependencies will be downloaded automatically:
3329

3430
```bash
35-
git clone https://github.com/firebase/angularfire.git # clones this repository
36-
npm install # installs node dependencies
37-
bower install # installs JavaScript dependencies
38-
grunt install # installs selenium server for e2e tests
31+
$ bower install angularfire --save
3932
```
4033

41-
Use grunt to build and test the code:
34+
Once you've included AngularFire and its dependencies into your project, you will have access to the `$firebase` service.
4235

43-
```bash
44-
# Validates source with jshint, minifies source, and then runs unit and e2e tests
45-
grunt
36+
You can also start hacking on AngularFire in a matter of seconds on
37+
[Nitrous.IO](https://www.nitrous.io/?utm_source=github.com&utm_campaign=angularfire&utm_medium=hackonnitrous):
4638

47-
# Watches for changes and runs only unit tests after each change
48-
grunt watch
39+
[![Hack firebase/angularfire on
40+
Nitrous.IO](https://d3o0mnbgv6k92a.cloudfront.net/assets/hack-l-v1-3cc067e71372f6045e1949af9d96095b.png)](https://www.nitrous.io/hack_button?source=embed&runtime=nodejs&repo=firebase%2Fangularfire&file_to_open=README.md)
4941

50-
# Runs all tests
51-
grunt test
42+
## Getting Started with Firebase
5243

53-
# Minifies source
54-
grunt build
55-
```
44+
AngularFire requires Firebase in order to sync data. You can [sign up here](https://www.firebase.com/docs/web-quickstart.html?utm_medium=web&utm_source=angularfire) for a free account.
5645

57-
In addition to the automated test suite, there is an additional manual test suite that ensures that the
58-
$firebaseSimpleLogin service is working properly with auth providers. These tests are run using karma with the following command:
46+
## Documentation
47+
48+
The Firebase docs have a [quickstart](https://www.firebase.com/docs/web/bindings/angular/quickstart.html), [guide](https://www.firebase.com/docs/web/bindings/angular/guide.html), and [full API reference](https://www.firebase.com/docs/web/bindings/angular/api.html) for AngularFire.
49+
50+
We also have a [tutorial](https://www.firebase.com/tutorial/#tutorial/angular/0) to help you get started with AngularFire.
51+
52+
Join our [Firebase + Angular Google Group](https://groups.google.com/forum/#!forum/firebase-angular) to ask questions, provide feedback, and share apps you've built with Firebase and Angular.
53+
54+
## Contributing
55+
56+
If you'd like to contribute to AngularFire, you'll need to run the following commands to get your environment set up:
5957

6058
```bash
61-
karma start tests/manual_karma.conf.js
59+
$ git clone https://github.com/firebase/angularfire.git
60+
$ cd angularfire # go to the angularfire directory
61+
$ npm install -g grunt # globally install grunt task runner
62+
$ npm install -g bower # globally install Bower package manager
63+
$ npm install # install local npm build / test dependencies
64+
$ bower install # install local JavaScript dependencies
65+
$ grunt install # install Selenium server for end-to-end tests
66+
$ grunt watch # watch for source file changes
6267
```
6368

64-
Note that you must click "Close this window", login to Twitter, etc. when
65-
prompted in order for these tests to complete successfully.
69+
`grunt watch` will watch for changes in the `/src/` directory and lint, concatenate, and minify the source files when a change occurs. The output files - `angularfire.js` and `angularfire.min.js` - are written to the `/dist/` directory. `grunt watch` will also re-run the unit tests every time you update any source files.
70+
71+
You can run the entire test suite via the command line using `grunt test`. To only run the unit tests, run `grunt test:unit`. To only run the end-to-end [Protractor](https://github.com/angular/protractor/) tests, run `grunt test:e2e`.
6672

67-
License
68-
-------
69-
[MIT](http://firebase.mit-license.org).
73+
In addition to the automated test suite, there is an additional manual test suite that ensures that the `$firebaseSimpleLogin` service is working properly with the authentication providers. These tests can be run with `grunt test:manual`. Note that you must click "Close this window", login to Twitter, etc. when prompted in order for these tests to complete successfully.

0 commit comments

Comments
 (0)