Skip to content

Commit 772ffdc

Browse files
Merge #86
86: release v0.7.0 r=Emilgardis a=Emilgardis Co-authored-by: Emil Gardström <emil.gardstrom@gmail.com>
2 parents 62fc164 + 4d75976 commit 772ffdc

File tree

8 files changed

+51
-32
lines changed

8 files changed

+51
-32
lines changed

.github/workflows/audit.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111

1212
jobs:
1313
audit:
14-
needs: [security-audit, cargo-deny]
14+
needs: [cargo-deny] # security-audit,
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Done
@@ -21,6 +21,13 @@ jobs:
2121
runs-on: ubuntu-latest
2222
steps:
2323
- uses: actions/checkout@v2
24+
with:
25+
submodules: recursive
26+
- name: Install rust
27+
uses: actions-rs/toolchain@v1
28+
with:
29+
toolchain: 1.60.0
30+
override: true
2431
- uses: actions-rs/audit-check@v1
2532
with:
2633
token: ${{ secrets.GITHUB_TOKEN }}
@@ -36,8 +43,11 @@ jobs:
3643
- sources
3744
steps:
3845
- uses: actions/checkout@v2
46+
with:
47+
submodules: recursive
3948
- uses: EmbarkStudios/cargo-deny-action@v1
4049
with:
50+
rust-version: "1.60.0"
4151
command: check ${{ matrix.checks }} -s
4252
arguments: --all-features
4353
log-level: warn

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,16 @@
44

55
## [Unreleased] - ReleaseDate
66

