From 18c78817a8544ce784d3ff5a8fe68eb5e22f53a3 Mon Sep 17 00:00:00 2001 From: Eldar2021 Date: Sat, 27 Jul 2024 23:54:41 +0600 Subject: [PATCH] Created pkg mq_remote_client --- packages/mq_client/README.md | 1 - packages/mq_client/analysis_options.yaml | 14 ----- packages/mq_client/lib/mq_client.dart | 4 -- packages/mq_client/lib/src/mq_client.dart | 7 --- packages/mq_client/pubspec.yaml | 17 ----- .../mq_client/test/src/mq_client_test.dart | 12 ---- packages/mq_remote_client/README.md | 62 +++++++++++++++++++ .../mq_remote_client/analysis_options.yaml | 1 + .../lib/mq_remote_client.dart | 4 ++ .../lib/src/mq_remote_client.dart | 7 +++ packages/mq_remote_client/pubspec.yaml | 12 ++++ .../test/mq_remote_client_test.dart | 11 ++++ 12 files changed, 97 insertions(+), 55 deletions(-) delete mode 100644 packages/mq_client/README.md delete mode 100644 packages/mq_client/analysis_options.yaml delete mode 100644 packages/mq_client/lib/mq_client.dart delete mode 100644 packages/mq_client/lib/src/mq_client.dart delete mode 100644 packages/mq_client/pubspec.yaml delete mode 100644 packages/mq_client/test/src/mq_client_test.dart create mode 100644 packages/mq_remote_client/README.md create mode 100644 packages/mq_remote_client/analysis_options.yaml create mode 100644 packages/mq_remote_client/lib/mq_remote_client.dart create mode 100644 packages/mq_remote_client/lib/src/mq_remote_client.dart create mode 100644 packages/mq_remote_client/pubspec.yaml create mode 100644 packages/mq_remote_client/test/mq_remote_client_test.dart diff --git a/packages/mq_client/README.md b/packages/mq_client/README.md deleted file mode 100644 index f5c7ec16..00000000 --- a/packages/mq_client/README.md +++ /dev/null @@ -1 +0,0 @@ -# Mq Client diff --git a/packages/mq_client/analysis_options.yaml b/packages/mq_client/analysis_options.yaml deleted file mode 100644 index c69c2b11..00000000 --- a/packages/mq_client/analysis_options.yaml +++ /dev/null @@ -1,14 +0,0 @@ -include: package:very_good_analysis/analysis_options.yaml - -linter: - rules: - public_member_api_docs: false - sort_pub_dependencies: false - lines_longer_than_80_chars: false - directives_ordering: false - -analyzer: - exclude: - - "**/*.g.dart" - - "**/*.freezed.dart" - - "bin/cache/**" diff --git a/packages/mq_client/lib/mq_client.dart b/packages/mq_client/lib/mq_client.dart deleted file mode 100644 index d2d08090..00000000 --- a/packages/mq_client/lib/mq_client.dart +++ /dev/null @@ -1,4 +0,0 @@ -/// My Quran client -library mq_client; - -export 'src/mq_client.dart'; diff --git a/packages/mq_client/lib/src/mq_client.dart b/packages/mq_client/lib/src/mq_client.dart deleted file mode 100644 index 598ace9b..00000000 --- a/packages/mq_client/lib/src/mq_client.dart +++ /dev/null @@ -1,7 +0,0 @@ -/// {@template mq_client} -/// My Quran client -/// {@endtemplate} -class MqClient { - /// {@macro mq_client} - const MqClient(); -} diff --git a/packages/mq_client/pubspec.yaml b/packages/mq_client/pubspec.yaml deleted file mode 100644 index 2c698bd5..00000000 --- a/packages/mq_client/pubspec.yaml +++ /dev/null @@ -1,17 +0,0 @@ -name: mq_client -description: My Quran client -version: 0.1.0+1 -publish_to: none - -environment: - sdk: ">=3.4.0 <4.0.0" - -dependencies: - flutter: - sdk: flutter - -dev_dependencies: - flutter_test: - sdk: flutter - very_good_analysis: ^6.0.0 - mocktail: ^1.0.4 diff --git a/packages/mq_client/test/src/mq_client_test.dart b/packages/mq_client/test/src/mq_client_test.dart deleted file mode 100644 index 9afecf49..00000000 --- a/packages/mq_client/test/src/mq_client_test.dart +++ /dev/null @@ -1,12 +0,0 @@ -// ignore_for_file: prefer_const_constructors - -import 'package:flutter_test/flutter_test.dart'; -import 'package:mq_client/mq_client.dart'; - -void main() { - group('MqClient', () { - test('can be instantiated', () { - expect(MqClient(), isNotNull); - }); - }); -} diff --git a/packages/mq_remote_client/README.md b/packages/mq_remote_client/README.md new file mode 100644 index 00000000..667e32a6 --- /dev/null +++ b/packages/mq_remote_client/README.md @@ -0,0 +1,62 @@ +# Mq Remote Client + +[![style: very good analysis][very_good_analysis_badge]][very_good_analysis_link] +[![Powered by Mason](https://img.shields.io/endpoint?url=https%3A%2F%2Ftinyurl.com%2Fmason-badge)](https://github.com/felangel/mason) +[![License: MIT][license_badge]][license_link] + +MyQuran Remote Client + +## Installation ๐Ÿ’ป + +**โ— In order to start using Mq Remote Client you must have the [Dart SDK][dart_install_link] installed on your machine.** + +Install via `dart pub add`: + +```sh +dart pub add mq_remote_client +``` + +--- + +## Continuous Integration ๐Ÿค– + +Mq Remote Client comes with a built-in [GitHub Actions workflow][github_actions_link] powered by [Very Good Workflows][very_good_workflows_link] but you can also add your preferred CI/CD solution. + +Out of the box, on each pull request and push, the CI `formats`, `lints`, and `tests` the code. This ensures the code remains consistent and behaves correctly as you add functionality or make changes. The project uses [Very Good Analysis][very_good_analysis_link] for a strict set of analysis options used by our team. Code coverage is enforced using the [Very Good Workflows][very_good_coverage_link]. + +--- + +## Running Tests ๐Ÿงช + +To run all unit tests: + +```sh +dart pub global activate coverage 1.2.0 +dart test --coverage=coverage +dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info +``` + +To view the generated coverage report you can use [lcov](https://github.com/linux-test-project/lcov). + +```sh +# Generate Coverage Report +genhtml coverage/lcov.info -o coverage/ + +# Open Coverage Report +open coverage/index.html +``` + +[dart_install_link]: https://dart.dev/get-dart +[github_actions_link]: https://docs.github.com/en/actions/learn-github-actions +[license_badge]: https://img.shields.io/badge/license-MIT-blue.svg +[license_link]: https://opensource.org/licenses/MIT +[logo_black]: https://raw.githubusercontent.com/VGVentures/very_good_brand/main/styles/README/vgv_logo_black.png#gh-light-mode-only +[logo_white]: https://raw.githubusercontent.com/VGVentures/very_good_brand/main/styles/README/vgv_logo_white.png#gh-dark-mode-only +[mason_link]: https://github.com/felangel/mason +[very_good_analysis_badge]: https://img.shields.io/badge/style-very_good_analysis-B22C89.svg +[very_good_analysis_link]: https://pub.dev/packages/very_good_analysis +[very_good_coverage_link]: https://github.com/marketplace/actions/very-good-coverage +[very_good_ventures_link]: https://verygood.ventures +[very_good_ventures_link_light]: https://verygood.ventures#gh-light-mode-only +[very_good_ventures_link_dark]: https://verygood.ventures#gh-dark-mode-only +[very_good_workflows_link]: https://github.com/VeryGoodOpenSource/very_good_workflows diff --git a/packages/mq_remote_client/analysis_options.yaml b/packages/mq_remote_client/analysis_options.yaml new file mode 100644 index 00000000..bb720914 --- /dev/null +++ b/packages/mq_remote_client/analysis_options.yaml @@ -0,0 +1 @@ +include: package:very_good_analysis/analysis_options.6.0.0.yaml diff --git a/packages/mq_remote_client/lib/mq_remote_client.dart b/packages/mq_remote_client/lib/mq_remote_client.dart new file mode 100644 index 00000000..b95b23bf --- /dev/null +++ b/packages/mq_remote_client/lib/mq_remote_client.dart @@ -0,0 +1,4 @@ +/// MyQuran Remote Client +library; + +export 'src/mq_remote_client.dart'; diff --git a/packages/mq_remote_client/lib/src/mq_remote_client.dart b/packages/mq_remote_client/lib/src/mq_remote_client.dart new file mode 100644 index 00000000..13e4320e --- /dev/null +++ b/packages/mq_remote_client/lib/src/mq_remote_client.dart @@ -0,0 +1,7 @@ +/// {@template mq_remote_client} +/// MyQuran Remote Client +/// {@endtemplate} +class MqRemoteClient { + /// {@macro mq_remote_client} + const MqRemoteClient(); +} diff --git a/packages/mq_remote_client/pubspec.yaml b/packages/mq_remote_client/pubspec.yaml new file mode 100644 index 00000000..80938be3 --- /dev/null +++ b/packages/mq_remote_client/pubspec.yaml @@ -0,0 +1,12 @@ +name: mq_remote_client +description: MyQuran Remote Client +version: 0.1.0+1 +publish_to: none + +environment: + sdk: ^3.4.0 + +dev_dependencies: + mocktail: ^1.0.4 + test: ^1.25.7 + very_good_analysis: ^6.0.0 diff --git a/packages/mq_remote_client/test/mq_remote_client_test.dart b/packages/mq_remote_client/test/mq_remote_client_test.dart new file mode 100644 index 00000000..7e0bbbfa --- /dev/null +++ b/packages/mq_remote_client/test/mq_remote_client_test.dart @@ -0,0 +1,11 @@ +// ignore_for_file: prefer_const_constructors +import 'package:mq_remote_client/mq_remote_client.dart'; +import 'package:test/test.dart'; + +void main() { + group('MqRemoteClient', () { + test('can be instantiated', () { + expect(MqRemoteClient(), isNotNull); + }); + }); +}