From 4cd80f4dd0c743114edf93057d94f105e6414190 Mon Sep 17 00:00:00 2001 From: thomashii Date: Sat, 13 Mar 2021 08:17:38 +0800 Subject: [PATCH] Updated angel_auth_cache --- CHANGELOG.md | 15 +++++++++++---- packages/cache/pubspec.yaml | 25 ++++++++++++++++--------- packages/cache/test/cache_test.dart | 10 +++++----- 3 files changed, 32 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d11a950d..35a1176a 100644 --- a/CHANGELOG.md +++ b/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 diff --git a/packages/cache/pubspec.yaml b/packages/cache/pubspec.yaml index a4760fe2..19d5f5b7 100644 --- a/packages/cache/pubspec.yaml +++ b/packages/cache/pubspec.yaml @@ -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 +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 \ No newline at end of file + 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 \ No newline at end of file diff --git a/packages/cache/test/cache_test.dart b/packages/cache/test/cache_test.dart index 011981f0..2131bbc0 100644 --- a/packages/cache/test/cache_test.dart +++ b/packages/cache/test/cache_test.dart @@ -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))) });