Skip to content

Commit

Permalink
Merge branch 'master' into extract-from-service-request
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeMathWalker committed Feb 27, 2022
2 parents 9c3ea34 + 2f13e5f commit 7c39852
Show file tree
Hide file tree
Showing 61 changed files with 1,290 additions and 357 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/ci-post-merge.yml
Expand Up @@ -152,3 +152,34 @@ jobs:
# - name: Upload to Codecov
# uses: codecov/codecov-action@v1
# with: { file: cobertura.xml }

nextest:
name: nextest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true

- name: Generate Cargo.lock
uses: actions-rs/cargo@v1
with: { command: generate-lockfile }
- name: Cache Dependencies
uses: Swatinem/rust-cache@v1.3.0

- name: Install cargo-nextest
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-nextest

- name: Test with cargo-nextest
uses: actions-rs/cargo@v1
with:
command: nextest
args: run
2 changes: 1 addition & 1 deletion CHANGES.md
@@ -1,4 +1,4 @@
# Changes
# Changelog

Changelogs are kept separately for each crate in this repo.

Expand Down
4 changes: 4 additions & 0 deletions actix-files/CHANGES.md
Expand Up @@ -3,6 +3,10 @@
## Unreleased - 2021-xx-xx


## 0.6.0 - 2022-02-25
- No significant changes since `0.6.0-beta.16`.


## 0.6.0-beta.16 - 2022-01-31
- No significant changes since `0.6.0-beta.15`.

