Skip to content

Commit

Permalink
Merge pull request #60 from jmdobry/develop
Browse files Browse the repository at this point in the history
Develop - Release 2.0.0-rc.1
  • Loading branch information
jmdobry committed Oct 14, 2013
2 parents 838bf96 + 1dccdc8 commit 6670211
Show file tree
Hide file tree
Showing 52 changed files with 10,183 additions and 4,928 deletions.
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
##### 2.0.0-rc.1 - 14 October 2013

###### Breaking API changes
- Swapped `aggressiveDelete` option for `deleteOnExpire` option. #30, #47
- Changed `$angularCacheFactory.info()` to return an object similar to `AngularCache.info()` #45
- Namespaced angular-cache module under `jmdobry` so it is now "jmdobry.angular-cache". #42
- Substituted `storageImpl` and `sessionStorageImpl` options for just `storageImpl` option.

###### Backwards compatible API changes
- Added ability to set global cache defaults in $angularCacheFactoryProvider. #55

###### Backwards compatible bug fixes
- cacheFlushInterval doesn't clear web storage when storageMode is used. #52
- AngularCache#info(key) should return 'undefined' if the key isn't in the cache #53

###### Other
- Refactored angular-cache `setOptions()` internals to be less convoluted and to have better validation. #46
- Re-wrote documentation to be clearer and more organized. #56
- Fixed documentation where time spans were incorrectly labeled. #59

##### 1.2.0 - 20 September 2013

###### Backwards compatible API changes
Expand Down
19 changes: 16 additions & 3 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
clean: ['dist/', 'docs/'],
// these folders will no longer be checked into development branches
clean: ['dist/', 'docs/', 'coverage/'],
jshint: {
all: ['Gruntfile.js', 'src/**/*.js', 'test/*.js'],
jshintrc: '.jshintrc'
Expand Down Expand Up @@ -49,6 +50,16 @@ module.exports = function (grunt) {
},
travis: {
browsers: ['Firefox', 'PhantomJS']
},
release: {
coverageReporter: {
type: 'html',
dir: 'coverage/'
},
preprocessors: {
'src/angular-cache.js': ['coverage']
},
reporters: ['progress', 'coverage']
}
},
jsdoc : {
Expand All @@ -72,12 +83,14 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-karma');
grunt.loadNpmTasks('grunt-jsdoc');

grunt.registerTask('build', ['clean', 'jshint', 'copy', 'uglify', 'karma:dev']);
grunt.registerTask('build', ['clean', 'jshint', 'copy', 'uglify', 'karma:dev', 'jsdoc', 'clean']);
grunt.registerTask('default', ['build']);
grunt.registerTask('build:all', ['build', 'jsdoc']);
grunt.registerTask('test', ['karma:dev']);

// Used by the CLI build servers
grunt.registerTask('drone', ['clean', 'jshint', 'copy', 'uglify', 'karma:drone']);
grunt.registerTask('travis', ['clean', 'jshint', 'copy', 'uglify', 'karma:travis']);

// Only used on the develop branch
grunt.registerTask('release', ['clean', 'jshint', 'build', 'copy', 'uglify', 'karma:release', 'jsdoc']);
};
457 changes: 183 additions & 274 deletions README.md

Large diffs are not rendered by default.

73 changes: 73 additions & 0 deletions TRANSITION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
#### 1.x.x. ---> 2.0.0 - xx October 2013

##### Breaking API changes
- Swapped `aggressiveDelete` option for `deleteOnExpire` option.

###### 1.x.x
Aggressively delete expiring items.
```javascript
$angularCacheFactory('myNewCache', {
maxAge: 90000, // Items added to this cache expire after 15 minutes
aggressiveDelete: true // Items will be actively deleted when they expire
});
```

Passively delete items when they are requested after they have expired.
```javascript
$angularCacheFactory('myNewCache', {
maxAge: 90000, // Items added to this cache expire after 15 minutes
aggressiveDelete: false // Items will be actively deleted when they expire
});
```

###### 2.0.0
Aggressively delete expiring items.
```javascript
$angularCacheFactory('myNewCache', {
maxAge: 90000, // Items added to this cache expire after 15 minutes
deleteOnExpire: 'aggressive' // Items will be actively deleted when they expire
});
```

