From e6bbeacb1c90be5f91c79fe503b42e5ea74af21b Mon Sep 17 00:00:00 2001 From: Sergio Benitez Date: Mon, 17 Apr 2017 16:21:56 -0700 Subject: [PATCH] New version: 0.2.6. --- CHANGELOG.md | 9 +++++++++ codegen/Cargo.toml | 4 ++-- contrib/Cargo.toml | 4 ++-- lib/Cargo.toml | 4 ++-- site/guide/conclusion.md | 4 ++-- site/guide/getting-started.md | 4 ++-- site/guide/overview.md | 4 ++-- site/guide/pastebin.md | 6 +++--- site/guide/requests.md | 16 ++++++++-------- site/guide/responses.md | 4 ++-- site/guide/state.md | 2 +- site/guide/testing.md | 4 ++-- site/index.toml | 4 ++-- 13 files changed, 39 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01a9dd38..c6d3ae1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +# Version 0.2.6 (Apr 17, 2017) + +## Codegen + + * Allow `k` and `v` to be used as fields in `FromForm` structures by avoiding + identifier collisions ([#265]). + +[#265]: https://github.com/SergioBenitez/Rocket/issues/265 + # Version 0.2.5 (Apr 16, 2017) ## Codegen diff --git a/codegen/Cargo.toml b/codegen/Cargo.toml index 93b2d2eb..d01287dd 100644 --- a/codegen/Cargo.toml +++ b/codegen/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rocket_codegen" -version = "0.2.5" +version = "0.2.6" authors = ["Sergio Benitez "] description = "Code generation for the Rocket web framework." documentation = "https://api.rocket.rs/rocket_codegen/" @@ -15,7 +15,7 @@ build = "build.rs" plugin = true [dependencies] -rocket = { version = "0.2.5", path = "../lib/" } +rocket = { version = "0.2.6", path = "../lib/" } log = "^0.3" [dev-dependencies] diff --git a/contrib/Cargo.toml b/contrib/Cargo.toml index 4ac2bed3..73cafa1c 100644 --- a/contrib/Cargo.toml +++ b/contrib/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rocket_contrib" -version = "0.2.5" +version = "0.2.6" authors = ["Sergio Benitez "] description = "Community contributed libraries for the Rocket web framework." documentation = "https://api.rocket.rs/rocket_contrib/" @@ -22,7 +22,7 @@ templates = ["serde", "serde_json", "lazy_static_macro", "glob"] lazy_static_macro = ["lazy_static"] [dependencies] -rocket = { version = "0.2.5", path = "../lib/" } +rocket = { version = "0.2.6", path = "../lib/" } log = "^0.3" # UUID dependencies. diff --git a/lib/Cargo.toml b/lib/Cargo.toml index f32f38d5..90b654a3 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rocket" -version = "0.2.5" +version = "0.2.6" authors = ["Sergio Benitez "] description = """ Web framework for nightly with a focus on ease-of-use, expressibility, and speed. @@ -43,7 +43,7 @@ optional = true [dev-dependencies] lazy_static = "0.2" -rocket_codegen = { version = "0.2.5", path = "../codegen" } +rocket_codegen = { version = "0.2.6", path = "../codegen" } [build-dependencies] ansi_term = "0.9" diff --git a/site/guide/conclusion.md b/site/guide/conclusion.md index d7d337a4..1dbfc3d3 100644 --- a/site/guide/conclusion.md +++ b/site/guide/conclusion.md @@ -22,7 +22,7 @@ guide. The best way to learn Rocket is to _build something_. It should be fun and easy, and there's always someone to help. Alternatively, you can read through the -[Rocket examples](https://github.com/SergioBenitez/Rocket/tree/v0.2.5/examples) +[Rocket examples](https://github.com/SergioBenitez/Rocket/tree/v0.2.6/examples) or the [Rocket source -code](https://github.com/SergioBenitez/Rocket/tree/v0.2.5/lib/src). Whatever you +code](https://github.com/SergioBenitez/Rocket/tree/v0.2.6/lib/src). Whatever you decide to do next, we hope you have a blast! diff --git a/site/guide/getting-started.md b/site/guide/getting-started.md index 9b601608..5e4ceda4 100644 --- a/site/guide/getting-started.md +++ b/site/guide/getting-started.md @@ -53,8 +53,8 @@ project by ensuring your `Cargo.toml` contains the following: ``` [dependencies] -rocket = "0.2.5" -rocket_codegen = "0.2.5" +rocket = "0.2.6" +rocket_codegen = "0.2.6" ``` Modify `src/main.rs` so that it contains the code for the Rocket `Hello, world!` diff --git a/site/guide/overview.md b/site/guide/overview.md index 53a7ef0c..e109ad6c 100644 --- a/site/guide/overview.md +++ b/site/guide/overview.md @@ -172,10 +172,10 @@ we expected. A version of this example's complete crate, ready to `cargo run`, can be found on -[GitHub](https://github.com/SergioBenitez/Rocket/tree/v0.2.5/examples/hello_world). +[GitHub](https://github.com/SergioBenitez/Rocket/tree/v0.2.6/examples/hello_world). You can find dozens of other complete examples, spanning all of Rocket's features, in the [GitHub examples -directory](https://github.com/SergioBenitez/Rocket/tree/v0.2.5/examples/). +directory](https://github.com/SergioBenitez/Rocket/tree/v0.2.6/examples/). ## Configuration diff --git a/site/guide/pastebin.md b/site/guide/pastebin.md index adf440f3..2935ecee 100644 --- a/site/guide/pastebin.md +++ b/site/guide/pastebin.md @@ -43,8 +43,8 @@ Then add the usual Rocket dependencies to the `Cargo.toml` file: ```toml [dependencies] -rocket = "0.2.5" -rocket_codegen = "0.2.5" +rocket = "0.2.6" +rocket_codegen = "0.2.6" ``` And finally, create a skeleton Rocket application to work off of in @@ -402,4 +402,4 @@ through some of them to get a better feel for Rocket. Here are some ideas: You can find the full source code for the completed pastebin tutorial in the [Rocket Github -Repo](https://github.com/SergioBenitez/Rocket/tree/v0.2.5/examples/pastebin). +Repo](https://github.com/SergioBenitez/Rocket/tree/v0.2.6/examples/pastebin). diff --git a/site/guide/requests.md b/site/guide/requests.md index 4225f0dd..57b5dec1 100644 --- a/site/guide/requests.md +++ b/site/guide/requests.md @@ -31,7 +31,7 @@ requests under certain conditions. If a `POST` request contains a body of field has the name `_method` and a valid HTTP method as its value, that field's value is used as the method for the incoming request. This allows Rocket applications to submit non-`POST` forms. The [todo -example](https://github.com/SergioBenitez/Rocket/tree/v0.2.5/examples/todo/static/index.html.tera#L47) +example](https://github.com/SergioBenitez/Rocket/tree/v0.2.6/examples/todo/static/index.html.tera#L47) makes use of this feature to submit `PUT` and `DELETE` requests from a web form. ## Format @@ -185,7 +185,7 @@ fn index(cookies: &Cookies, content: ContentType) -> String { ... } ``` The [cookies example on -GitHub](https://github.com/SergioBenitez/Rocket/tree/v0.2.5/examples/cookies) +GitHub](https://github.com/SergioBenitez/Rocket/tree/v0.2.6/examples/cookies) illustrates how to use the `Cookies` type to get and set cookies. You can implement `FromRequest` for your own types. For instance, to protect a @@ -259,9 +259,9 @@ validates integers over that age. If a form is a submitted with a bad age, Rocket won't call a handler requiring a valid form for that structure. You can use `Option` or `Result` types for fields to catch parse failures. -The [forms](https://github.com/SergioBenitez/Rocket/tree/v0.2.5/examples/forms) +The [forms](https://github.com/SergioBenitez/Rocket/tree/v0.2.6/examples/forms) and [forms kitchen -sink](https://github.com/SergioBenitez/Rocket/tree/v0.2.5/examples/form_kitchen_sink) +sink](https://github.com/SergioBenitez/Rocket/tree/v0.2.6/examples/form_kitchen_sink) examples on GitHub provide further illustrations. ### JSON @@ -282,7 +282,7 @@ fn new(task: JSON) -> String { ... } The only condition is that the generic type to `JSON` implements the `Deserialize` trait. See the [JSON example on -GitHub](https://github.com/SergioBenitez/Rocket/tree/v0.2.5/examples/json) for a +GitHub](https://github.com/SergioBenitez/Rocket/tree/v0.2.6/examples/json) for a complete example. ### Streaming @@ -305,7 +305,7 @@ The route above accepts any `POST` request to the `/upload` path with text response if the upload succeeds. If the upload fails, an error response is returned. The handler above is complete. It really is that simple! See the [GitHub example -code](https://github.com/SergioBenitez/Rocket/tree/v0.2.5/examples/raw_upload) +code](https://github.com/SergioBenitez/Rocket/tree/v0.2.6/examples/raw_upload) for the full crate. ## Query Strings @@ -341,7 +341,7 @@ the request is forwarded to the next matching route. To catch parse failures, you can use `Option` or `Result` as the type of the field to catch errors for. See [the GitHub -example](https://github.com/SergioBenitez/Rocket/tree/v0.2.5/examples/query_params) +example](https://github.com/SergioBenitez/Rocket/tree/v0.2.6/examples/query_params) for a complete illustration. ## Error Catchers @@ -371,7 +371,7 @@ types [Request](https://api.rocket.rs/rocket/struct.Request.html) and/or [Error](https://api.rocket.rs/rocket/enum.Error.html). At present, the `Error` type is not particularly useful, and so it is often omitted. The [error catcher -example](https://github.com/SergioBenitez/Rocket/tree/v0.2.5/examples/errors) on +example](https://github.com/SergioBenitez/Rocket/tree/v0.2.6/examples/errors) on GitHub illustrates their use in full. Rocket has a default catcher for all of the standard HTTP error codes including diff --git a/site/guide/responses.md b/site/guide/responses.md index 6a9fb3f0..8a46cb9e 100644 --- a/site/guide/responses.md +++ b/site/guide/responses.md @@ -118,7 +118,7 @@ serialization in a fixed-sized body. If serialization fails, the request is forwarded to the **500** error catcher. For a complete example, see the [JSON example on -GitHub](https://github.com/SergioBenitez/Rocket/tree/v0.2.5/examples/json). +GitHub](https://github.com/SergioBenitez/Rocket/tree/v0.2.6/examples/json). ## Templates @@ -147,7 +147,7 @@ The context can be any type that implements `Serialize` and serializes to an [Template](https://api.rocket.rs/rocket_contrib/struct.Template.html) API documentation contains more information about templates, while the [Handlebars Templates example on -GitHub](https://github.com/SergioBenitez/Rocket/tree/v0.2.5/examples/handlebars_templates) +GitHub](https://github.com/SergioBenitez/Rocket/tree/v0.2.6/examples/handlebars_templates) is a fully composed application that makes use of Handlebars templates. ## Streaming diff --git a/site/guide/state.md b/site/guide/state.md index ede89ee0..fff7fcef 100644 --- a/site/guide/state.md +++ b/site/guide/state.md @@ -138,7 +138,7 @@ attributes. You can find a complete example using the `HitCounter` structure in the [state example on -GitHub](https://github.com/SergioBenitez/Rocket/tree/v0.2.5/examples/state) and +GitHub](https://github.com/SergioBenitez/Rocket/tree/v0.2.6/examples/state) and learn more about the [manage method](https://api.rocket.rs/rocket/struct.Rocket.html#method.manage) and [State type](https://api.rocket.rs/rocket/struct.State.html) in the API docs. diff --git a/site/guide/testing.md b/site/guide/testing.md index 6144d5dc..73641201 100644 --- a/site/guide/testing.md +++ b/site/guide/testing.md @@ -40,7 +40,7 @@ follows: ```toml [dev-dependencies] -rocket = { version = "0.2.5", features = ["testing"] } +rocket = { version = "0.2.6", features = ["testing"] } ``` With this in place, running `cargo test` will result in Cargo compiling Rocket @@ -107,7 +107,7 @@ assert_eq!(body_str, Some("Hello, world!".to_string())); That's it! Run the tests with `cargo test`. The complete application, with testing, can be found in the [GitHub testing -example](https://github.com/SergioBenitez/Rocket/tree/v0.2.5/examples/testing). +example](https://github.com/SergioBenitez/Rocket/tree/v0.2.6/examples/testing). ## Codegen Debug diff --git a/site/index.toml b/site/index.toml index 2e616274..b9630003 100644 --- a/site/index.toml +++ b/site/index.toml @@ -4,8 +4,8 @@ [release] url = "https://crates.io/crates/rocket" -version = "0.2.5" -date = "Apr 16, 2017" +version = "0.2.6" +date = "Apr 17, 2017" [[top_features]] title = "Type Safe"