From ebe316f84e20073dc89b893852e7dba2bc2ef608 Mon Sep 17 00:00:00 2001 From: Emma Guo Date: Wed, 10 Jun 2015 23:44:01 -0700 Subject: [PATCH] Release v0.3.3. --- README.md | 2 +- angular-poller.js | 2 +- angular-poller.min.js | 2 +- bower.json | 2 +- package.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index daecf9b..43aca14 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Add a ` + ``` ## Quick configuration diff --git a/angular-poller.js b/angular-poller.js index 4fe1a58..10a1fa8 100644 --- a/angular-poller.js +++ b/angular-poller.js @@ -5,7 +5,7 @@ * Angular poller service. It uses a timer and sends requests every few seconds to * keep the client synced with the server. * - * @version v0.3.2 + * @version v0.3.3 * @link http://github.com/emmaguo/angular-poller * @license MIT * diff --git a/angular-poller.min.js b/angular-poller.min.js index 1764c46..e97410e 100644 --- a/angular-poller.min.js +++ b/angular-poller.min.js @@ -1,2 +1,2 @@ -/*! angular-poller v0.3.2 12-11-2014 */ +/*! angular-poller v0.3.3 10-06-2015 */ !function(a,b,c){"use strict";b.module("emguo.poller",[]).constant("pollerConfig",{stopOnRouteChange:!1,stopOnStateChange:!1,resetOnRouteChange:!1,resetOnStateChange:!1,neverOverwrite:!1}).run(["$rootScope","poller","pollerConfig",function(a,b,c){c.stopOnRouteChange&&a.$on("$routeChangeStart",function(){b.stopAll()}),c.stopOnStateChange&&a.$on("$stateChangeStart",function(){b.stopAll()}),c.resetOnRouteChange&&a.$on("$routeChangeStart",function(){b.reset()}),c.resetOnStateChange&&a.$on("$stateChangeStart",function(){b.reset()})}]).factory("poller",["$interval","$q","$http","pollerConfig",function(a,d,e,f){var g=[],h={action:"get",argumentsArray:[],delay:5e3,smart:!1,catchError:!1},i=function(a,b){this.target=a,this.set(b)},j=function(a){var c=null;return f.neverOverwrite||b.forEach(g,function(d){b.equals(d.target,a)&&(c=d)}),c};return b.extend(i.prototype,{set:function(a){b.forEach(["action","argumentsArray","delay","smart","catchError"],function(b){a&&a[b]?this[b]=a[b]:this[b]||(this[b]=h[b])},this)},start:function(){function c(){l&&b.isDefined(f)&&!f.$resolved||(g=new Date,f=h[i].apply(n,j),f.$resolved=!1,(f.$promise||f).then(function(a){f.$resolved=!0,(b.isUndefined(n.stopTimestamp)||g>=n.stopTimestamp)&&n.deferred.notify(a)},function(a){f.$resolved=!0,m&&(b.isUndefined(n.stopTimestamp)||g>=n.stopTimestamp)&&n.deferred.notify(a)}))}var f,g,h=this.target,i=this.action,j=this.argumentsArray.slice(0),k=this.delay,l=this.smart,m=this.catchError,n=this;this.deferred=this.deferred||d.defer(),"string"==typeof h&&(j.unshift(h),h=e),c(),this.interval=a(c,k),this.promise=this.deferred.promise},stop:function(){b.isDefined(this.interval)&&(a.cancel(this.interval),this.interval=c,this.stopTimestamp=new Date)},restart:function(){this.stop(),this.start()}}),{get:function(a,b){var c=j(a);return c?(c.set(b),c.restart()):(c=new i(a,b),g.push(c),c.start()),c},size:function(){return g.length},stopAll:function(){b.forEach(g,function(a){a.stop()})},restartAll:function(){b.forEach(g,function(a){a.restart()})},reset:function(){this.stopAll(),g=[]}}}])}(window,window.angular); \ No newline at end of file diff --git a/bower.json b/bower.json index 11e2805..259cf21 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "angularpoller", "main": "angular-poller.min.js", - "version": "0.3.2", + "version": "0.3.3", "description": "Poller service for AngularJS", "homepage": "https://github.com/emmaguo/angular-poller.git", "author": { diff --git a/package.json b/package.json index 52ac1f1..cf915fd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "angular-poller", - "version": "0.3.2", + "version": "0.3.3", "dependencies": {}, "devDependencies": { "karma": "^0.12.31",