Skip to content

Commit b1f42cd

Browse files
bump version 0.5.1
1 parent 5a74331 commit b1f42cd

8 files changed

+20
-21
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
Changelog
22
==========
33

4+
## 0.5.1
5+
- Reworked cache logic to allow cache:true ([#96](https://github.com/chieffancypants/angular-loading-bar/pull/96))
6+
47
## 0.5.0
58
- Added spinner template configuration ([#82](https://github.com/chieffancypants/angular-loading-bar/pull/82))
69
- $timeout was not canceled properly ([#79](https://github.com/chieffancypants/angular-loading-bar/pull/79))

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2013 Wes Cruver
3+
Copyright (c) 2013-2014 Wes Cruver
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of
66
this software and associated documentation files (the "Software"), to deal in

bower.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-loading-bar",
3-
"version": "0.5.0",
3+
"version": "0.5.1",
44
"main": ["build/loading-bar.js", "build/loading-bar.css"],
55
"ignore": [
66
"**/.*",
@@ -10,7 +10,7 @@
1010
"example"
1111
],
1212
"devDependencies": {
13-
"angular-mocks": "~1.2.9",
14-
"angular-animate": "~1.2.9"
13+
"angular-mocks": "^1.2.9",
14+
"angular-animate": "^1.2.9"
1515
}
1616
}

build/loading-bar.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* angular-loading-bar v0.5.0
2+
* angular-loading-bar v0.5.1
33
* https://chieffancypants.github.io/angular-loading-bar
44
* Copyright (c) 2014 Wes Cruver
55
* License: MIT

build/loading-bar.js

+8-12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* angular-loading-bar v0.5.0
2+
* angular-loading-bar v0.5.1
33
* https://chieffancypants.github.io/angular-loading-bar
44
* Copyright (c) 2014 Wes Cruver
55
* License: MIT
@@ -73,19 +73,15 @@ angular.module('cfp.loadingBarInterceptor', ['cfp.loadingBar'])
7373
*/
7474
function isCached(config) {
7575
var cache;
76+
var defaultCache = $cacheFactory.get('$http');
7677
var defaults = $httpProvider.defaults;
7778

78-
if (config.method !== 'GET' || config.cache === false) {
79-
config.cached = false;
80-
return false;
81-
}
82-
83-
if (config.cache === true && defaults.cache === undefined) {
84-
cache = $cacheFactory.get('$http');
85-
} else if (defaults.cache !== undefined) {
86-
cache = defaults.cache;
87-
} else {
88-
cache = config.cache;
79+
// Choose the proper cache source. Borrowed from angular: $http service
80+
if ((config.cache || defaults.cache) && config.cache !== false &&
81+
(config.method === 'GET' || config.method === 'JSONP')) {
82+
cache = angular.isObject(config.cache) ? config.cache
83+
: angular.isObject(defaults.cache) ? defaults.cache
84+
: defaultCache;
8985
}
9086

9187
var cached = cache !== undefined ?

build/loading-bar.min.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/loading-bar.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-loading-bar",
3-
"version": "0.5.0",
3+
"version": "0.5.1",
44
"description": "An automatic loading bar for AngularJS",
55
"main": "src/loading-bar.js",
66
"directories": {

0 commit comments

Comments
 (0)