Passively delete items when they are requested after they have expired.
```javascript
$angularCacheFactory('myNewCache', {
maxAge: 90000, // Items added to this cache expire after 15 minutes
deleteOnExpire: 'passive' // Items will be passively deleted when requested after expiration
});

Do nothing with expired items (not in 1.x.x).
```javascript
$angularCacheFactory('myNewCache', {
maxAge: 90000, // Items added to this cache expire after 15 minutes
deleteOnExpire: 'none' // Items will expire but not be removed
});
```

- Substituted `localStorageImpl` and `sessionStorageImpl` options for just `storageImpl` option.

###### 1.x.x
```javascript
$angularCacheFactory('myNewCache', {
storageMode: 'localStorage',
localStorageImpl: myLocalStoragePolyfill // Use custom localStorage implementation
});
$angularCacheFactory('myNewCache2', {
storageMode: 'sessionStorage',
sessionStorageImpl: mySessionStoragePolyfill // Use custom sessionStorage implementation
});
```

###### 2.0.0
```javascript
$angularCacheFactory('myNewCache', {
storageMode: 'localStorage',
storageImpl: myLocalStoragePolyfill // Use custom localStorage implementation
});
$angularCacheFactory('myNewCache2', {
storageMode: 'sessionStorage',
storageImpl: mySessionStoragePolyfill // Use custom sessionStorage implementation
});
```
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"author": "Jason Dobry",
"name": "angular-cache",
"description": "angular-cache is a very useful replacement for Angular's $cacheFactory.",
"version": "1.2.0",
"version": "2.0.0-rc.1",
"homepage": "http://jmdobry.github.io/angular-cache/",
"repository": {
"type": "git",
Expand Down
26 changes: 13 additions & 13 deletions coverage/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -183,16 +183,16 @@
<h1>Code coverage report for <span class="entity">All files</span></h1>
<h2>

Statements: <span class="metric">96.44% <small>(325 / 337)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
Statements: <span class="metric">96.57% <small>(451 / 467)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;


Branches: <span class="metric">91.95% <small>(240 / 261)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
Branches: <span class="metric">92.41% <small>(341 / 369)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;


Functions: <span class="metric">100% <small>(44 / 44)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
Functions: <span class="metric">100% <small>(61 / 61)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;


Lines: <span class="metric">96.44% <small>(325 / 337)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
Lines: <span class="metric">96.57% <small>(451 / 467)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;

</h2>
<div class="path"></div>
Expand All @@ -216,23 +216,23 @@ <h2>
</thead>
<tbody><tr>
<td class="file high" data-value="./src\"><a href="./src/index.html">./src\</a></td>
<td data-value="96.44" class="pic high"><span class="cover-fill" style="width: 96px;"></span><span class="cover-empty" style="width:4px;"></span></td>
<td data-value="96.44" class="pct high">96.44%</td>
<td data-value="337" class="abs high">(325&nbsp;/&nbsp;337)</td>
<td data-value="91.95" class="pct high">91.95%</td>
<td data-value="261" class="abs high">(240&nbsp;/&nbsp;261)</td>
<td data-value="96.57" class="pic high"><span class="cover-fill" style="width: 96px;"></span><span class="cover-empty" style="width:4px;"></span></td>
<td data-value="96.57" class="pct high">96.57%</td>
<td data-value="467" class="abs high">(451&nbsp;/&nbsp;467)</td>
<td data-value="92.41" class="pct high">92.41%</td>
<td data-value="369" class="abs high">(341&nbsp;/&nbsp;369)</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="44" class="abs high">(44&nbsp;/&nbsp;44)</td>
<td data-value="96.44" class="pct high">96.44%</td>
<td data-value="337" class="abs high">(325&nbsp;/&nbsp;337)</td>
<td data-value="61" class="abs high">(61&nbsp;/&nbsp;61)</td>
<td data-value="96.57" class="pct high">96.57%</td>
<td data-value="467" class="abs high">(451&nbsp;/&nbsp;467)</td>
</tr>

</tbody>
</table>
</div>
</div>
<div class="footer">
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sat Sep 21 2013 10:34:02 GMT-0600 (Mountain Daylight Time)</div>
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Sun Oct 13 2013 22:37:11 GMT-0600 (Mountain Daylight Time)</div>
</div>

<script src="prettify.js"></script>
Expand Down
Loading

0 comments on commit 6670211

Please sign in to comment.