diff --git a/Cargo.toml b/Cargo.toml index 973b2f2f..16d7aa29 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,7 @@ members = [ ] [dev-dependencies] -actix-service = { path="actix-service" } +actix-service = "0.3.3" actix-codec = "0.1.1" actix-rt = "0.2.0" actix-server = { path="actix-server", features=["ssl"] } diff --git a/actix-connector/Cargo.toml b/actix-connector/Cargo.toml index d20459ef..b2a2f9cf 100644 --- a/actix-connector/Cargo.toml +++ b/actix-connector/Cargo.toml @@ -27,9 +27,8 @@ default = [] ssl = ["openssl", "tokio-openssl"] [dependencies] -#actix-service = "0.3.0" -actix-service = { path="../actix-service" } -actix-codec = "0.1.0" +actix-service = "0.3.3" +actix-codec = "0.1.1" futures = "0.1" tokio-tcp = "0.1" tokio-current-thread = "0.1" diff --git a/actix-server-config/Cargo.toml b/actix-server-config/Cargo.toml index ab2de92b..0c405e55 100644 --- a/actix-server-config/Cargo.toml +++ b/actix-server-config/Cargo.toml @@ -14,5 +14,4 @@ name = "actix_server_config" path = "src/lib.rs" [dependencies] -actix-service = { path="../actix-service" } futures = "0.1.25" diff --git a/actix-server/Cargo.toml b/actix-server/Cargo.toml index 3da83ba6..3beb8f64 100644 --- a/actix-server/Cargo.toml +++ b/actix-server/Cargo.toml @@ -34,8 +34,7 @@ rust-tls = ["rustls", "tokio-rustls", "webpki", "webpki-roots"] [dependencies] actix-rt = "0.2.0" -#actix-service = "0.3.2" -actix-service = { path="../actix-service" } +actix-service = "0.3.3" actix-server-config = { path="../actix-server-config" } log = "0.4" diff --git a/actix-test-server/Cargo.toml b/actix-test-server/Cargo.toml index 2f721b48..34c1ebae 100644 --- a/actix-test-server/Cargo.toml +++ b/actix-test-server/Cargo.toml @@ -33,8 +33,8 @@ ssl = ["openssl", "actix-server/ssl"] rust-tls = ["rustls", "tokio-rustls", "webpki", "webpki-roots"] [dependencies] -actix-rt = "0.1.0" -#actix-server = "0.3.0" +actix-rt = "0.2.0" +# actix-server = "0.3.3" actix-server = { path="../actix-server" } log = "0.4" @@ -54,3 +54,6 @@ rustls = { version = "^0.15", optional = true } tokio-rustls = { version = "^0.9", optional = true } webpki = { version = "0.19", optional = true } webpki-roots = { version = "0.16", optional = true } + +[dev-dependencies] +actix-service = "0.3.3" diff --git a/actix-test-server/src/lib.rs b/actix-test-server/src/lib.rs index 3161d663..ce087a05 100644 --- a/actix-test-server/src/lib.rs +++ b/actix-test-server/src/lib.rs @@ -13,27 +13,24 @@ use tokio_tcp::TcpStream; /// The `TestServer` type. /// /// `TestServer` is very simple test server that simplify process of writing -/// integration tests cases for actix applications. +/// integration tests for actix-net applications. /// /// # Examples /// /// ```rust -/// # extern crate actix_test_server; -/// # use actix_web::*; -/// # -/// # fn my_handler(req: &HttpRequest) -> HttpResponse { -/// # HttpResponse::Ok().into() -/// # } -/// # -/// # fn main() { +/// use actix_service::{fn_service, IntoNewService}; /// use actix_test_server::TestServer; /// -/// let mut srv = TestServer::new(|app| app.handler(my_handler)); +/// fn main() { +/// let srv = TestServer::with(|| fn_service( +/// |sock| { +/// println!("New connection: {:?}", sock); +/// Ok::<_, ()>(()) +/// } +/// )); /// -/// let req = srv.get().finish().unwrap(); -/// let response = srv.execute(req.send()).unwrap(); -/// assert!(response.status().is_success()); -/// # } +/// println!("SOCKET: {:?}", srv.connect()); +/// } /// ``` pub struct TestServer; @@ -57,13 +54,13 @@ impl TestServer { let local_addr = tcp.local_addr().unwrap(); Server::build() - .listen("test", tcp, factory) + .listen("test", tcp, factory)? .workers(1) .disable_signals() .start(); tx.send((System::current(), local_addr)).unwrap(); - sys.run(); + sys.run() }); let (system, addr) = rx.recv().unwrap(); diff --git a/actix-utils/CHANGES.md b/actix-utils/CHANGES.md index dbda2050..64c361a1 100644 --- a/actix-utils/CHANGES.md +++ b/actix-utils/CHANGES.md @@ -1,10 +1,5 @@ # Changes -## [0.4.0] - 2019-03-xx - -* Upgrade actix-service - - ## [0.3.2] - 2019-03-04 ### Changed diff --git a/actix-utils/Cargo.toml b/actix-utils/Cargo.toml index 82554ed2..fb477306 100644 --- a/actix-utils/Cargo.toml +++ b/actix-utils/Cargo.toml @@ -18,9 +18,8 @@ name = "actix_utils" path = "src/lib.rs" [dependencies] -#actix-service = "0.3.2" -actix-service = { path="../actix-service" } -actix-codec = "0.1.0" +actix-service = "0.3.3" +actix-codec = "0.1.1" bytes = "0.4" futures = "0.1.24" tokio-timer = "0.2.8" @@ -28,4 +27,4 @@ tokio-current-thread = "0.1.4" log = "0.4" [dev-dependencies] -actix-rt = "0.1" +actix-rt = "0.2"