Expand Down
10 changes: 5 additions & 5 deletions actix-files/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "actix-files"
version = "0.6.0-beta.16"
version = "0.6.0"
authors = [
"Nikolay Kim <fafhrd91@gmail.com>",
"fakeshadow <24548779@qq.com>",
Expand All @@ -22,10 +22,10 @@ path = "src/lib.rs"
experimental-io-uring = ["actix-web/experimental-io-uring", "tokio-uring"]

[dependencies]
actix-http = "3.0.0-rc.2"
actix-http = "3"
actix-service = "2"
actix-utils = "3"
actix-web = { version = "4.0.0-rc.3", default-features = false }
actix-web = { version = "4", default-features = false }

askama_escape = "0.10"
bitflags = "1"
Expand All @@ -43,6 +43,6 @@ tokio-uring = { version = "0.2", optional = true, features = ["bytes"] }

[dev-dependencies]
actix-rt = "2.2"
actix-test = "0.1.0-beta.12"
actix-web = "4.0.0-rc.3"
actix-test = "0.1.0-beta.13"
actix-web = "4.0.0"
tempfile = "3.2"
8 changes: 4 additions & 4 deletions actix-files/README.md
Expand Up @@ -3,16 +3,16 @@
> Static file serving for Actix Web
[![crates.io](https://img.shields.io/crates/v/actix-files?label=latest)](https://crates.io/crates/actix-files)
[![Documentation](https://docs.rs/actix-files/badge.svg?version=0.6.0-beta.16)](https://docs.rs/actix-files/0.6.0-beta.16)
[![Documentation](https://docs.rs/actix-files/badge.svg?version=0.6.0)](https://docs.rs/actix-files/0.6.0)
[![Version](https://img.shields.io/badge/rustc-1.54+-ab6000.svg)](https://blog.rust-lang.org/2021/05/06/Rust-1.54.0.html)
![License](https://img.shields.io/crates/l/actix-files.svg)
<br />
[![dependency status](https://deps.rs/crate/actix-files/0.6.0-beta.16/status.svg)](https://deps.rs/crate/actix-files/0.6.0-beta.16)
[![dependency status](https://deps.rs/crate/actix-files/0.6.0/status.svg)](https://deps.rs/crate/actix-files/0.6.0)
[![Download](https://img.shields.io/crates/d/actix-files.svg)](https://crates.io/crates/actix-files)
[![Chat on Discord](https://img.shields.io/discord/771444961383153695?label=chat&logo=discord)](https://discord.gg/NWpN5mmg3x)

## Documentation & Resources

- [API Documentation](https://docs.rs/actix-files/)
- [Example Project](https://github.com/actix/examples/tree/master/basics/static_index)
- [API Documentation](https://docs.rs/actix-files)
- [Example Project](https://github.com/actix/examples/tree/master/basics/static-files)
- Minimum Supported Rust Version (MSRV): 1.54
5 changes: 2 additions & 3 deletions actix-files/src/chunked.rs
Expand Up @@ -81,7 +81,7 @@ async fn chunked_read_file_callback(
) -> Result<(File, Bytes), Error> {
use io::{Read as _, Seek as _};

let res = actix_web::rt::task::spawn_blocking(move || {
let res = actix_web::web::block(move || {
let mut buf = Vec::with_capacity(max_bytes);

file.seek(io::SeekFrom::Start(offset))?;
Expand All @@ -94,8 +94,7 @@ async fn chunked_read_file_callback(
Ok((file, Bytes::from(buf)))
}
})
.await
.map_err(|_| actix_web::error::BlockingError)??;
.await??;

Ok(res)
}
Expand Down
20 changes: 10 additions & 10 deletions actix-files/src/named.rs
Expand Up @@ -96,18 +96,18 @@ impl NamedFile {
///
/// # Examples
/// ```ignore
/// use std::{
/// io::{self, Write as _},
/// env,
/// fs::File
/// };
/// use actix_files::NamedFile;
/// use std::io::{self, Write};
/// use std::env;
/// use std::fs::File;
///
/// fn main() -> io::Result<()> {
/// let mut file = File::create("foo.txt")?;
/// file.write_all(b"Hello, world!")?;
/// let named_file = NamedFile::from_file(file, "bar.txt")?;
/// # std::fs::remove_file("foo.txt");
/// Ok(())
/// }
/// let mut file = File::create("foo.txt")?;
/// file.write_all(b"Hello, world!")?;
/// let named_file = NamedFile::from_file(file, "bar.txt")?;
/// # std::fs::remove_file("foo.txt");
/// Ok(())
/// ```
pub fn from_file<P: AsRef<Path>>(file: File, path: P) -> io::Result<NamedFile> {
let path = path.as_ref().to_path_buf();
Expand Down
4 changes: 4 additions & 0 deletions actix-http-test/CHANGES.md
Expand Up @@ -3,6 +3,10 @@
## Unreleased - 2021-xx-xx


## 3.0.0-beta.13 - 2022-02-16
- No significant changes since `3.0.0-beta.12`.


## 3.0.0-beta.12 - 2022-01-31
- No significant changes since `3.0.0-beta.11`.

Expand Down
12 changes: 6 additions & 6 deletions actix-http-test/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "actix-http-test"
version = "3.0.0-beta.12"
version = "3.0.0-beta.13"
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
description = "Various helpers for Actix applications to use during testing"
keywords = ["http", "web", "framework", "async", "futures"]
Expand Down Expand Up @@ -30,12 +30,12 @@ openssl = ["tls-openssl", "awc/openssl"]

[dependencies]
actix-service = "2.0.0"
actix-codec = "0.4.1"
actix-tls = "3.0.0"
actix-codec = "0.5"
actix-tls = "3"
actix-utils = "3.0.0"
actix-rt = "2.2"
actix-server = "2"
awc = { version = "3.0.0-beta.20", default-features = false }
awc = { version = "3.0.0-beta.21", default-features = false }

base64 = "0.13"
bytes = "1"
Expand All @@ -51,5 +51,5 @@ tls-openssl = { version = "0.10.9", package = "openssl", optional = true }
tokio = { version = "1.8.4", features = ["sync"] }

[dev-dependencies]
actix-web = { version = "4.0.0-rc.3", default-features = false, features = ["cookies"] }
actix-http = "3.0.0-rc.2"
actix-web = { version = "4.0.0", default-features = false, features = ["cookies"] }
actix-http = "3.0.0"
4 changes: 2 additions & 2 deletions actix-http-test/README.md
Expand Up @@ -3,11 +3,11 @@
> Various helpers for Actix applications to use during testing.
[![crates.io](https://img.shields.io/crates/v/actix-http-test?label=latest)](https://crates.io/crates/actix-http-test)
[![Documentation](https://docs.rs/actix-http-test/badge.svg?version=3.0.0-beta.12)](https://docs.rs/actix-http-test/3.0.0-beta.12)
[![Documentation](https://docs.rs/actix-http-test/badge.svg?version=3.0.0-beta.13)](https://docs.rs/actix-http-test/3.0.0-beta.13)
[![Version](https://img.shields.io/badge/rustc-1.54+-ab6000.svg)](https://blog.rust-lang.org/2021/05/06/Rust-1.54.0.html)
![MIT or Apache 2.0 licensed](https://img.shields.io/crates/l/actix-http-test)
<br>
[![Dependency Status](https://deps.rs/crate/actix-http-test/3.0.0-beta.12/status.svg)](https://deps.rs/crate/actix-http-test/3.0.0-beta.12)
[![Dependency Status](https://deps.rs/crate/actix-http-test/3.0.0-beta.13/status.svg)](https://deps.rs/crate/actix-http-test/3.0.0-beta.13)
[![Download](https://img.shields.io/crates/d/actix-http-test.svg)](https://crates.io/crates/actix-http-test)
[![Chat on Discord](https://img.shields.io/discord/771444961383153695?label=chat&logo=discord)](https://discord.gg/NWpN5mmg3x)

Expand Down

0 comments on commit 7c39852

Please sign in to comment.