Skip to content

Commit bc1fb07

Browse files
Merge pull request #356 from YuukiToriyama/feature/revert-multi-module/master
マルチクレート化の切り戻しをrelease/v0.1.7にマージ
2 parents 9796bad + f301d84 commit bc1fb07

File tree

22 files changed

+47
-114
lines changed

22 files changed

+47
-114
lines changed

.github/workflows/run-test.yaml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,6 @@ jobs:
1919
shared-key: 'test-on-pr'
2020
key: 'main'
2121
save-if: ${{ github.ref == 'refs/heads/main' }} # mainブランチにコミットが追加された時のみキャッシュを保存する
22-
- name: Test domain
23-
working-directory: domain
24-
run: cargo test
25-
- name: Test service
26-
working-directory: service
27-
run: |
28-
cargo test
29-
cargo test --features=blocking
30-
- name: Test repository
31-
working-directory: repository
32-
run: |
33-
cargo test
34-
cargo test --features=blocking
3522
- name: Test core
3623
working-directory: core
3724
run: |

Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ members = [
44
"wasm",
55
"python",
66
"tests",
7-
"domain",
8-
"service",
9-
"repository",
107
]
118
resolver = "2"
129

core/Cargo.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,20 @@ crate-type = ["rlib", "cdylib"]
1616

1717
[features]
1818
default = []
19-
blocking = ["repository/blocking"]
19+
blocking = ["reqwest/blocking"]
2020

2121
[dependencies]
22-
domain = { path = "../domain" }
23-
repository = { path = "../repository" }
2422
itertools = "0.13.0"
2523
js-sys = "0.3.67"
2624
nom = "7.1.3"
2725
rapidfuzz = "0.5.0"
2826
regex = "1.10.2"
2927
serde.workspace = true
28+
reqwest = { version = "0.12.5", default-features = false, features = ["json", "rustls-tls"] }
3029

3130
[dev-dependencies]
3231
tokio.workspace = true
3332
wasm-bindgen-test = { workspace = true }
33+
34+
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
35+
mockito = "1.4.0" # mockitoがwasm32に対応していないため

core/src/api.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
pub use repository::geolonia::city_master_api;
2-
pub use repository::geolonia::prefecture_master_api;
1+
pub use crate::repository::geolonia::city_master_api;
2+
pub use crate::repository::geolonia::prefecture_master_api;
33

4-
use domain::geolonia::entity::{City, Prefecture};
5-
use domain::geolonia::error::Error;
6-
use repository::geolonia::city_master_api::CityMasterApi;
7-
use repository::geolonia::prefecture_master_api::PrefectureMasterApi;
4+
use crate::domain::geolonia::entity::{City, Prefecture};
5+
use crate::domain::geolonia::error::Error;
6+
use crate::repository::geolonia::city_master_api::CityMasterApi;
7+
use crate::repository::geolonia::prefecture_master_api::PrefectureMasterApi;
88

99
#[derive(Default)]
1010
pub struct AsyncApi {
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

core/src/entity.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
pub use crate::domain::geolonia::entity::Address;
2+
pub use crate::domain::geolonia::entity::City;
3+
pub use crate::domain::geolonia::entity::Prefecture;
4+
pub use crate::domain::geolonia::entity::Town;
15
pub use crate::parser::ParseResult;
2-
pub use domain::geolonia::entity::Address;
3-
pub use domain::geolonia::entity::City;
4-
pub use domain::geolonia::entity::Prefecture;
5-
pub use domain::geolonia::entity::Town;

core/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ compile_error! {
44
}
55

66
pub mod api;
7+
mod domain;
78
#[deprecated(since = "0.1.6", note = "This module will be deleted in v0.2")]
89
pub mod entity;
910
pub mod parser;
11+
mod repository;
12+
mod service;
1013
mod tokenizer;
1114
mod util;

0 commit comments

Comments
 (0)