Skip to content

Commit

Permalink
chore: upgrade to ntex 2.0 (#9)
Browse files Browse the repository at this point in the history
* chore: upgrade to ntex 2.0

* chore: upgrade ntex-extras deps
  • Loading branch information
leon3s authored May 28, 2024
1 parent db621a8 commit 617bde7
Show file tree
Hide file tree
Showing 24 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion examples/application/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ edition = "2018"
workspace = "../"

[dependencies]
ntex = { version = "1", features = ["tokio"] }
ntex = { version = "2", features = ["tokio"] }
2 changes: 1 addition & 1 deletion examples/async-handlers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ version = "2.0.0"
edition = "2018"

[dependencies]
ntex = { version = "1", features = ["tokio"] }
ntex = { version = "2", features = ["tokio"] }
futures = "0.3.1"
bytes = "0.5"
2 changes: 1 addition & 1 deletion examples/databases/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "1.0.0"
edition = "2018"

[dependencies]
ntex = { version = "1", features = ["tokio"] }
ntex = { version = "2", features = ["tokio"] }
diesel = { version = "2", features = ["sqlite", "r2d2"] }
serde = { version = "1", features = ["derive"] }
uuid = { version = "1", features = ["v4"] }
2 changes: 1 addition & 1 deletion examples/either/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ version = "1.0.0"
edition = "2018"

[dependencies]
ntex = { version = "1", features = ["tokio"] }
ntex = { version = "2", features = ["tokio"] }
2 changes: 1 addition & 1 deletion examples/errors/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "1.0.0"
edition = "2018"

[dependencies]
ntex = { version = "1", features = ["tokio"] }
ntex = { version = "2", features = ["tokio"] }
derive_more = "0.99"
env_logger = "0.7"
log = "0.4"
2 changes: 1 addition & 1 deletion examples/extractors/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ version = "1.0.0"
edition = "2018"

[dependencies]
ntex = { version = "1", features = ["tokio"] }
ntex = { version = "2", features = ["tokio"] }
serde = "1.0"
serde_json = "1.0"
2 changes: 1 addition & 1 deletion examples/flexible-responders/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ version = "1.0.0"
edition = "2018"

[dependencies]
ntex = { version = "1", features = ["tokio"] }
ntex = { version = "2", features = ["tokio"] }
serde = "1.0"
2 changes: 1 addition & 1 deletion examples/getting-started/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ edition = "2018"
workspace = "../"

[dependencies]
ntex = { version = "1", features = ["tokio"] }
ntex = { version = "2", features = ["tokio"] }
2 changes: 1 addition & 1 deletion examples/http2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ version = "1.0.0"
edition = "2018"

[dependencies]
ntex = { version = "1", features = ["tokio", "openssl"] }
ntex = { version = "2", features = ["tokio", "openssl"] }
openssl = { version = "0.10", features = ["v110", "vendored"] }
2 changes: 1 addition & 1 deletion examples/main-example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ version = "1.0.0"
edition = "2018"

[dependencies]
ntex = { version = "1", features = ["tokio"] }
ntex = { version = "2", features = ["tokio"] }
4 changes: 2 additions & 2 deletions examples/middleware/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "1.0.0"
edition = "2018"

[dependencies]
ntex = { version = "1", features = ["tokio", "cookie"] }
ntex-session = { version = "1" }
ntex = { version = "2", features = ["tokio", "cookie"] }
ntex-session = { version = "2" }
futures-util = { version = "0.3.7", default-features = false, features = ["std"] }
env_logger = "0.10.0"
2 changes: 1 addition & 1 deletion examples/middleware/src/errorhandler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ where
type Response = web::WebResponse;
type Error = web::Error;

ntex::forward_poll_ready!(service);
ntex::forward_ready!(service);

async fn call(&self, req: web::WebRequest<Err>, ctx: ServiceCtx<'_, Self>) -> Result<Self::Response, Self::Error> {
ctx.call(&self.service, req).await.map(|mut res| {
Expand Down
2 changes: 1 addition & 1 deletion examples/middleware/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ where
type Response = web::WebResponse;
type Error = web::Error;

ntex::forward_poll_ready!(service);
ntex::forward_ready!(service);

async fn call(&self, req: web::WebRequest<Err>, ctx: ServiceCtx<'_, Self>) -> Result<Self::Response, Self::Error> {
println!("Hi from start. You requested: {}", req.path());
Expand Down
2 changes: 1 addition & 1 deletion examples/powerful-extractors/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ version = "1.0.0"
edition = "2018"

[dependencies]
ntex = { version = "1", features = ["tokio"] }
ntex = { version = "2", features = ["tokio"] }
serde = "1.0"
2 changes: 1 addition & 1 deletion examples/request-handlers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ version = "1.0.0"
edition = "2018"

[dependencies]
ntex = { version = "1", features = ["tokio"] }
ntex = { version = "2", features = ["tokio"] }
2 changes: 1 addition & 1 deletion examples/request-routing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ version = "1.0.0"
edition = "2018"

[dependencies]
ntex = { version = "1", features = ["tokio"] }
ntex = { version = "2", features = ["tokio"] }
2 changes: 1 addition & 1 deletion examples/requests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ edition = "2018"
[dependencies]
serde = "1.0"
serde_json = "1.0"
ntex = { version = "1", features = ["tokio"] }
ntex = { version = "2", features = ["tokio"] }
futures = "0.3.1"
ntex-multipart = "1"
2 changes: 1 addition & 1 deletion examples/responses/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "1.0.0"
edition = "2018"

[dependencies]
ntex = { version = "1", features = ["tokio", "compress"] }
ntex = { version = "2", features = ["tokio", "compress"] }
serde = "1.0"
futures = "0.3.1"
bytes = "0.5"
2 changes: 1 addition & 1 deletion examples/server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ workspace = "../"
edition = "2018"

[dependencies]
ntex = { version = "1", features = ["tokio", "openssl"] }
ntex = { version = "2", features = ["tokio", "openssl"] }
futures = "0.3"
openssl = { version = "0.10", features = ["vendored"] }
tokio = { version = "1.16.1", features = ["full"] }
4 changes: 2 additions & 2 deletions examples/static-files/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ version = "1.0.0"
edition = "2018"

[dependencies]
ntex = { version = "1", features = ["tokio"] }
ntex-files = "1"
ntex = { version = "2", features = ["tokio"] }
ntex-files = "2"
mime = "0.3"
2 changes: 1 addition & 1 deletion examples/testing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "1.0.0"
edition = "2018"

[dependencies]
ntex = { version = "1", features = ["tokio"] }
ntex = { version = "2", features = ["tokio"] }
futures = "0.3"
futures-util = "0.3"
bytes = "0.5"
Expand Down
2 changes: 1 addition & 1 deletion examples/url-dispatch/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2018"
workspace = "../"

[dependencies]
ntex = { version = "1", features = ["tokio"] }
ntex = { version = "2", features = ["tokio"] }
futures = "0.3.1"
openssl = "0.10"
serde = "1.0"
2 changes: 1 addition & 1 deletion examples/websockets/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ edition = "2018"

[dependencies]
futures = "0.3.27"
ntex = { version = "1", features = ["tokio"] }
ntex = { version = "2", features = ["tokio"] }
2 changes: 1 addition & 1 deletion vars.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
rustVersion: '1.75',
ntexMajorVersion: '1.0',
ntexMajorVersion: '2.0',
};

0 comments on commit 617bde7

Please sign in to comment.