Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump tide from 0.15.0 to 0.16.0 #31

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dependabot-preview[bot]
Copy link
Contributor

Bumps tide from 0.15.0 to 0.16.0.

Release notes

Sourced from tide's releases.

v0.16.0

tide is a pragmatic Rust web app framework built for rapid development. It comes with a robust set of features that make building async web apps and APIs easier and more fun. It is part of the http-rs project and a counterpart to the surf HTTP client. Check out the docs or join us on Zulip.

Overview

This release includes a new serve_file method on Route, more ToListener implementations, and new initiatives.

Route::serve_file

Tide has had support for Route::serve_dir for several releases now. However sometimes it's nice to be able to quickly serve a file from a single file from a route. For that purpose we're introducing Route::serve_file today.

#[async_std::main]
async fn main() -> Result<(), std::io::Error> {
    let mut app = tide::new();
    app.at("/").serve_file("public/index.html")?;
    app.listen("127.0.0.1:8080").await?;
    Ok(())
}

This isn't the end of the road for asset serving in tide though; we recognize the need to support more complex asset pipelines in production settings. We expect to eventually kick off an initiative around this; but in the meantime Route::serve_file is a nice convenience for those who want it.

More ToListener implementations

Tide's Server::listen function operates using a ToListener trait, which works much like std::net::ToSocketAddr: it's implemented on a variety of strings, tuples, and concrete types to provide a great deal of flexibility in how it's initialized.

In this patch we're introducing ToListener on three more types: &String, (String, u16) and (&String, u16). This allows for much easier integration with CLI parsers such as structopt, requiring fewer conversions:

use structopt::StructOpt;
#[derive(structopt::StructOpt)]
struct Opts {
host: String,
port: u16,
}
#[async_std]
async fn main() -> tide::Result<()> {
let opts = Opts::from_args();
let mut app = tide::new();
app.listen((opts.host, opts.port)).await?;  // this now works without conversions!
Ok(())

New Initiatives

Last week we released the last minor version of the http-types 2.x family, and the merge window for http-types 3.x has opened up. This is an effort which will take several weeks of work and planning to see through to success; but we're excited being able to smooth out some of the rough patches we've uncovered in http-types over the past year. The work here has been scoped out, and we've started to make good progress on it.

... (truncated)

Commits
  • a49b2ba v0.16.0
  • 9365b5b Merge pull request #776 from KodrAus/patch-1
  • 50ab906 Merge pull request #780 from joshtriplett/optional-cookies
  • 93330b6 Merge branch 'main' into patch-1
  • 3e27aa2 Merge pull request #782 from Stranger6667/dd/fix-example-requirements
  • bec631f docs: Add missing serde requirement in example
  • 590d398 Reduce dependencies when cookies not enabled
  • a3a5abf Merge pull request #775 from taiki-e/pin-project-lite
  • 07bfcd1 update log to use kv_unstable_std instead of std
  • ad6a93a Update pin-project-lite to 0.2
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
  • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot dashboard:

  • Update frequency (including time of day and day of week)
  • Pull request limits (per update run and/or open at any time)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

Bumps [tide](https://github.com/http-rs/tide) from 0.15.0 to 0.16.0.
- [Release notes](https://github.com/http-rs/tide/releases)
- [Commits](http-rs/tide@v0.15.0...v0.16.0)

Signed-off-by: dependabot-preview[bot] <[email protected]>
@dependabot-preview dependabot-preview bot added the dependencies Pull requests that update a dependency file label May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants