From f8b1aef906df2126aaabc6553136d08c0972c711 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Fri, 5 Jun 2020 01:59:26 +0200 Subject: [PATCH] Integrate ruma-api --- ruma-api/.rustfmt.toml => .rustfmt.toml | 0 .../CHANGELOG.md | 0 .../Cargo.toml | 0 .../README.md | 0 .../src/api.rs | 0 .../src/api/attribute.rs | 0 .../src/api/metadata.rs | 0 .../src/api/request.rs | 0 .../src/api/response.rs | 0 .../src/lib.rs | 0 ruma-api/.builds/beta.yml | 27 ---------------- ruma-api/.builds/msrv.yml | 16 ---------- ruma-api/.builds/nightly.yml | 32 ------------------- ruma-api/.builds/stable.yml | 29 ----------------- ruma-api/Cargo.toml | 9 ++---- 15 files changed, 2 insertions(+), 111 deletions(-) rename ruma-api/.rustfmt.toml => .rustfmt.toml (100%) rename {ruma-api/ruma-api-macros => ruma-api-macros}/CHANGELOG.md (100%) rename {ruma-api/ruma-api-macros => ruma-api-macros}/Cargo.toml (100%) rename {ruma-api/ruma-api-macros => ruma-api-macros}/README.md (100%) rename {ruma-api/ruma-api-macros => ruma-api-macros}/src/api.rs (100%) rename {ruma-api/ruma-api-macros => ruma-api-macros}/src/api/attribute.rs (100%) rename {ruma-api/ruma-api-macros => ruma-api-macros}/src/api/metadata.rs (100%) rename {ruma-api/ruma-api-macros => ruma-api-macros}/src/api/request.rs (100%) rename {ruma-api/ruma-api-macros => ruma-api-macros}/src/api/response.rs (100%) rename {ruma-api/ruma-api-macros => ruma-api-macros}/src/lib.rs (100%) delete mode 100644 ruma-api/.builds/beta.yml delete mode 100644 ruma-api/.builds/msrv.yml delete mode 100644 ruma-api/.builds/nightly.yml delete mode 100644 ruma-api/.builds/stable.yml diff --git a/ruma-api/.rustfmt.toml b/.rustfmt.toml similarity index 100% rename from ruma-api/.rustfmt.toml rename to .rustfmt.toml diff --git a/ruma-api/ruma-api-macros/CHANGELOG.md b/ruma-api-macros/CHANGELOG.md similarity index 100% rename from ruma-api/ruma-api-macros/CHANGELOG.md rename to ruma-api-macros/CHANGELOG.md diff --git a/ruma-api/ruma-api-macros/Cargo.toml b/ruma-api-macros/Cargo.toml similarity index 100% rename from ruma-api/ruma-api-macros/Cargo.toml rename to ruma-api-macros/Cargo.toml diff --git a/ruma-api/ruma-api-macros/README.md b/ruma-api-macros/README.md similarity index 100% rename from ruma-api/ruma-api-macros/README.md rename to ruma-api-macros/README.md diff --git a/ruma-api/ruma-api-macros/src/api.rs b/ruma-api-macros/src/api.rs similarity index 100% rename from ruma-api/ruma-api-macros/src/api.rs rename to ruma-api-macros/src/api.rs diff --git a/ruma-api/ruma-api-macros/src/api/attribute.rs b/ruma-api-macros/src/api/attribute.rs similarity index 100% rename from ruma-api/ruma-api-macros/src/api/attribute.rs rename to ruma-api-macros/src/api/attribute.rs diff --git a/ruma-api/ruma-api-macros/src/api/metadata.rs b/ruma-api-macros/src/api/metadata.rs similarity index 100% rename from ruma-api/ruma-api-macros/src/api/metadata.rs rename to ruma-api-macros/src/api/metadata.rs diff --git a/ruma-api/ruma-api-macros/src/api/request.rs b/ruma-api-macros/src/api/request.rs similarity index 100% rename from ruma-api/ruma-api-macros/src/api/request.rs rename to ruma-api-macros/src/api/request.rs diff --git a/ruma-api/ruma-api-macros/src/api/response.rs b/ruma-api-macros/src/api/response.rs similarity index 100% rename from ruma-api/ruma-api-macros/src/api/response.rs rename to ruma-api-macros/src/api/response.rs diff --git a/ruma-api/ruma-api-macros/src/lib.rs b/ruma-api-macros/src/lib.rs similarity index 100% rename from ruma-api/ruma-api-macros/src/lib.rs rename to ruma-api-macros/src/lib.rs diff --git a/ruma-api/.builds/beta.yml b/ruma-api/.builds/beta.yml deleted file mode 100644 index c56e6ea1..00000000 --- a/ruma-api/.builds/beta.yml +++ /dev/null @@ -1,27 +0,0 @@ -image: archlinux -packages: - - rustup -sources: - - https://github.com/ruma/ruma-api -tasks: - - rustup: | - # We specify --profile minimal because we'd otherwise download docs - rustup toolchain install beta --profile minimal -c rustfmt -c clippy - rustup default beta - - test: | - cd ruma-api - - # We don't want the build to stop on individual failure of independent - # tools, so capture tool exit codes and set the task exit code manually - set +e - - cargo fmt -- --check - fmt_exit=$? - - cargo clippy --all-targets --all-features -- -D warnings - clippy_exit=$? - - cargo test --verbose - test_exit=$? - - exit $(( $fmt_exit || $clippy_exit || $test_exit )) diff --git a/ruma-api/.builds/msrv.yml b/ruma-api/.builds/msrv.yml deleted file mode 100644 index de504675..00000000 --- a/ruma-api/.builds/msrv.yml +++ /dev/null @@ -1,16 +0,0 @@ -image: archlinux -packages: - - rustup -sources: - - https://github.com/ruma/ruma-api -tasks: - - rustup: | - # We specify --profile minimal because we'd otherwise download docs - rustup toolchain install 1.40.0 --profile minimal - rustup default 1.40.0 - - test: | - cd ruma-api - - # Only make sure the code builds with the MSRV. Tests can require later - # Rust versions, don't compile or run them. - cargo build --verbose diff --git a/ruma-api/.builds/nightly.yml b/ruma-api/.builds/nightly.yml deleted file mode 100644 index 6b597d7d..00000000 --- a/ruma-api/.builds/nightly.yml +++ /dev/null @@ -1,32 +0,0 @@ -image: archlinux -packages: - - rustup -sources: - - https://github.com/ruma/ruma-api -tasks: - - rustup: | - rustup toolchain install nightly --profile minimal - rustup default nightly - - # Try installing rustfmt & clippy for nightly, but don't fail the build - # if they are not available - rustup component add rustfmt || true - rustup component add clippy || true - - test: | - cd ruma-api - - # We don't want the build to stop on individual failure of independent - # tools, so capture tool exit codes and set the task exit code manually - set +e - - if ( rustup component list | grep -q rustfmt ); then - cargo fmt -- --check - fi - fmt_exit=$? - - if ( rustup component list | grep -q clippy ); then - cargo clippy --all-targets --all-features -- -D warnings - fi - clippy_exit=$? - - exit $(( $fmt_exit || $clippy_exit )) diff --git a/ruma-api/.builds/stable.yml b/ruma-api/.builds/stable.yml deleted file mode 100644 index 58a6ce91..00000000 --- a/ruma-api/.builds/stable.yml +++ /dev/null @@ -1,29 +0,0 @@ -image: archlinux -packages: - - rustup -sources: - - https://github.com/ruma/ruma-api -tasks: - - rustup: | - # We specify --profile minimal because we'd otherwise download docs - rustup toolchain install stable --profile minimal -c rustfmt -c clippy - rustup default stable - - test: | - cd ruma-api - - # We don't want the build to stop on individual failure of independent - # tools, so capture tool exit codes and set the task exit code manually - set +e - - cargo fmt -- --check - fmt_exit=$? - - cargo clippy --all-targets --all-features -- -D warnings - clippy_exit=$? - - cargo test --all-features --verbose - test_exit=$? - - exit $(( $fmt_exit || $clippy_exit || $test_exit )) - # TODO: Add audit task once cargo-audit binary releases are available. - # See https://github.com/RustSec/cargo-audit/issues/66 diff --git a/ruma-api/Cargo.toml b/ruma-api/Cargo.toml index b813d604..9fcb3e6c 100644 --- a/ruma-api/Cargo.toml +++ b/ruma-api/Cargo.toml @@ -18,17 +18,12 @@ edition = "2018" [dependencies] http = "0.2.1" percent-encoding = "2.1.0" -ruma-api-macros = { version = "=0.16.1", path = "ruma-api-macros" } +ruma-api-macros = { version = "=0.16.1", path = "../ruma-api-macros" } ruma-identifiers = "0.16.1" -ruma-serde = "0.2.0" +ruma-serde = { version = "0.2.0", path = "../ruma-serde" } serde = { version = "1.0.110", features = ["derive"] } serde_json = "1.0.53" strum = "0.18.0" [dev-dependencies] ruma-events = "0.21.1" - -[workspace] -members = [ - "ruma-api-macros", -]