Skip to content

Commit

Permalink
refactor: rebrand
Browse files Browse the repository at this point in the history
  • Loading branch information
zyrouge committed Oct 16, 2023
1 parent a6baa80 commit e68f86a
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
dart pub get
- name: 🧪 Test modules
run: dart run ./test/all.dart --ci
run: dart run ./store/test/all.dart --ci

- name: 🚀 Upload summary
if: always()
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<p align="center">
<img src="https://github.com/yukino-org/media/blob/main/images/subbanners/gh-tenka-banner.png?raw=true">
<img src="https://github.com/yukino-org/media/blob/main/images/subbanners/gh-sora-banner.png?raw=true">
</p>

# Tenka Modules
# Sora

⚡ Officially maintained Tenka modules by Yukino. Check module status [here](https://github.com/yukino-org/sora/tree/summary#readme).

Expand Down
Empty file.
16 changes: 12 additions & 4 deletions modules/anime/animepahe_com/test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,25 @@ abstract class MockedData {

final MockedAnimeExtractor mocked = MockedAnimeExtractor(
search: (final AnimeExtractor ext) async {
final List<SearchInfo> results = await ext.search('bunny girl', locale);
final List<SearchInfo> results = await ext.search(
'bunny girl',
ext.defaultLocale,
);
MockedData.animeURL = results.first.url;
return results;
},
getInfo: (final AnimeExtractor ext) async {
final AnimeInfo result = await ext.getInfo(MockedData.animeURL, locale);
final AnimeInfo result = await ext.getInfo(
MockedData.animeURL,
ext.defaultLocale,
);
MockedData.episodeURL = result.episodes.first.url;
return result;
},
getSource: (final AnimeExtractor ext) =>
ext.getSource(MockedData.episodeURL, locale),
getSource: (final AnimeExtractor ext) => ext.getSource(
MockedData.episodeURL,
ext.defaultLocale,
),
);

Future<void> main() async {
Expand Down
Empty file.
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: tenka_modules
name: sora
description: "⚡ Officially maintained Tenka modules by Yukino."
version: 0.0.0

Expand Down
8 changes: 4 additions & 4 deletions test/all.dart → store/test/all.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import 'package:path/path.dart' as path;
import 'package:tenka/tenka.dart';
import 'package:tenka_dev_tools/tenka_dev_tools.dart';
import 'package:utilx/utils.dart';
import '../tools/utils.dart';
import 'files.dart';
import '../../tools/utils.dart';
import 'modules.dart';

class TestAll {
final Map<String, Map<String, Benchmarks>> animeResults =
Expand Down Expand Up @@ -191,11 +191,11 @@ Future<void> main(final List<String> args) async {
await tester.init();

final List<Future<void> Function()> fns = <Future<void> Function()>[
...TestFiles.anime.entries.map(
...TestModules.anime.entries.map(
(final MapEntry<TenkaLocalFileDS, MockedAnimeExtractor> x) =>
() => tester.run(TenkaType.anime, x.key, () => x.value.run(x.key)),
),
...TestFiles.manga.entries.map(
...TestModules.manga.entries.map(
(final MapEntry<TenkaLocalFileDS, MockedMangaExtractor> x) =>
() => tester.run(TenkaType.manga, x.key, () => x.value.run(x.key)),
),
Expand Down
14 changes: 7 additions & 7 deletions test/files.dart → store/test/modules.dart
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import 'package:tenka/tenka.dart';
import 'package:tenka_dev_tools/tenka_dev_tools.dart';
import '../modules/anime/animepahe_com/test.dart' as animepahe_com;
import '../modules/anime/gogoanime_bid/test.dart' as gogoanime_bid;
import '../modules/anime/hanime_tv/test.dart' as hanime_tv;
import '../modules/manga/fanfox_net/test.dart' as fanfox_net;
import '../modules/manga/mangadex_org/test.dart' as mangadex_org;
import '../modules/manga/readm_org/test.dart' as readm_org;
import '../../modules/anime/animepahe_com/test.dart' as animepahe_com;
import '../../modules/anime/gogoanime_bid/test.dart' as gogoanime_bid;
import '../../modules/anime/hanime_tv/test.dart' as hanime_tv;
import '../../modules/manga/fanfox_net/test.dart' as fanfox_net;
import '../../modules/manga/mangadex_org/test.dart' as mangadex_org;
import '../../modules/manga/readm_org/test.dart' as readm_org;

abstract class TestFiles {
abstract class TestModules {
static final Map<TenkaLocalFileDS, MockedAnimeExtractor> anime =
<TenkaLocalFileDS, MockedAnimeExtractor>{
animepahe_com.source: gogoanime_bid.mocked,
Expand Down

0 comments on commit e68f86a

Please sign in to comment.