Updated angel_auth_cache
This commit is contained in:
parent
c94ec5f3fe
commit
4cd80f4dd0
3 changed files with 32 additions and 18 deletions
15
CHANGELOG.md
15
CHANGELOG.md
|
@ -1,4 +1,10 @@
|
|||
# 3.0.0
|
||||
# 3.0.1 (NNBD)
|
||||
* Changed Dart SDK requirements for all packages to ">=2.12.0 <3.0.0" to support NNBD.
|
||||
* Updated pretty_logging to 2.0.0
|
||||
* Updated angel_http_exception to 2.0.0
|
||||
* Updated angel_cli to 3.0.0. (Rename not working)
|
||||
|
||||
# 3.0.0 (Non NNBD)
|
||||
* Changed Dart SDK requirements for all packages to ">=2.10.0 <3.0.0"
|
||||
* Updated pretty_logging to 2.0.0
|
||||
* Updated angel_http_exception to 2.0.0
|
||||
|
@ -31,7 +37,8 @@
|
|||
* Updated angel_orm_test to 1.0.0
|
||||
* Updated angel_orm_postgres to 2.0.0
|
||||
* Update orm-sdk-2.12.x boilerplate
|
||||
|
||||
* Updated angel_auth_oauth2 to 3.0.0
|
||||
* Updated angel_auth_cache to 3.0.0
|
||||
|
||||
# 2.2.0
|
||||
* Changed Dart SDK requirements for all packages to ">=2.10.0 <2.12.0"
|
||||
|
@ -39,6 +46,6 @@
|
|||
* Fixed broken code due to 3rd party libraries update
|
||||
* Revert packages/validate from version 3.0 to version 2.2
|
||||
|
||||
# 2.1.1 and before
|
||||
* Refer to packages/framework/CHANGELOG.md
|
||||
# 2.1.x and below
|
||||
* Refer to the orginal repo before the fork
|
||||
|
||||
|
|
25
packages/cache/pubspec.yaml
vendored
25
packages/cache/pubspec.yaml
vendored
|
@ -1,19 +1,26 @@
|
|||
name: angel_cache
|
||||
version: 2.0.1
|
||||
version: 3.0.0
|
||||
homepage: https://github.com/angel-dart/cache
|
||||
description: Support for server-side caching in Angel.
|
||||
author: Tobe O <thosakwe@gmail.com>
|
||||
publish_to: none
|
||||
environment:
|
||||
sdk: ">=2.10.0 <2.12.0"
|
||||
sdk: ">=2.10.0 <3.0.0"
|
||||
dependencies:
|
||||
angel_framework: #^2.0.0-alpha
|
||||
path: ../framework
|
||||
angel_framework:
|
||||
git:
|
||||
url: https://github.com/dukefirehawk/angel.git
|
||||
ref: sdk-2.12.x
|
||||
path: packages/framework
|
||||
collection: ^1.0.0
|
||||
meta: ^1.0.0
|
||||
pool: ^1.0.0
|
||||
dev_dependencies:
|
||||
angel_test: # ^2.0.0-alpha
|
||||
path: ../test
|
||||
glob: ^1.0.0
|
||||
http: any
|
||||
test: ^1.15.7
|
||||
angel_test:
|
||||
git:
|
||||
url: https://github.com/dukefirehawk/angel.git
|
||||
ref: sdk-2.12.x
|
||||
path: packages/test
|
||||
glob: ^2.0.0
|
||||
http: ^0.13.0
|
||||
test: ^1.16.5
|
10
packages/cache/test/cache_test.dart
vendored
10
packages/cache/test/cache_test.dart
vendored
|
@ -42,8 +42,8 @@ main() async {
|
|||
};
|
||||
|
||||
client = await connectTo(app);
|
||||
response1 = await client.get('/date.txt');
|
||||
response2 = await client.get('/date.txt');
|
||||
response1 = await client.get(Uri.parse('/date.txt'));
|
||||
response2 = await client.get(Uri.parse('/date.txt'));
|
||||
print(response2.headers);
|
||||
lastModified = HttpDate.parse(response2.headers['last-modified']);
|
||||
print('Response 1 status: ${response1.statusCode}');
|
||||
|
@ -76,7 +76,7 @@ main() async {
|
|||
|
||||
test('invalidate', () async {
|
||||
await client.sendUnstreamed('PURGE', '/date.txt', {});
|
||||
var response = await client.get('/date.txt');
|
||||
var response = await client.get(Uri.parse('/date.txt'));
|
||||
print('Response after invalidation: ${response.body}');
|
||||
expect(response.body, isNot(response1.body));
|
||||
});
|
||||
|
@ -86,14 +86,14 @@ main() async {
|
|||
'if-modified-since':
|
||||
HttpDate.format(lastModified.add(const Duration(days: 1)))
|
||||
};
|
||||
var response = await client.get('/date.txt', headers: headers);
|
||||
var response = await client.get(Uri.parse('/date.txt'), headers: headers);
|
||||
print('Sending headers: $headers');
|
||||
print('Response (${response.statusCode}): ${response.headers}');
|
||||
expect(response.statusCode, 304);
|
||||
});
|
||||
|
||||
test('last-modified in the past', () async {
|
||||
var response = await client.get('/date.txt', headers: {
|
||||
var response = await client.get(Uri.parse('/date.txt'), headers: {
|
||||
'if-modified-since':
|
||||
HttpDate.format(lastModified.subtract(const Duration(days: 10)))
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue