From 90a6749313a459439ace49cc2e9343ba2d6e6c08 Mon Sep 17 00:00:00 2001 From: Sergio Benitez Date: Fri, 30 Nov 2018 20:21:51 -0800 Subject: [PATCH] New version: 0.4.0-rc.2. --- CHANGELOG.md | 80 ++++++++++++++++++++++++ contrib/codegen/Cargo.toml | 2 +- contrib/lib/Cargo.toml | 6 +- contrib/lib/src/databases.rs | 2 +- contrib/lib/src/lib.rs | 2 +- contrib/lib/src/templates/mod.rs | 2 +- core/codegen/Cargo.toml | 6 +- core/codegen/src/lib.rs | 2 +- core/http/Cargo.toml | 4 +- core/lib/Cargo.toml | 6 +- core/lib/src/lib.rs | 2 +- scripts/config.sh | 2 +- site/guide/1-quickstart.md | 2 +- site/guide/10-pastebin.md | 4 +- site/guide/2-getting-started.md | 2 +- site/guide/4-requests.md | 2 +- site/guide/6-state.md | 2 +- site/guide/9-configuration.md | 2 +- site/index.toml | 4 +- site/news/2018-11-30-version-0.4-rc-2.md | 48 ++++++++++++++ site/news/index.toml | 20 ++++++ 21 files changed, 175 insertions(+), 27 deletions(-) create mode 100644 site/news/2018-11-30-version-0.4-rc-2.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a2c4f76..6e35dc6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,83 @@ +# Version 0.4.0-rc.2 (Nov 30, 2018) + +## New Features + +This release includes the following new features: + + * Introduced the [`SpaceHelmet`] security and privacy headers fairing. + * Private cookies are gated behind a `private-cookies` feature. + * Applications can launch without a working directory. + * `Option` and `Result` types can be used in `uri!` expressions. + * Added [`State::from()`] for constructing `State` values. + +[`SpaceHelmet`]: https://api.rocket.rs/v0.4/rocket_contrib/helmet/index.html +[`State::from()`]: https://api.rocket.rs/v0.4/rocket/struct.State.html#method.from + +## Breaking Changes + +This release includes several breaking changes. These changes are listed below +along with a short note about how to handle the breaking change in existing +applications when applicable. + + * **Minimum required nightly is `2018-11-23`.** + + Update to `nightly-2018-11-23` or later before updating to `rc.2`. + + * **[`UriDisplay`] is parameterized by a [`UriPart`].** + + When implementing `UriDisplay`, decide whether the value is to be displayed + in the path part, query part, or both of a URI. Implement `UriDisplay` + and/or `UriDisplay` appropriately. + + * **[`UriDisplay`] derive was removed in favor of [`UriDisplayQuery`] and + [`UriDisplayPath`].** + + To mimic the previous behavior, derive `UriDisplayQuery`. + + * **[`Config::root()`] returns an `Option<&Path>` instead of an `&Path`.** + + For the previous behavior, use `config.root().unwrap()`. + + * **[`Config`] constructors return a `Config` instead of a `Result`.** + + * **`ConfigError::BadCWD`, `Config.config_path` were removed.** + +[`UriDisplay`]: https://api.rocket.rs/v0.4/rocket/http/uri/trait.UriDisplay.html +[`UriPart`]: https://api.rocket.rs/v0.4/rocket/http/uri/trait.UriPart.html +[`UriDisplayPath`]: https://api.rocket.rs/v0.4/rocket_codegen/derive.UriDisplayPath.html +[`UriDisplayQuery`]: https://api.rocket.rs/v0.4/rocket_codegen/derive.UriDisplayQuery.html +[`Config`]: https://api.rocket.rs/v0.4/rocket/struct.Config.html +[`Config::root()`]: https://api.rocket.rs/v0.4/rocket/struct.Config.html#method.root + +## Fixes + +Several issues in the first release candidate were addressed in this release: + + * Characters in URIs are properly percent-encoded ([#808]). + * Generated variables are properly spanned and prefixed ([#817], [#839]). + * [`Client`] regained `Sync` ([#814]). + +[#808]: https://github.com/SergioBenitez/Rocket/issues/808 +[#817]: https://github.com/SergioBenitez/Rocket/issues/817 +[#839]: https://github.com/SergioBenitez/Rocket/issues/839 +[#814]: https://github.com/SergioBenitez/Rocket/issues/814 + +## General Improvements + +In addition to new features, Rocket saw the following improvements: + + * Console coloring uses default terminal colors instead of white. + * Console coloring is consistent across all messages. + * `i128` and `u128` now implement [`FromParam`], [`FromFormValue`]. + * [`Form`] and [`LenientForm`] can be publicly constructed. + * Added ZIP (`application/zip`) as a known media type. + * The `base64` dependency was updated to `0.10`. + * Private, hidden `http` types are no longer visible in the rustdocs. + +[`FromParam`]: https://api.rocket.rs/v0.4/rocket/request/trait.FromParam.html +[`FromFormValue`]: https://api.rocket.rs/v0.4/rocket/request/trait.FromFormValue.html +[`Data`]: https://api.rocket.rs/v0.4/rocket/struct.Data.html + # Version 0.4.0-rc.1 (Oct 31, 2018) ## New Features diff --git a/contrib/codegen/Cargo.toml b/contrib/codegen/Cargo.toml index 3ab72780..9dfb1247 100644 --- a/contrib/codegen/Cargo.toml +++ b/contrib/codegen/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rocket_contrib_codegen" -version = "0.4.0-rc.1" +version = "0.4.0-rc.2" authors = ["Sergio Benitez "] description = "Procedural macros for the Rocket contrib libraries." documentation = "https://api.rocket.rs/v0.4/rocket_contrib/" diff --git a/contrib/lib/Cargo.toml b/contrib/lib/Cargo.toml index a68162c4..86ca1076 100644 --- a/contrib/lib/Cargo.toml +++ b/contrib/lib/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rocket_contrib" -version = "0.4.0-rc.1" +version = "0.4.0-rc.2" authors = ["Sergio Benitez "] description = "Community contributed libraries for the Rocket web framework." documentation = "https://api.rocket.rs/v0.4/rocket_contrib/" @@ -36,8 +36,8 @@ redis_pool = ["databases", "redis", "r2d2_redis"] [dependencies] # Global dependencies. -rocket_contrib_codegen = { version = "0.4.0-rc.1", path = "../codegen", optional = true } -rocket = { version = "0.4.0-rc.1", path = "../../core/lib/" } +rocket_contrib_codegen = { version = "0.4.0-rc.2", path = "../codegen", optional = true } +rocket = { version = "0.4.0-rc.2", path = "../../core/lib/" } log = "0.4" # Serialization and templating dependencies. diff --git a/contrib/lib/src/databases.rs b/contrib/lib/src/databases.rs index a312599c..148b06b0 100644 --- a/contrib/lib/src/databases.rs +++ b/contrib/lib/src/databases.rs @@ -32,7 +32,7 @@ //! //! ```toml //! [dependencies.rocket_contrib] -//! version = "0.4.0-rc.1" +//! version = "0.4.0-rc.2" //! default-features = false //! features = ["diesel_sqlite_pool"] //! ``` diff --git a/contrib/lib/src/lib.rs b/contrib/lib/src/lib.rs index cca8320c..51b3006d 100644 --- a/contrib/lib/src/lib.rs +++ b/contrib/lib/src/lib.rs @@ -33,7 +33,7 @@ //! //! ```toml //! [dependencies.rocket_contrib] -//! version = "0.4.0-rc.1" +//! version = "0.4.0-rc.2" //! default-features = false //! features = ["json"] //! ``` diff --git a/contrib/lib/src/templates/mod.rs b/contrib/lib/src/templates/mod.rs index 68b5048c..f77f1538 100644 --- a/contrib/lib/src/templates/mod.rs +++ b/contrib/lib/src/templates/mod.rs @@ -9,7 +9,7 @@ //! //! ```toml //! [dependencies.rocket_contrib] -//! version = 0.4.0-rc.1 +//! version = 0.4.0-rc.2 //! default-features = false //! features = ["handlebars_templates", "tera_templates"] //! ``` diff --git a/core/codegen/Cargo.toml b/core/codegen/Cargo.toml index 3fa5c850..63bc0e06 100644 --- a/core/codegen/Cargo.toml +++ b/core/codegen/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rocket_codegen" -version = "0.4.0-rc.1" +version = "0.4.0-rc.2" authors = ["Sergio Benitez "] description = "Procedural macros for the Rocket web framework." documentation = "https://api.rocket.rs/v0.4/rocket_codegen/" @@ -17,7 +17,7 @@ proc-macro = true [dependencies] indexmap = "1.0" quote = "0.6.1" -rocket_http = { version = "0.4.0-rc.1", path = "../http/" } +rocket_http = { version = "0.4.0-rc.2", path = "../http/" } devise = "0.2" [build-dependencies] @@ -25,5 +25,5 @@ yansi = "0.5" version_check = "0.1.3" [dev-dependencies] -rocket = { version = "0.4.0-rc.1", path = "../lib" } +rocket = { version = "0.4.0-rc.2", path = "../lib" } compiletest_rs = { version = "0.3", features = ["stable"] } diff --git a/core/codegen/src/lib.rs b/core/codegen/src/lib.rs index ef8e1c5a..47448892 100644 --- a/core/codegen/src/lib.rs +++ b/core/codegen/src/lib.rs @@ -22,7 +22,7 @@ //! //! ```toml //! [dependencies] -//! rocket = "0.4.0-rc.1" +//! rocket = "0.4.0-rc.2" //! ``` //! //! And to import all macros, attributes, and derives via `#[macro_use]` in the diff --git a/core/http/Cargo.toml b/core/http/Cargo.toml index fcb3f38a..39c0a793 100644 --- a/core/http/Cargo.toml +++ b/core/http/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rocket_http" -version = "0.4.0-rc.1" +version = "0.4.0-rc.2" authors = ["Sergio Benitez "] description = """ Types, traits, and parsers for HTTP requests, responses, and headers. @@ -36,4 +36,4 @@ features = ["server"] optional = true [dev-dependencies] -rocket = { version = "0.4.0-rc.1", path = "../lib" } +rocket = { version = "0.4.0-rc.2", path = "../lib" } diff --git a/core/lib/Cargo.toml b/core/lib/Cargo.toml index 7fdaa2c8..7d407a96 100644 --- a/core/lib/Cargo.toml +++ b/core/lib/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rocket" -version = "0.4.0-rc.1" +version = "0.4.0-rc.2" authors = ["Sergio Benitez "] description = """ Web framework for nightly with a focus on ease-of-use, expressibility, and speed. @@ -23,8 +23,8 @@ tls = ["rocket_http/tls"] private-cookies = ["rocket_http/private-cookies"] [dependencies] -rocket_codegen = { version = "0.4.0-rc.1", path = "../codegen" } -rocket_http = { version = "0.4.0-rc.1", path = "../http" } +rocket_codegen = { version = "0.4.0-rc.2", path = "../codegen" } +rocket_http = { version = "0.4.0-rc.2", path = "../http" } yansi = "0.5" log = "0.4" toml = "0.4.7" diff --git a/core/lib/src/lib.rs b/core/lib/src/lib.rs index a6dea9e2..429c26e0 100644 --- a/core/lib/src/lib.rs +++ b/core/lib/src/lib.rs @@ -47,7 +47,7 @@ //! //! ```toml //! [dependencies] -//! rocket = "0.4.0-rc.1" +//! rocket = "0.4.0-rc.2" //! ``` //! //! Then, add the following to the top of your `main.rs` file: diff --git a/scripts/config.sh b/scripts/config.sh index 0f961d3f..27beddfe 100755 --- a/scripts/config.sh +++ b/scripts/config.sh @@ -24,7 +24,7 @@ function relative() { } # Full and major version of Rocket -ROCKET_VERSION="0.4.0-rc.1" +ROCKET_VERSION="0.4.0-rc.2" ROCKET_MAJOR_VERSION="0.4" CURRENT_RELEASE=true diff --git a/site/guide/1-quickstart.md b/site/guide/1-quickstart.md index 15c4b214..aa6bf83d 100644 --- a/site/guide/1-quickstart.md +++ b/site/guide/1-quickstart.md @@ -15,7 +15,7 @@ For instance, the following set of commands runs the `hello_world` example: ```sh git clone https://github.com/SergioBenitez/Rocket cd Rocket -git checkout v0.4.0-rc.1 +git checkout v0.4.0-rc.2 cd examples/hello_world cargo run ``` diff --git a/site/guide/10-pastebin.md b/site/guide/10-pastebin.md index 61b32f67..2985fc01 100644 --- a/site/guide/10-pastebin.md +++ b/site/guide/10-pastebin.md @@ -43,8 +43,8 @@ Then add the usual Rocket dependencies to the `Cargo.toml` file: ```toml [dependencies] -rocket = "0.4.0-rc.1" -rocket_codegen = "0.4.0-rc.1" +rocket = "0.4.0-rc.2" +rocket_codegen = "0.4.0-rc.2" ``` And finally, create a skeleton Rocket application to work off of in diff --git a/site/guide/2-getting-started.md b/site/guide/2-getting-started.md index b55efed0..14a21f3f 100644 --- a/site/guide/2-getting-started.md +++ b/site/guide/2-getting-started.md @@ -50,7 +50,7 @@ Now, add Rocket as a dependency in your `Cargo.toml`: ``` [dependencies] -rocket = "0.4.0-rc.1" +rocket = "0.4.0-rc.2" ``` Modify `src/main.rs` so that it contains the code for the Rocket `Hello, world!` diff --git a/site/guide/4-requests.md b/site/guide/4-requests.md index 9a530055..26875809 100644 --- a/site/guide/4-requests.md +++ b/site/guide/4-requests.md @@ -510,7 +510,7 @@ so that you depend on `rocket` as follows: ```toml [dependencies] -rocket = { version = "0.4.0-rc.1", default-features = false } +rocket = { version = "0.4.0-rc.2", default-features = false } ``` [`ring`]: https://github.com/briansmith/ring diff --git a/site/guide/6-state.md b/site/guide/6-state.md index ca74d129..aa10c06b 100644 --- a/site/guide/6-state.md +++ b/site/guide/6-state.md @@ -215,7 +215,7 @@ databases, you'd write in `Cargo.toml`: ```toml [dependencies.rocket_contrib] -version = "0.4.0-rc.1" +version = "0.4.0-rc.2" default-features = false features = ["diesel_sqlite_pool"] ``` diff --git a/site/guide/9-configuration.md b/site/guide/9-configuration.md index ab1d46a8..43b1f78b 100644 --- a/site/guide/9-configuration.md +++ b/site/guide/9-configuration.md @@ -279,7 +279,7 @@ dependency in your `Cargo.toml` file: ``` [dependencies] -rocket = { version = "0.4.0-rc.1", features = ["tls"] } +rocket = { version = "0.4.0-rc.2", features = ["tls"] } ``` TLS is configured through the `tls` configuration parameter. The value of `tls` diff --git a/site/index.toml b/site/index.toml index 223da92e..32fcd918 100644 --- a/site/index.toml +++ b/site/index.toml @@ -3,8 +3,8 @@ ############################################################################### [release] -version = "0.4.0-rc.1" -date = "Oct 31, 2018" +version = "0.4.0-rc.2" +date = "Nov 30, 2018" ############################################################################### # Top features: displayed in the header under the introductory text. diff --git a/site/news/2018-11-30-version-0.4-rc-2.md b/site/news/2018-11-30-version-0.4-rc-2.md new file mode 100644 index 00000000..a44ee082 --- /dev/null +++ b/site/news/2018-11-30-version-0.4-rc-2.md @@ -0,0 +1,48 @@ +# Rocket's 2nd v0.4 Release Candidate + + + +After a successful and productive initial v0.4 release candidate, I am happy to +announce that the second release candidate for Rocket v0.4 is now available. + +This release candidate fixes issues identified during the first release +candidate, introduces further features, and leverages upstream `rustc` +contributions for improved diagnostics and stability. As before, this is an +opportunity to discover issues with Rocket v0.4 and its documentation before its +general release. We encourage all users to migrate their applications to the +second release candidate and report any issues to the [GitHub issue tracker]. +To update to `v0.4.0-rc.2`, manually update `rocket` in your `Cargo.toml` file: + +```toml +[dependencies] +rocket = "0.4.0-rc.2" +``` + +Barring any major issues, of which none are expected, the general release of +Rocket v0.4 is planned for Wednesday, December 5th, when we'll post a full news +article covering the biggest features and changes in Rocket v0.4. Until then, +the [CHANGELOG] contains every feature addition, change, and improvement since +v0.4.0-rc.1 and v0.3, as well as information on migrating your applications to +v0.4. All documentation, including the [guide] and [API docs], has been updated +in full for the second release candidate. + +We're excited for your feedback, and we look forward to seeing you again on +Wednesday, December 5th for the general release! + +[GitHub issue tracker]: https://github.com/SergioBenitez/Rocket/issues +[API docs]: https://api.rocket.rs/v0.4/rocket/ +[guide]: ../../guide +[CHANGELOG]: https://github.com/SergioBenitez/Rocket/tree/v0.4/CHANGELOG.md#version-040-rc2-nov-30-2018 + +## About Rocket + +Rocket is a web framework for Rust with a focus on ease of use, expressibility, +and speed. Rocket makes it simple to write fast web applications without +sacrificing flexibility or type safety. All with minimal code. + +Not already using Rocket? Join the tens of thousands of users and hundreds of +companies happily using Rocket today! Rocket's extensive documentation makes it +easy. Get started now by [reading through the guide](../../guide) or learning +more from [the overview](../../overview). diff --git a/site/news/index.toml b/site/news/index.toml index 1f9a7695..1384ecd4 100644 --- a/site/news/index.toml +++ b/site/news/index.toml @@ -1,3 +1,23 @@ +[[articles]] +title = "Rocket's 2nd v0.4 Release Candidate" +slug = "2018-11-30-version-0.4-rc-2" +author = "Sergio Benitez" +author_url = "https://sergio.bz" +date = "November 30, 2018" +snippet = """ +After a successful and productive initial v0.4 release candidate, I am happy to +announce that the second release candidate for Rocket v0.4 is now available. + +This release candidate fixes issues identified during the first release +candidate, introduces further features, and leverages upstream `rustc` +contributions for improved diagnostics and stability. As before, this is an +opportunity to discover issues with Rocket v0.4 and its documentation before its +general release. We encourage all users to migrate their applications to the +second release candidate and report any issues to the [GitHub issue tracker]. + +[GitHub issue tracker]: https://github.com/SergioBenitez/Rocket/issues +""" + [[articles]] title = "Rocket v0.4 Release Candidate" slug = "2018-10-31-version-0.4-rc"