7-
[Commits](https://github.com/Emilgardis/twitch_oauth2/compare/v0.6.1...Unreleased)
7+
[Commits](https://github.com/Emilgardis/twitch_oauth2/compare/v0.7.0...Unreleased)
8+
9+
## [v0.7.0] - 2022-05-08
10+
11+
[Commits](https://github.com/Emilgardis/twitch_oauth2/compare/v0.6.1...v0.7.0)
12+
13+
### Breaking changes
14+
15+
* switch to [`twitch_types`](https://crates.io/crates/twitch_types) for `UserId` and `Nickname`/`UserName`
16+
* bump MSRV to 1.60, also changes the feature names for clients to their simpler variant `surf` and `client`
817

918
## [v0.6.1] - 2021-11-23
1019

Cargo.lock

Lines changed: 7 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,22 @@
11
[package]
22
name = "twitch_oauth2"
3-
version = "0.6.1"
4-
authors = ["Emil Gardström <emil.gardstrom@gmail.com>"]
5-
edition = "2018"
3+
version = "0.7.0"
4+
edition = "2021"
65
repository = "https://github.com/Emilgardis/twitch_oauth2"
76
license = "MIT OR Apache-2.0"
87
description = "Oauth2 for Twitch endpoints"
98
keywords = ["oauth", "twitch", "async", "asynchronous"]
10-
documentation = "https://docs.rs/twitch_oauth2/0.6.1"
9+
documentation = "https://docs.rs/twitch_oauth2/0.7.0"
1110
readme = "README.md"
12-
resolver = "2"
1311

1412
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1513
[features]
1614
default = []
17-
reqwest_client = ["reqwest"]
18-
surf_client_curl = ["surf_client", "surf/curl-client"]
19-
surf_client = ["surf", "http-types", "http-types/hyperium_http"]
15+
reqwest = ["dep:reqwest"]
16+
surf_client_curl = ["dep:surf", "surf/curl-client"]
17+
surf = ["dep:surf", "dep:http-types", "http-types?/hyperium_http"]
2018
mock_api = []
21-
all = ["surf_client_curl", "reqwest_client"]
19+
all = ["surf_client_curl", "dep:reqwest"]
2220

2321
[dependencies]
2422
thiserror = "1.0.29"
@@ -35,41 +33,45 @@ aliri_braid = "0.1.9"
3533
url = "2.2.2"
3634
base64 = "0.13.0"
3735
rand = "0.8.4"
38-
twitch_types = "0.1.0"
36+
twitch_types = "0.2.0"
3937

4038
[dev-dependencies]
41-
tokio = { version = "1.12.0", features = ["rt-multi-thread", "macros", "test-util"] }
39+
tokio = { version = "1.12.0", features = [
40+
"rt-multi-thread",
41+
"macros",
42+
"test-util",
43+
] }
4244
dotenv = "0.15.0"
4345
anyhow = "1.0.44"
4446
reqwest = "0.11.4"
4547
surf = "2.3.1"
46-
rpassword = "5.0.1"
48+
rpassword = "6.0.1"
4749

4850
[[example]]
4951
name = "user_token"
5052
path = "examples/user_token.rs"
51-
required-features = ["surf_client"]
53+
required-features = ["surf"]
5254

5355
[[example]]
5456
name = "app_access_token"
5557
path = "examples/app_access_token.rs"
56-
required-features = ["surf_client"]
58+
required-features = ["surf"]
5759

5860
[[example]]
5961
name = "auth_flow"
6062
path = "examples/auth_flow.rs"
61-
required-features = ["reqwest_client"]
63+
required-features = ["reqwest"]
6264

6365

6466
[[example]]
6567
name = "mock_app"
6668
path = "examples/mock_app.rs"
67-
required-features = ["reqwest_client", "mock_api"]
69+
required-features = ["reqwest", "mock_api"]
6870

6971
[[example]]
7072
name = "mock_user"
7173
path = "examples/mock_user.rs"
72-
required-features = ["reqwest_client", "mock_api"]
74+
required-features = ["reqwest", "mock_api"]
7375

7476
[package.metadata.docs.rs]
7577
features = ["all", "mock_api"]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Twitch OAuth2 | OAuth2 for Twitch endpoints
22
============================================
33

4-
[![github]](https://github.com/emilgardis/twitch_oauth2)&ensp;[![crates-io]](https://crates.io/crates/twitch_oauth2)&ensp;[![docs-rs]](https://docs.rs/twitch_oauth2/0.6.1/twitch_oauth2)
4+
[![github]](https://github.com/emilgardis/twitch_oauth2)&ensp;[![crates-io]](https://crates.io/crates/twitch_oauth2)&ensp;[![docs-rs]](https://docs.rs/twitch_oauth2/0.7.0/twitch_oauth2)
55

66
[github]: https://img.shields.io/badge/github-emilgardis/twitch__oauth2-8da0cb?style=for-the-badge&labelColor=555555&logo=github"
77
[crates-io]: https://img.shields.io/crates/v/twitch_oauth2.svg?style=for-the-badge&color=fc8d62&logo=rust"

examples/auth_flow.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ async fn main() -> anyhow::Result<()> {
2828

2929
println!("Go to this page: {}", url);
3030

31-
let input = rpassword::prompt_password_stdout(
31+
let input = rpassword::prompt_password(
3232
"Paste in the resulting adress after authenticating (input hidden): ",
3333
)?;
3434

src/client.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ pub trait Client<'a>: Sync + Send + 'a {
3030
pub struct DummyClient;
3131

3232
#[cfg(feature = "reqwest")]
33-
#[cfg_attr(nightly, doc(cfg(feature = "reqwest_client")))] // FIXME: This doc_cfg does nothing
3433
impl<'a> Client<'a> for DummyClient {
3534
type Error = DummyClient;
3635

@@ -45,7 +44,6 @@ impl<'a> Client<'a> for DummyClient {
4544
use reqwest::Client as ReqwestClient;
4645

4746
#[cfg(feature = "reqwest")]
48-
#[cfg_attr(nightly, doc(cfg(feature = "reqwest_client")))] // FIXME: This doc_cfg does nothing
4947
impl<'a> Client<'a> for ReqwestClient {
5048
type Error = reqwest::Error;
5149

@@ -54,7 +52,6 @@ impl<'a> Client<'a> for ReqwestClient {
5452
request: crate::HttpRequest,
5553
) -> BoxedFuture<'a, Result<crate::HttpResponse, Self::Error>> {
5654
// Reqwest plays really nice here and has a try_from on `http::Request` -> `reqwest::Request`
57-
use std::convert::TryFrom;
5855
let req = match reqwest::Request::try_from(request) {
5956
Ok(req) => req,
6057
Err(e) => return Box::pin(async { Err(e) }),
@@ -96,7 +93,6 @@ pub enum SurfError {
9693
}
9794

9895
#[cfg(feature = "surf")]
99-
#[cfg_attr(nightly, doc(cfg(feature = "surf_client")))] // FIXME: This doc_cfg does nothing
10096
impl<'a> Client<'a> for SurfClient {
10197
type Error = SurfError;
10298

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
#![deny(missing_docs, broken_intra_doc_links)] // This will be weird until 1.52, see https://github.com/rust-lang/rust/pull/80527
33
#![cfg_attr(nightly, deny(rustdoc::broken_intra_doc_links))]
44
#![cfg_attr(nightly, feature(doc_cfg))]
5-
#![doc(html_root_url = "https://docs.rs/twitch_oauth2/0.6.1")]
6-
//! [![github]](https://github.com/emilgardis/twitch_oauth2)&ensp;[![crates-io]](https://crates.io/crates/twitch_oauth2)&ensp;[![docs-rs]](https://docs.rs/twitch_oauth2/0.6.1/twitch_oauth2)
5+
#![doc(html_root_url = "https://docs.rs/twitch_oauth2/0.7.0")]
6+
//! [![github]](https://github.com/emilgardis/twitch_oauth2)&ensp;[![crates-io]](https://crates.io/crates/twitch_oauth2)&ensp;[![docs-rs]](https://docs.rs/twitch_oauth2/0.7.0/twitch_oauth2)
77
//!
88
//! [github]: https://img.shields.io/badge/github-emilgardis/twitch__oauth2-8da0cb?style=for-the-badge&labelColor=555555&logo=github"
99
//! [crates-io]: https://img.shields.io/crates/v/twitch_oauth2.svg?style=for-the-badge&color=fc8d62&logo=rust"

0 commit comments

Comments
 (0)