mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-24 16:02:59 +01:00
cleanup dependencies
This commit is contained in:
parent
87b83a3403
commit
25af82c45a
17
.travis.yml
17
.travis.yml
@ -14,17 +14,6 @@ matrix:
|
|||||||
allow_failures:
|
allow_failures:
|
||||||
- rust: nightly
|
- rust: nightly
|
||||||
|
|
||||||
env:
|
|
||||||
global:
|
|
||||||
# - RUSTFLAGS="-C link-dead-code"
|
|
||||||
- OPENSSL_VERSION=openssl-1.0.2
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
- sudo add-apt-repository -y ppa:0k53d-karl-f830m/openssl
|
|
||||||
- sudo apt-get update -qq
|
|
||||||
- sudo apt-get install -y openssl libssl-dev libelf-dev libdw-dev cmake gcc binutils-dev libiberty-dev
|
|
||||||
|
|
||||||
# Add clippy
|
|
||||||
before_script:
|
before_script:
|
||||||
- export PATH=$PATH:~/.cargo/bin
|
- export PATH=$PATH:~/.cargo/bin
|
||||||
|
|
||||||
@ -32,12 +21,12 @@ script:
|
|||||||
- |
|
- |
|
||||||
if [[ "$TRAVIS_RUST_VERSION" != "nightly" ]]; then
|
if [[ "$TRAVIS_RUST_VERSION" != "nightly" ]]; then
|
||||||
cargo clean
|
cargo clean
|
||||||
cargo test --features="ssl,tls,rust-tls" -- --nocapture
|
cargo test
|
||||||
fi
|
fi
|
||||||
- |
|
- |
|
||||||
if [[ "$TRAVIS_RUST_VERSION" == "nightly" ]]; then
|
if [[ "$TRAVIS_RUST_VERSION" == "nightly" ]]; then
|
||||||
RUSTFLAGS="--cfg procmacro2_semver_exempt" cargo install -f cargo-tarpaulin
|
RUSTFLAGS="--cfg procmacro2_semver_exempt" cargo install -f cargo-tarpaulin
|
||||||
RUST_BACKTRACE=1 cargo tarpaulin --features="ssl,tls,rust-tls" --out Xml
|
RUST_BACKTRACE=1 cargo tarpaulin --out Xml
|
||||||
bash <(curl -s https://codecov.io/bash)
|
bash <(curl -s https://codecov.io/bash)
|
||||||
echo "Uploaded code coverage"
|
echo "Uploaded code coverage"
|
||||||
fi
|
fi
|
||||||
@ -46,7 +35,7 @@ script:
|
|||||||
#after_success:
|
#after_success:
|
||||||
# - |
|
# - |
|
||||||
# if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_PULL_REQUEST" = "false" && "$TRAVIS_BRANCH" == "master" && "$TRAVIS_RUST_VERSION" == "stable" ]]; then
|
# if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_PULL_REQUEST" = "false" && "$TRAVIS_BRANCH" == "master" && "$TRAVIS_RUST_VERSION" == "stable" ]]; then
|
||||||
# cargo doc --features "ssl,tls,rust-tls,session" --no-deps &&
|
# cargo doc --features "session" --no-deps &&
|
||||||
# echo "<meta http-equiv=refresh content=0;url=os_balloon/index.html>" > target/doc/index.html &&
|
# echo "<meta http-equiv=refresh content=0;url=os_balloon/index.html>" > target/doc/index.html &&
|
||||||
# git clone https://github.com/davisp/ghp-import.git &&
|
# git clone https://github.com/davisp/ghp-import.git &&
|
||||||
# ./ghp-import/ghp_import.py -n -p -f -m "Documentation upload" -r https://"$GH_TOKEN"@github.com/"$TRAVIS_REPO_SLUG.git" target/doc &&
|
# ./ghp-import/ghp_import.py -n -p -f -m "Documentation upload" -r https://"$GH_TOKEN"@github.com/"$TRAVIS_REPO_SLUG.git" target/doc &&
|
||||||
|
35
Cargo.toml
35
Cargo.toml
@ -10,13 +10,12 @@ repository = "https://github.com/actix/actix-web.git"
|
|||||||
documentation = "https://actix.rs/api/actix-web/stable/actix_web/"
|
documentation = "https://actix.rs/api/actix-web/stable/actix_web/"
|
||||||
categories = ["network-programming", "asynchronous",
|
categories = ["network-programming", "asynchronous",
|
||||||
"web-programming::http-server",
|
"web-programming::http-server",
|
||||||
"web-programming::http-client",
|
|
||||||
"web-programming::websocket"]
|
"web-programming::websocket"]
|
||||||
license = "MIT/Apache-2.0"
|
license = "MIT/Apache-2.0"
|
||||||
exclude = [".gitignore", ".travis.yml", ".cargo/config", "appveyor.yml"]
|
exclude = [".gitignore", ".travis.yml", ".cargo/config", "appveyor.yml"]
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
features = ["tls", "alpn", "rust-tls", "session", "brotli", "flate2-c"]
|
features = ["session"]
|
||||||
|
|
||||||
[badges]
|
[badges]
|
||||||
travis-ci = { repository = "actix/actix-web", branch = "master" }
|
travis-ci = { repository = "actix/actix-web", branch = "master" }
|
||||||
@ -30,18 +29,6 @@ path = "src/lib.rs"
|
|||||||
[features]
|
[features]
|
||||||
default = ["session", "cell"]
|
default = ["session", "cell"]
|
||||||
|
|
||||||
# native-tls
|
|
||||||
tls = ["native-tls", "tokio-tls", "actix-net/tls"]
|
|
||||||
|
|
||||||
# openssl
|
|
||||||
ssl = ["openssl", "tokio-openssl", "actix-net/ssl"]
|
|
||||||
|
|
||||||
# rustls
|
|
||||||
rust-tls = ["rustls", "tokio-rustls", "webpki", "webpki-roots", "actix-net/rust-tls"]
|
|
||||||
|
|
||||||
# unix sockets
|
|
||||||
uds = ["tokio-uds"]
|
|
||||||
|
|
||||||
# sessions feature, session require "ring" crate and c compiler
|
# sessions feature, session require "ring" crate and c compiler
|
||||||
session = ["cookie/secure"]
|
session = ["cookie/secure"]
|
||||||
|
|
||||||
@ -82,31 +69,11 @@ tokio-tcp = "0.1"
|
|||||||
tokio-timer = "0.2"
|
tokio-timer = "0.2"
|
||||||
tokio-current-thread = "0.1"
|
tokio-current-thread = "0.1"
|
||||||
|
|
||||||
# native-tls
|
|
||||||
native-tls = { version="0.2", optional = true }
|
|
||||||
tokio-tls = { version="0.2", optional = true }
|
|
||||||
|
|
||||||
# openssl
|
|
||||||
openssl = { version="0.10", optional = true }
|
|
||||||
tokio-openssl = { version="0.2", optional = true }
|
|
||||||
|
|
||||||
#rustls
|
|
||||||
rustls = { version = "0.14", optional = true }
|
|
||||||
tokio-rustls = { version = "0.8", optional = true }
|
|
||||||
webpki = { version = "0.18", optional = true }
|
|
||||||
webpki-roots = { version = "0.15", optional = true }
|
|
||||||
|
|
||||||
# unix sockets
|
|
||||||
tokio-uds = { version="0.2", optional = true }
|
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
actix-web = "0.7"
|
actix-web = "0.7"
|
||||||
env_logger = "0.5"
|
env_logger = "0.5"
|
||||||
serde_derive = "1.0"
|
serde_derive = "1.0"
|
||||||
|
|
||||||
[build-dependencies]
|
|
||||||
version_check = "0.1"
|
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
lto = true
|
lto = true
|
||||||
opt-level = 3
|
opt-level = 3
|
||||||
|
14
src/lib.rs
14
src/lib.rs
@ -63,21 +63,9 @@
|
|||||||
//!
|
//!
|
||||||
//! ## Package feature
|
//! ## Package feature
|
||||||
//!
|
//!
|
||||||
//! * `tls` - enables ssl support via `native-tls` crate
|
|
||||||
//! * `ssl` - enables ssl support via `openssl` crate, supports `http/2`
|
|
||||||
//! * `rust-tls` - enables ssl support via `rustls` crate, supports `http/2`
|
|
||||||
//! * `uds` - enables support for making client requests via Unix Domain Sockets.
|
|
||||||
//! Unix only. Not necessary for *serving* requests.
|
|
||||||
//! * `session` - enables session support, includes `ring` crate as
|
//! * `session` - enables session support, includes `ring` crate as
|
||||||
//! dependency
|
//! dependency
|
||||||
//! * `brotli` - enables `brotli` compression support, requires `c`
|
|
||||||
//! compiler
|
|
||||||
//! * `flate2-c` - enables `gzip`, `deflate` compression support, requires
|
|
||||||
//! `c` compiler
|
|
||||||
//! * `flate2-rust` - experimental rust based implementation for
|
|
||||||
//! `gzip`, `deflate` compression.
|
|
||||||
//!
|
//!
|
||||||
#![cfg_attr(actix_nightly, feature(tool_lints))]
|
|
||||||
// #![warn(missing_docs)]
|
// #![warn(missing_docs)]
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
|
|
||||||
@ -114,8 +102,6 @@ extern crate tokio_current_thread;
|
|||||||
extern crate tokio_io;
|
extern crate tokio_io;
|
||||||
extern crate tokio_tcp;
|
extern crate tokio_tcp;
|
||||||
extern crate tokio_timer;
|
extern crate tokio_timer;
|
||||||
#[cfg(all(unix, feature = "uds"))]
|
|
||||||
extern crate tokio_uds;
|
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
|
@ -942,7 +942,7 @@ mod tests {
|
|||||||
use http::header::{HeaderValue, CONTENT_TYPE, COOKIE};
|
use http::header::{HeaderValue, CONTENT_TYPE, COOKIE};
|
||||||
|
|
||||||
use header::ContentEncoding;
|
use header::ContentEncoding;
|
||||||
use test::TestRequest;
|
// use test::TestRequest;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_debug() {
|
fn test_debug() {
|
||||||
@ -1118,8 +1118,6 @@ mod tests {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_into_response() {
|
fn test_into_response() {
|
||||||
let req = TestRequest::default().finish();
|
|
||||||
|
|
||||||
let resp: Response = "test".into();
|
let resp: Response = "test".into();
|
||||||
assert_eq!(resp.status(), StatusCode::OK);
|
assert_eq!(resp.status(), StatusCode::OK);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
|
Loading…
Reference in New Issue
Block a user