From 3ba0d166c794faca0b90fa8885a171d025efd04f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kl=C3=BCpfel?= Date: Sun, 28 Jul 2024 11:47:12 +0200 Subject: [PATCH] removes flutter dependency --- .github/workflows/{flutter.yml => dart.yml} | 1 + .gitignore | 3 +++ .metadata | 10 ---------- CHANGELOG.md | 4 ++++ README.md | 2 +- analysis_options.yaml | 2 +- pubspec.yaml | 10 +++------- test/token_bucket_state_test.dart | 3 ++- test/token_bucket_storage_test.dart | 3 ++- test/token_bucket_test.dart | 3 ++- 10 files changed, 19 insertions(+), 22 deletions(-) rename .github/workflows/{flutter.yml => dart.yml} (94%) delete mode 100644 .metadata diff --git a/.github/workflows/flutter.yml b/.github/workflows/dart.yml similarity index 94% rename from .github/workflows/flutter.yml rename to .github/workflows/dart.yml index 35e32a8..3fd53ee 100644 --- a/.github/workflows/flutter.yml +++ b/.github/workflows/dart.yml @@ -9,6 +9,7 @@ jobs: steps: - uses: actions/checkout@v4 + # testing is simpler with Flutter - uses: subosito/flutter-action@v2 - name: Install dependencies diff --git a/.gitignore b/.gitignore index ac5aa98..e3d8d9e 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,6 @@ migrate_working_dir/ **/doc/api/ .dart_tool/ build/ + +# Coverage +coverage/ \ No newline at end of file diff --git a/.metadata b/.metadata deleted file mode 100644 index 88ae564..0000000 --- a/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: "b0850beeb25f6d5b10426284f506557f66181b36" - channel: "stable" - -project_type: package diff --git a/CHANGELOG.md b/CHANGELOG.md index 6da5766..5f56dca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.1 + +- removes Flutter dependency + ## 0.1.0 - initial release diff --git a/README.md b/README.md index ea3b928..44feb10 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![likes](https://img.shields.io/pub/likes/token_bucket_algorithm)](https://pub.dev/packages/token_bucket_algorithm/score) [![popularity](https://img.shields.io/pub/popularity/token_bucket_algorithm)](https://pub.dev/packages/token_bucket_algorithm/score) [![pub points](https://img.shields.io/pub/points/token_bucket_algorithm)](https://pub.dev/packages/token_bucket_algorithm/score) -[![license](https://img.shields.io/github/license/splashbyte/dart_token_bucket_algorithm.svg)](https://github.com/SplashByte/dart_token_bucket_algorithm/blob/main/LICENSE) +[![license](https://img.shields.io/github/license/splashbyte/dart_token_bucket_algorithm.svg)](https://github.com/splashbyte/dart_token_bucket_algorithm/blob/main/LICENSE) [![codecov](https://codecov.io/gh/splashbyte/dart_token_bucket_algorithm/branch/main/graph/badge.svg?token=NY1D6W88H2)](https://codecov.io/gh/splashbyte/dart_token_bucket_algorithm) This Dart package provides rate limiting by using an implementation of the token bucket algorithm. diff --git a/analysis_options.yaml b/analysis_options.yaml index 055a687..31eeeee 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1,4 +1,4 @@ -include: package:flutter_lints/flutter.yaml +include: package:lints/recommended.yaml analyzer: language: diff --git a/pubspec.yaml b/pubspec.yaml index 0e3433f..18ec327 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: token_bucket_algorithm description: "Implementation of the token bucket algorithm." -version: 0.1.0 +version: 0.1.1 repository: https://github.com/splashbyte/dart_token_bucket_algorithm issue_tracker: https://github.com/splashbyte/dart_token_bucket_algorithm/issues @@ -12,16 +12,12 @@ topics: environment: sdk: '>=3.0.0 <4.0.0' - flutter: ">=1.17.0" dependencies: - flutter: - sdk: flutter clock: ^1.1.1 dev_dependencies: - flutter_test: - sdk: flutter - flutter_lints: ^3.0.0 + test: '>=1.15.0 <2.0.0' + lints: ^4.0.0 fake_async: ^1.3.1 mocktail: ^1.0.4 diff --git a/test/token_bucket_state_test.dart b/test/token_bucket_state_test.dart index 4cb3578..d7ee19f 100644 --- a/test/token_bucket_state_test.dart +++ b/test/token_bucket_state_test.dart @@ -1,4 +1,5 @@ -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/expect.dart'; +import 'package:test/scaffolding.dart'; import 'package:token_bucket_algorithm/token_bucket_algorithm.dart'; void main() { diff --git a/test/token_bucket_storage_test.dart b/test/token_bucket_storage_test.dart index 2f60a36..d1da7ce 100644 --- a/test/token_bucket_storage_test.dart +++ b/test/token_bucket_storage_test.dart @@ -1,4 +1,5 @@ -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/expect.dart'; +import 'package:test/scaffolding.dart'; import 'package:token_bucket_algorithm/token_bucket_algorithm.dart'; void _testStorage(TokenBucketStorage storage) { diff --git a/test/token_bucket_test.dart b/test/token_bucket_test.dart index 1d86168..a7ad676 100644 --- a/test/token_bucket_test.dart +++ b/test/token_bucket_test.dart @@ -1,7 +1,8 @@ import 'package:clock/clock.dart'; import 'package:fake_async/fake_async.dart'; -import 'package:flutter_test/flutter_test.dart'; import 'package:mocktail/mocktail.dart'; +import 'package:test/expect.dart'; +import 'package:test/scaffolding.dart'; import 'package:token_bucket_algorithm/token_bucket_algorithm.dart'; import 'mocks.dart';