Fix client build

This commit is contained in:
Adrian Wozniak 2020-05-01 23:10:54 +02:00
parent e5b8c0838c
commit d13c31b6ae
6 changed files with 71 additions and 26 deletions

View File

@ -11,10 +11,9 @@ secrets:
tasks:
- build_config: |
cd jirs/jirs-server
echo 'concurrency = 2' >> db.test.toml
echo 'database_url = "postgres://postgres@localhost:5432/jirs_test"' >> db.test.toml
cp ~/jirs/.builds/db.toml ~/jirs/jirs-server/db.toml
- setup: |
sudo systemctl start postgresql
1
rustup toolchain install nightly
rustup default nightly
cargo install diesel_cli --no-default-features --features postgres

67
Cargo.lock generated
View File

@ -1399,24 +1399,6 @@ checksum = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e"
name = "jirs-cli"
version = "0.1.0"
[[package]]
name = "jirs-client"
version = "0.1.0"
dependencies = [
"bincode",
"chrono",
"comrak",
"futures 0.1.29",
"jirs-data",
"js-sys",
"seed",
"serde",
"serde_json",
"uuid 0.8.1",
"wasm-bindgen",
"web-sys",
]
[[package]]
name = "jirs-css"
version = "0.1.0"
@ -1479,6 +1461,25 @@ dependencies = [
"uuid 0.8.1",
]
[[package]]
name = "jirs_client"
version = "0.1.0"
dependencies = [
"bincode",
"chrono",
"comrak",
"futures 0.1.29",
"jirs-data",
"js-sys",
"seed",
"serde",
"serde_json",
"uuid 0.8.1",
"wasm-bindgen",
"wasm-bindgen-test",
"web-sys",
]
[[package]]
name = "js-sys"
version = "0.3.37"
@ -2339,6 +2340,12 @@ dependencies = [
"parking_lot",
]
[[package]]
name = "scoped-tls"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2"
[[package]]
name = "scopeguard"
version = "1.1.0"
@ -2929,6 +2936,30 @@ version = "0.2.60"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "daf76fe7d25ac79748a37538b7daeed1c7a6867c92d3245c12c6222e4a20d639"
[[package]]
name = "wasm-bindgen-test"
version = "0.3.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "648da3460c6d2aa04b715a936329e2e311180efe650b2127d6267f4193ccac14"
dependencies = [
"console_error_panic_hook",
"js-sys",
"scoped-tls",
"wasm-bindgen",
"wasm-bindgen-futures",
"wasm-bindgen-test-macro",
]
[[package]]
name = "wasm-bindgen-test-macro"
version = "0.3.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf2f86cd78a2aa7b1fb4bb6ed854eccb7f9263089c79542dca1576a1518a8467"
dependencies = [
"proc-macro2",
"quote",
]
[[package]]
name = "web-sys"
version = "0.3.37"

View File

@ -1,5 +1,5 @@
[package]
name = "jirs-client"
name = "jirs_client"
version = "0.1.0"
authors = ["Adrian Wozniak <adrian.wozniak@ita-prog.pl>"]
edition = "2018"
@ -23,8 +23,8 @@ seed = { version = "*" }
serde = "*"
serde_json = "*"
bincode = "1.2.1"
chrono = { version = "*", features = [ "serde" ] }
uuid = { version = "*", features = [ "serde" ] }
chrono = { version = "0.4", features = [ "serde" ] }
uuid = { version = "0.8.1", features = [ "serde" ] }
wasm-bindgen = "0.2.60"
futures = "^0.1.26"
comrak = "*"
@ -58,3 +58,6 @@ features = [
"KeyboardEvent",
"DragEvent",
]
[dev-dependencies]
wasm-bindgen-test = { version = "*" }

View File

@ -20,7 +20,7 @@ mod shared;
mod sign_in;
mod sign_up;
mod users;
mod validations;
pub mod validations;
mod ws;
pub type AvatarFilterActive = bool;

12
jirs-client/tests/wasm.rs Normal file
View File

@ -0,0 +1,12 @@
extern crate wasm_bindgen_test;
use wasm_bindgen_test::*;
use jirs_client::validations::*;
#[wasm_bindgen_test]
fn test_is_token() {
assert_eq!(is_email("foo@"), false);
assert_eq!(is_email("foo@bar"), false);
assert_eq!(is_email("foo@bar."), false);
assert_eq!(is_email("foo@bar.com"), true);
}

View File

@ -34,7 +34,7 @@ bincode = "1.2.1"
time = { version = "0.1" }
url = { version = "2.1.0" }
percent-encoding = { version = "2.1.0" }
uuid = { version = ">=0.7.0, <0.9.0", features = ["serde", "v4", "v5"] }
uuid = { version = "0.8.1", features = ["serde", "v4", "v5"] }
ipnetwork = { version = ">=0.12.2, <0.17.0" }
num-bigint = { version = ">=0.1.41, <0.3" }
num-traits = { version = "0.2" }