diff options
Diffstat (limited to 'js')
74 files changed, 1544 insertions, 1351 deletions
diff --git a/js/package.json b/js/package.json index 9627dc96b..a9b593510 100644 --- a/js/package.json +++ b/js/package.json @@ -31,18 +31,18 @@ "grunt-contrib-jshint": "^0.10.0", "grunt-contrib-uglify": "^0.6.0", "grunt-contrib-watch": "^0.6.1", - "grunt-ng-annotate": "^0.6.0", + "grunt-ng-annotate": "^0.8.0", "grunt-php": "^1.1.1", "grunt-phpunit": "^0.3.6", "grunt-protractor-runner": "^1.1.4", - "grunt-protractor-webdriver": "^0.1.9", + "grunt-protractor-webdriver": "^0.2.0", "grunt-wrap": "^0.3.0", "grunt-karma": "^0.9.0", - "karma": "^0.12.25", - "karma-chrome-launcher": "^0.1.5", - "karma-coverage": "^0.2.6", + "karma": "^0.12.28", + "karma-chrome-launcher": "^0.1.7", + "karma-coverage": "^0.2.7", "karma-firefox-launcher": "^0.1.3", - "karma-jasmine": "^0.1.5" + "karma-jasmine": "^0.3.2" }, "dependencies": {} } diff --git a/js/tests/unit/controller/ContentControllerSpec.js b/js/tests/unit/controller/ContentControllerSpec.js index 25314e561..decdceeab 100644 --- a/js/tests/unit/controller/ContentControllerSpec.js +++ b/js/tests/unit/controller/ContentControllerSpec.js @@ -108,8 +108,8 @@ describe('ContentController', function () { expect(ItemResource.markItemRead).toHaveBeenCalledWith(3); expect(FeedResource.markItemOfFeedRead).toHaveBeenCalledWith(4); - expect(ItemResource.markItemRead.callCount).toBe(1); - expect(FeedResource.markItemOfFeedRead.callCount).toBe(1); + expect(ItemResource.markItemRead.calls.count()).toBe(1); + expect(FeedResource.markItemOfFeedRead.calls.count()).toBe(1); })); @@ -302,7 +302,7 @@ describe('ContentController', function () { Publisher.subscribe(ItemResource).toChannels(['items']); ItemResource.autoPage = jasmine.createSpy('autoPage') - .andCallFake(function () { + .and.callFake(function () { return { success: function (callback) { callback({ @@ -360,7 +360,7 @@ describe('ContentController', function () { Publisher.subscribe(ItemResource).toChannels(['items']); ItemResource.autoPage = jasmine.createSpy('autoPage') - .andCallFake(function () { + .and.callFake(function () { return { success: function (callback) { callback({ @@ -412,7 +412,7 @@ describe('ContentController', function () { Publisher.subscribe(ItemResource).toChannels(['items']); ItemResource.autoPage = jasmine.createSpy('autoPage') - .andCallFake(function () { + .and.callFake(function () { return { success: function (callback) { callback({ diff --git a/js/tests/unit/controller/NavigationControllerSpec.js b/js/tests/unit/controller/NavigationControllerSpec.js index 72b9fe736..994414307 100644 --- a/js/tests/unit/controller/NavigationControllerSpec.js +++ b/js/tests/unit/controller/NavigationControllerSpec.js @@ -70,7 +70,7 @@ describe('NavigationController', function () { controller.markFolderRead(3); expect(FeedResource.markFolderRead).toHaveBeenCalledWith(3); - expect(ItemResource.markFeedRead.callCount).toBe(2); + expect(ItemResource.markFeedRead.calls.count()).toBe(2); })); @@ -317,7 +317,7 @@ describe('NavigationController', function () { it('should create a feed with a folderId', inject(function ($controller) { var FeedResource = { - create: jasmine.createSpy('create').andCallFake( + create: jasmine.createSpy('create').and.callFake( function (url, folderId) { return { then: function (callback) { @@ -378,7 +378,7 @@ describe('NavigationController', function () { it('should create a feed with a foldername', inject(function ($controller) { var FeedResource = { - create: jasmine.createSpy('create').andCallFake( + create: jasmine.createSpy('create').and.callFake( function (url, folderId) { return { then: function (callback) { @@ -398,7 +398,7 @@ describe('NavigationController', function () { }; var FolderResource = { - create: jasmine.createSpy('create').andCallFake(function (folder) { + create: jasmine.createSpy('create').and.callFake(function (folder) { return { then: function (callback) { callback({ @@ -410,7 +410,7 @@ describe('NavigationController', function () { } }; }), - get: jasmine.createSpy('get').andCallFake(function (name) { + get: jasmine.createSpy('get').and.callFake(function (name) { return { name: name, id: 19 @@ -459,7 +459,7 @@ describe('NavigationController', function () { it('should create a folder', inject(function ($controller) { var FolderResource = { - create: jasmine.createSpy('create').andCallFake( + create: jasmine.createSpy('create').and.callFake( function (folder) { return { then: function (callback) { @@ -633,7 +633,7 @@ describe('NavigationController', function () { it('should rename a folder', inject(function ($controller, FolderResource) { FolderResource.rename = jasmine.createSpy('rename') - .andCallFake(function () { + .and.callFake(function () { return { then: function (success) { success(); @@ -668,7 +668,7 @@ describe('NavigationController', function () { it('should handle rename folder error', inject(function ($controller, FolderResource) { FolderResource.rename = jasmine.createSpy('rename') - .andCallFake(function () { + .and.callFake(function () { return { then: function (success, error) { error('no'); @@ -728,7 +728,7 @@ describe('NavigationController', function () { $controller, FeedResource, $q, $rootScope) { var deferred = $q.defer(); FeedResource.reversiblyDelete = jasmine.createSpy('reversiblyDelete') - .andReturn(deferred.promise); + .and.returnValue(deferred.promise); var route = { reload: jasmine.createSpy('reload') }; @@ -759,7 +759,7 @@ describe('NavigationController', function () { $controller, FeedResource, $q, $rootScope) { var deferred = $q.defer(); FeedResource.undoDelete = jasmine.createSpy('undoDelete') - .andReturn(deferred.promise); + .and.returnValue(deferred.promise); var route = { reload: jasmine.createSpy('reload') }; @@ -810,10 +810,10 @@ describe('NavigationController', function () { var deferredFolder = $q.defer(); FolderResource.reversiblyDelete = jasmine.createSpy('reversiblyDelete') - .andReturn(deferredFolder.promise); + .and.returnValue(deferredFolder.promise); FeedResource.reversiblyDeleteFolder = jasmine.createSpy('reversiblyDelete') - .andReturn(deferredFolder.promise); + .and.returnValue(deferredFolder.promise); var route = { reload: jasmine.createSpy('reload') @@ -849,9 +849,9 @@ describe('NavigationController', function () { var deferredFeed = $q.defer(); var deferredFolder = $q.defer(); FolderResource.undoDelete = jasmine.createSpy('undoDelete') - .andReturn(deferredFolder.promise); + .and.returnValue(deferredFolder.promise); FeedResource.undoDeleteFolder = jasmine.createSpy('undoDelete') - .andReturn(deferredFeed.promise); + .and.returnValue(deferredFeed.promise); var route = { reload: jasmine.createSpy('reload') }; diff --git a/js/tests/unit/controller/SettingsControllerSpec.js b/js/tests/unit/controller/SettingsControllerSpec.js index 83c706738..4214f9d81 100644 --- a/js/tests/unit/controller/SettingsControllerSpec.js +++ b/js/tests/unit/controller/SettingsControllerSpec.js @@ -56,7 +56,7 @@ describe('SettingsController', function () { expect(SettingsResource.set).toHaveBeenCalledWith('showAll', false); expect(route.reload).toHaveBeenCalled(); - expect(route.reload.callCount).toBe(2); + expect(route.reload.calls.count()).toBe(2); })); @@ -64,7 +64,7 @@ describe('SettingsController', function () { Publisher) { var data = 1; ItemResource.importArticles = jasmine.createSpy('importArticles') - .andCallFake(function () { + .and.callFake(function () { return { success: function (callback) { callback(data); @@ -112,10 +112,10 @@ describe('SettingsController', function () { OPMLParser) { var queue = 4; - OPMLParser.parse = jasmine.createSpy('parse').andReturn(2); + OPMLParser.parse = jasmine.createSpy('parse').and.returnValue(2); OPMLImporter.importFolders = jasmine.createSpy('importFolders') - .andReturn({ + .and.returnValue({ then: function (callback) { callback(queue, 5); return { @@ -147,7 +147,7 @@ describe('SettingsController', function () { it('should display import opml error', inject(function ( $controller, OPMLParser) { - OPMLParser.parse = jasmine.createSpy('parse').andCallFake(function () { + OPMLParser.parse = jasmine.createSpy('parse').and.callFake(function () { throw 1; }); diff --git a/js/vendor/angular-animate/.bower.json b/js/vendor/angular-animate/.bower.json index badfab394..171a0cab5 100644 --- a/js/vendor/angular-animate/.bower.json +++ b/js/vendor/angular-animate/.bower.json @@ -1,17 +1,17 @@ { "name": "angular-animate", - "version": "1.3.5", + "version": "1.3.8", "main": "./angular-animate.js", "ignore": [], "dependencies": { - "angular": "1.3.5" + "angular": "1.3.8" }, "homepage": "https://github.com/angular/bower-angular-animate", - "_release": "1.3.5", + "_release": "1.3.8", "_resolution": { "type": "version", - "tag": "v1.3.5", - "commit": "f1ce791ecb58c64af1caac6253f93ecf3e2bf203" + "tag": "v1.3.8", + "commit": "673c705af49bb71c0b81c31b446b2f636cecd990" }, "_source": "git://github.com/angular/bower-angular-animate.git", "_target": "~1.3.3", diff --git a/js/vendor/angular-animate/angular-animate.js b/js/vendor/angular-animate/angular-animate.js index 761d622ea..eca7ca4c3 100644 --- a/js/vendor/angular-animate/angular-animate.js +++ b/js/vendor/angular-animate/angular-animate.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.3.5 + * @license AngularJS v1.3.8 * (c) 2010-2014 Google, Inc. http://angularjs.org * License: MIT */ @@ -19,7 +19,7 @@ * # Usage * * To see animations in action, all that is required is to define the appropriate CSS classes - * or to register a JavaScript animation via the myModule.animation() function. The directives that support animation automatically are: + * or to register a JavaScript animation via the `myModule.animation()` function. The directives that support animation automatically are: * `ngRepeat`, `ngInclude`, `ngIf`, `ngSwitch`, `ngShow`, `ngHide`, `ngView` and `ngClass`. Custom directives can take advantage of animation * by using the `$animate` service. * @@ -161,8 +161,8 @@ * ### Structural transition animations * * Structural transitions (such as enter, leave and move) will always apply a `0s none` transition - * value to force the browser into rendering the styles defined in the setup (.ng-enter, .ng-leave - * or .ng-move) class. This means that any active transition animations operating on the element + * value to force the browser into rendering the styles defined in the setup (`.ng-enter`, `.ng-leave` + * or `.ng-move`) class. This means that any active transition animations operating on the element * will be cut off to make way for the enter, leave or move animation. * * ### Class-based transition animations @@ -479,11 +479,12 @@ angular.module('ngAnimate', ['ng']) function isMatchingElement(elm1, elm2) { return extractElementNode(elm1) == extractElementNode(elm2); } - + var $$jqLite; $provide.decorator('$animate', - ['$delegate', '$$q', '$injector', '$sniffer', '$rootElement', '$$asyncCallback', '$rootScope', '$document', '$templateRequest', - function($delegate, $$q, $injector, $sniffer, $rootElement, $$asyncCallback, $rootScope, $document, $templateRequest) { + ['$delegate', '$$q', '$injector', '$sniffer', '$rootElement', '$$asyncCallback', '$rootScope', '$document', '$templateRequest', '$$jqLite', + function($delegate, $$q, $injector, $sniffer, $rootElement, $$asyncCallback, $rootScope, $document, $templateRequest, $$$jqLite) { + $$jqLite = $$$jqLite; $rootElement.data(NG_ANIMATE_STATE, rootAnimateState); // Wait until all directive and route-related templates are downloaded and @@ -838,7 +839,8 @@ angular.module('ngAnimate', ['ng']) * promise that was returned when the animation was started. * * ```js - * var promise = $animate.addClass(element, 'super-long-animation').then(function() { + * var promise = $animate.addClass(element, 'super-long-animation'); + * promise.then(function() { * //this will still be called even if cancelled * }); |