mirror of https://github.com/rwf2/Rocket.git
Move to 0.5.0-dev on master.
This commit is contained in:
parent
78525c14da
commit
1caf87eb21
55
README.md
55
README.md
|
@ -39,22 +39,23 @@ Rocket is extensively documented:
|
|||
* [Guide]: A detailed guide and reference to Rocket.
|
||||
* [API Documentation]: The "rustdocs".
|
||||
|
||||
[Quickstart]: https://rocket.rs/v0.4/guide/quickstart
|
||||
[Getting Started]: https://rocket.rs/v0.4/guide/getting-started
|
||||
[Overview]: https://rocket.rs/v0.4/overview
|
||||
[Guide]: https://rocket.rs/v0.4/guide
|
||||
[API Documentation]: https://api.rocket.rs/v0.4/rocket
|
||||
[Quickstart]: https://rocket.rs/guide/quickstart
|
||||
[Getting Started]: https://rocket.rs/guide/getting-started
|
||||
[Overview]: https://rocket.rs/overview
|
||||
[Guide]: https://rocket.rs/guide
|
||||
[API Documentation]: https://api.rocket.rs/rocket
|
||||
|
||||
The official community support channels are the `#rocket` IRC channel on the
|
||||
[Mozilla IRC Server](https://wiki.mozilla.org/IRC) at `irc.mozilla.org` and the
|
||||
bridged [Rocket room on
|
||||
Matrix](https://riot.im/app/#/room/#mozilla_#rocket:matrix.org). If you're not
|
||||
familiar with IRC, we recommend chatting through [Matrix via
|
||||
Riot](https://riot.im/app/#/room/#mozilla_#rocket:matrix.org) or via the [Kiwi
|
||||
web IRC client](https://kiwiirc.com/client/irc.mozilla.org/#rocket). You can
|
||||
learn more about IRC via Mozilla's [Getting Started with
|
||||
IRC](https://developer.mozilla.org/en-US/docs/Mozilla/QA/Getting_Started_with_IRC)
|
||||
guide.
|
||||
[Mozilla IRC Server] at `irc.mozilla.org` and the bridged [Rocket room on
|
||||
Matrix]. If you're not familiar with IRC, we recommend chatting through [Matrix
|
||||
via Riot] or via the [Kiwi web IRC client]. You can learn more about IRC via
|
||||
Mozilla's [Getting Started with IRC] guide.
|
||||
|
||||
[Mozilla IRC Server]: https://wiki.mozilla.org/IRC
|
||||
[Rocket room on Matrix]: https://riot.im/app/#/room/#mozilla_#rocket:matrix.org
|
||||
[Matrix via Riot]: https://riot.im/app/#/room/#mozilla_#rocket:matrix.org
|
||||
[Kiwi web IRC client]: https://kiwiirc.com/client/irc.mozilla.org/#rocket
|
||||
[Getting Started with IRC]: https://developer.mozilla.org/en-US/docs/Mozilla/QA/Getting_Started_with_IRC
|
||||
|
||||
## Building
|
||||
|
||||
|
@ -101,28 +102,32 @@ example, the tests for routing can be found at the bottom of the
|
|||
|
||||
### Codegen
|
||||
|
||||
Code generation tests can be found in `codegen/tests`. We use the
|
||||
[compiletest](https://crates.io/crates/compiletest_rs) library, which was
|
||||
extracted from `rustc`, for testing. See the [compiler test
|
||||
documentation](https://github.com/rust-lang/rust/blob/master/src/test/COMPILER_TESTS.md)
|
||||
for information on how to write compiler tests.
|
||||
Code generation tests can be found in `codegen/tests`. We use the [compiletest]
|
||||
library, which was extracted from `rustc`, for testing. See the [compiler test
|
||||
documentation] for information on how to write compiler tests.
|
||||
|
||||
[compiletest]: https://crates.io/crates/compiletest_rs
|
||||
[compiler test documentation]: https://github.com/rust-lang/rust/blob/master/src/test/COMPILER_TESTS.md
|
||||
|
||||
## Documentation
|
||||
|
||||
You can build the Rocket API documentation locally by running
|
||||
`./scripts/mk-docs.sh`. The resulting documentation is what gets uploaded to
|
||||
[api.rocket.rs](https://api.rocket.rs/v0.4/).
|
||||
[api.rocket.rs](https://api.rocket.rs/).
|
||||
|
||||
## Contributing
|
||||
|
||||
Contributions are absolutely, positively welcome and encouraged! Contributions
|
||||
come in many forms. You could:
|
||||
|
||||
1. Submit a feature request or bug report as an [issue](https://github.com/SergioBenitez/Rocket/issues).
|
||||
2. Ask for improved documentation as an [issue](https://github.com/SergioBenitez/Rocket/issues).
|
||||
3. Comment on [issues that require
|
||||
feedback](https://github.com/SergioBenitez/Rocket/issues?q=is%3Aissue+is%3Aopen+label%3A%22feedback+wanted%22).
|
||||
4. Contribute code via [pull requests](https://github.com/SergioBenitez/Rocket/pulls).
|
||||
1. Submit a feature request or bug report as an [issue].
|
||||
2. Ask for improved documentation as an [issue].
|
||||
3. Comment on [issues that require feedback].
|
||||
4. Contribute code via [pull requests].
|
||||
|
||||
[issue]: https://github.com/SergioBenitez/Rocket/issues
|
||||
[issues that require feedback]: https://github.com/SergioBenitez/Rocket/issues?q=is%3Aissue+is%3Aopen+label%3A%22feedback+wanted%22).
|
||||
[pull requests]: https://github.com/SergioBenitez/Rocket/pulls.
|
||||
|
||||
We aim to keep Rocket's code quality at the highest level. This means that any
|
||||
code you contribute must be:
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
[package]
|
||||
name = "rocket_contrib_codegen"
|
||||
version = "0.4.0"
|
||||
version = "0.5.0-dev"
|
||||
authors = ["Sergio Benitez <sb@sergio.bz>"]
|
||||
description = "Procedural macros for the Rocket contrib libraries."
|
||||
documentation = "https://api.rocket.rs/v0.4/rocket_contrib/"
|
||||
documentation = "https://api.rocket.rs/v0.5/rocket_contrib/"
|
||||
homepage = "https://rocket.rs"
|
||||
repository = "https://github.com/SergioBenitez/Rocket"
|
||||
readme = "../../README.md"
|
||||
|
@ -27,5 +27,5 @@ version_check = "0.1.3"
|
|||
|
||||
[dev-dependencies]
|
||||
compiletest_rs = { version = "0.3", features = ["stable"] }
|
||||
rocket = { version = "0.4.0", path = "../../core/lib" }
|
||||
rocket_contrib = { version = "0.4.0", path = "../lib", features = ["diesel_sqlite_pool"] }
|
||||
rocket = { version = "0.5.0-dev", path = "../../core/lib" }
|
||||
rocket_contrib = { version = "0.5.0-dev", path = "../lib", features = ["diesel_sqlite_pool"] }
|
||||
|
|
|
@ -33,7 +33,7 @@ fn main() {
|
|||
print_version_err(&*version, &*date);
|
||||
eprintln!("{}{}{}",
|
||||
Blue.paint("See the getting started guide ("),
|
||||
"https://rocket.rs/v0.4/guide/getting-started/",
|
||||
"https://rocket.rs/v0.5/guide/getting-started/",
|
||||
Blue.paint(") for more information."));
|
||||
panic!("Aborting compilation due to incompatible compiler.")
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
[package]
|
||||
name = "rocket_contrib"
|
||||
version = "0.4.0"
|
||||
version = "0.5.0-dev"
|
||||
authors = ["Sergio Benitez <sb@sergio.bz>"]
|
||||
description = "Community contributed libraries for the Rocket web framework."
|
||||
documentation = "https://api.rocket.rs/v0.4/rocket_contrib/"
|
||||
documentation = "https://api.rocket.rs/v0.5/rocket_contrib/"
|
||||
homepage = "https://rocket.rs"
|
||||
repository = "https://github.com/SergioBenitez/Rocket"
|
||||
readme = "../../README.md"
|
||||
|
@ -41,8 +41,8 @@ memcache_pool = ["databases", "memcache", "r2d2-memcache"]
|
|||
|
||||
[dependencies]
|
||||
# Global dependencies.
|
||||
rocket_contrib_codegen = { version = "0.4.0", path = "../codegen", optional = true }
|
||||
rocket = { version = "0.4.0", path = "../../core/lib/", default-features = false }
|
||||
rocket_contrib_codegen = { version = "0.5.0-dev", path = "../codegen", optional = true }
|
||||
rocket = { version = "0.5.0-dev", path = "../../core/lib/", default-features = false }
|
||||
log = "0.4"
|
||||
|
||||
# Serialization and templating dependencies.
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
//!
|
||||
//! ```toml
|
||||
//! [dependencies.rocket_contrib]
|
||||
//! version = "0.4.0"
|
||||
//! version = "0.5.0-dev"
|
||||
//! default-features = false
|
||||
//! features = ["compression"]
|
||||
//! ```
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
//!
|
||||
//! ```toml
|
||||
//! [dependencies.rocket_contrib]
|
||||
//! version = "0.4.0"
|
||||
//! version = "0.5.0-dev"
|
||||
//! default-features = false
|
||||
//! features = ["diesel_sqlite_pool"]
|
||||
//! ```
|
||||
|
@ -174,7 +174,7 @@
|
|||
//! Lastly, databases can be configured via environment variables by specifying
|
||||
//! the `databases` table as detailed in the [Environment Variables
|
||||
//! configuration
|
||||
//! guide](https://rocket.rs/v0.4/guide/configuration/#environment-variables):
|
||||
//! guide](https://rocket.rs/v0.5/guide/configuration/#environment-variables):
|
||||
//!
|
||||
//! ```bash
|
||||
//! ROCKET_DATABASES='{my_db={url="db.sqlite"}}'
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
//! takes some inspiration from [helmetjs], a similar piece of middleware for
|
||||
//! [express].
|
||||
//!
|
||||
//! [fairing]: https://rocket.rs/v0.4/guide/fairings/
|
||||
//! [fairing]: https://rocket.rs/v0.5/guide/fairings/
|
||||
//! [helmetjs]: https://helmetjs.github.io/
|
||||
//! [express]: https://expressjs.com
|
||||
//! [`SpaceHelmet`]: helmet::SpaceHelmet
|
||||
|
@ -16,7 +16,7 @@
|
|||
//!
|
||||
//! ```toml
|
||||
//! [dependencies.rocket_contrib]
|
||||
//! version = "0.4.0"
|
||||
//! version = "0.5.0-dev"
|
||||
//! default-features = false
|
||||
//! features = ["helmet"]
|
||||
//! ```
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
//!
|
||||
//! ```toml
|
||||
//! [dependencies.rocket_contrib]
|
||||
//! version = "0.4.0"
|
||||
//! version = "0.5.0-dev"
|
||||
//! default-features = false
|
||||
//! features = ["json"]
|
||||
//! ```
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
#![feature(never_type)]
|
||||
#![feature(doc_cfg)]
|
||||
|
||||
#![doc(html_root_url = "https://api.rocket.rs/v0.4")]
|
||||
#![doc(html_favicon_url = "https://rocket.rs/v0.4/images/favicon.ico")]
|
||||
#![doc(html_logo_url = "https://rocket.rs/v0.4/images/logo-boxed.png")]
|
||||
#![doc(html_root_url = "https://api.rocket.rs/v0.5")]
|
||||
#![doc(html_favicon_url = "https://rocket.rs/v0.5/images/favicon.ico")]
|
||||
#![doc(html_logo_url = "https://rocket.rs/v0.5/images/logo-boxed.png")]
|
||||
|
||||
//! This crate contains officially sanctioned contributor libraries that provide
|
||||
//! functionality commonly used by Rocket applications.
|
||||
|
@ -34,7 +34,7 @@
|
|||
//!
|
||||
//! ```toml
|
||||
//! [dependencies.rocket_contrib]
|
||||
//! version = "0.4.0"
|
||||
//! version = "0.5.0-dev"
|
||||
//! default-features = false
|
||||
//! features = ["json"]
|
||||
//! ```
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
//!
|
||||
//! ```toml
|
||||
//! [dependencies.rocket_contrib]
|
||||
//! version = "0.4.0"
|
||||
//! version = "0.5.0-dev"
|
||||
//! default-features = false
|
||||
//! features = ["msgpack"]
|
||||
//! ```
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
//!
|
||||
//! ```toml
|
||||
//! [dependencies.rocket_contrib]
|
||||
//! version = "0.4.0"
|
||||
//! version = "0.5.0-dev"
|
||||
//! default-features = false
|
||||
//! features = ["serve"]
|
||||
//! ```
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
//!
|
||||
//! ```toml
|
||||
//! [dependencies.rocket_contrib]
|
||||
//! version = "0.4.0"
|
||||
//! version = "0.5.0-dev"
|
||||
//! default-features = false
|
||||
//! features = ["handlebars_templates", "tera_templates"]
|
||||
//! ```
|
||||
|
@ -57,7 +57,7 @@
|
|||
//! template directory is configured via the `template_dir` configuration
|
||||
//! parameter and defaults to `templates/`. The path set in `template_dir` is
|
||||
//! relative to the Rocket configuration file. See the [configuration
|
||||
//! chapter](https://rocket.rs/v0.4/guide/configuration/#extras) of the guide
|
||||
//! chapter](https://rocket.rs/v0.5/guide/configuration/#extras) of the guide
|
||||
//! for more information on configuration.
|
||||
//!
|
||||
//! The corresponding templating engine used for a given template is based on a
|
||||
|
@ -158,7 +158,7 @@ const DEFAULT_TEMPLATE_DIR: &str = "templates";
|
|||
///
|
||||
/// ```toml
|
||||
/// [dependencies.rocket_contrib]
|
||||
/// version = "0.4.0"
|
||||
/// version = "0.5.0-dev"
|
||||
/// default-features = false
|
||||
/// features = ["handlebars_templates", "tera_templates"]
|
||||
/// ```
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
//!
|
||||
//! ```toml
|
||||
//! [dependencies.rocket_contrib]
|
||||
//! version = "0.4.0"
|
||||
//! version = "0.5.0-dev"
|
||||
//! default-features = false
|
||||
//! features = ["uuid"]
|
||||
//! ```
|
||||
|
@ -34,7 +34,7 @@ pub use self::uuid_crate::parser::ParseError;
|
|||
///
|
||||
/// ```toml
|
||||
/// [dependencies.rocket_contrib]
|
||||
/// version = "0.4.0"
|
||||
/// version = "0.5.0-dev"
|
||||
/// default-features = false
|
||||
/// features = ["uuid"]
|
||||
/// ```
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
[package]
|
||||
name = "rocket_codegen"
|
||||
version = "0.4.0"
|
||||
version = "0.5.0-dev"
|
||||
authors = ["Sergio Benitez <sb@sergio.bz>"]
|
||||
description = "Procedural macros for the Rocket web framework."
|
||||
documentation = "https://api.rocket.rs/v0.4/rocket_codegen/"
|
||||
documentation = "https://api.rocket.rs/v0.5/rocket_codegen/"
|
||||
homepage = "https://rocket.rs"
|
||||
repository = "https://github.com/SergioBenitez/Rocket"
|
||||
readme = "../../README.md"
|
||||
|
@ -17,7 +17,7 @@ proc-macro = true
|
|||
[dependencies]
|
||||
indexmap = "1.0"
|
||||
quote = "0.6.1"
|
||||
rocket_http = { version = "0.4.0", path = "../http/" }
|
||||
rocket_http = { version = "0.5.0-dev", 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", path = "../lib" }
|
||||
rocket = { version = "0.5.0-dev", path = "../lib" }
|
||||
compiletest_rs = { version = "0.3", features = ["stable"] }
|
||||
|
|
|
@ -33,7 +33,7 @@ fn main() {
|
|||
print_version_err(&*version, &*date);
|
||||
eprintln!("{}{}{}",
|
||||
Blue.paint("See the getting started guide ("),
|
||||
"https://rocket.rs/v0.4/guide/getting-started/",
|
||||
"https://rocket.rs/v0.5/guide/getting-started/",
|
||||
Blue.paint(") for more information."));
|
||||
panic!("Aborting compilation due to incompatible compiler.")
|
||||
}
|
||||
|
|
|
@ -2,16 +2,16 @@
|
|||
#![feature(crate_visibility_modifier)]
|
||||
#![recursion_limit="128"]
|
||||
|
||||
#![doc(html_root_url = "https://api.rocket.rs/v0.4")]
|
||||
#![doc(html_favicon_url = "https://rocket.rs/v0.4/images/favicon.ico")]
|
||||
#![doc(html_logo_url = "https://rocket.rs/v0.4/images/logo-boxed.png")]
|
||||
#![doc(html_root_url = "https://api.rocket.rs/v0.5")]
|
||||
#![doc(html_favicon_url = "https://rocket.rs/v0.5/images/favicon.ico")]
|
||||
#![doc(html_logo_url = "https://rocket.rs/v0.5/images/logo-boxed.png")]
|
||||
|
||||
//! # Rocket - Code Generation
|
||||
//!
|
||||
//! This crate implements the code generation portions of Rocket. This includes
|
||||
//! custom derives, custom attributes, and procedural macros. The documentation
|
||||
//! here is purely technical. The code generation facilities are documented
|
||||
//! thoroughly in the [Rocket programming guide](https://rocket.rs/v0.4/guide).
|
||||
//! thoroughly in the [Rocket programming guide](https://rocket.rs/v0.5/guide).
|
||||
//!
|
||||
//! # Usage
|
||||
//!
|
||||
|
@ -21,7 +21,7 @@
|
|||
//!
|
||||
//! ```toml
|
||||
//! [dependencies]
|
||||
//! rocket = "0.4.0"
|
||||
//! rocket = "0.5.0-dev"
|
||||
//! ```
|
||||
//!
|
||||
//! And to import all macros, attributes, and derives via `#[macro_use]` in the
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
[package]
|
||||
name = "rocket_http"
|
||||
version = "0.4.0"
|
||||
version = "0.5.0-dev"
|
||||
authors = ["Sergio Benitez <sb@sergio.bz>"]
|
||||
description = """
|
||||
Types, traits, and parsers for HTTP requests, responses, and headers.
|
||||
"""
|
||||
documentation = "https://api.rocket.rs/v0.4/rocket_http/"
|
||||
documentation = "https://api.rocket.rs/v0.5/rocket_http/"
|
||||
homepage = "https://rocket.rs"
|
||||
repository = "https://github.com/SergioBenitez/Rocket"
|
||||
readme = "../../README.md"
|
||||
|
@ -36,4 +36,4 @@ features = ["server"]
|
|||
optional = true
|
||||
|
||||
[dev-dependencies]
|
||||
rocket = { version = "0.4.0", path = "../lib" }
|
||||
rocket = { version = "0.5.0-dev", path = "../lib" }
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
[package]
|
||||
name = "rocket"
|
||||
version = "0.4.0"
|
||||
version = "0.5.0-dev"
|
||||
authors = ["Sergio Benitez <sb@sergio.bz>"]
|
||||
description = """
|
||||
Web framework for nightly with a focus on ease-of-use, expressibility, and speed.
|
||||
"""
|
||||
documentation = "https://api.rocket.rs/v0.4/rocket/"
|
||||
documentation = "https://api.rocket.rs/v0.5/rocket/"
|
||||
homepage = "https://rocket.rs"
|
||||
repository = "https://github.com/SergioBenitez/Rocket"
|
||||
readme = "../../README.md"
|
||||
|
@ -23,8 +23,8 @@ tls = ["rocket_http/tls"]
|
|||
private-cookies = ["rocket_http/private-cookies"]
|
||||
|
||||
[dependencies]
|
||||
rocket_codegen = { version = "0.4.0", path = "../codegen" }
|
||||
rocket_http = { version = "0.4.0", path = "../http" }
|
||||
rocket_codegen = { version = "0.5.0-dev", path = "../codegen" }
|
||||
rocket_http = { version = "0.5.0-dev", path = "../http" }
|
||||
yansi = "0.5"
|
||||
log = "0.4"
|
||||
toml = "0.4.7"
|
||||
|
|
|
@ -33,7 +33,7 @@ fn main() {
|
|||
print_version_err(&*version, &*date);
|
||||
eprintln!("{}{}{}",
|
||||
Blue.paint("See the getting started guide ("),
|
||||
"https://rocket.rs/v0.4/guide/getting-started/",
|
||||
"https://rocket.rs/v0.5/guide/getting-started/",
|
||||
Blue.paint(") for more information."));
|
||||
panic!("Aborting compilation due to incompatible compiler.")
|
||||
}
|
||||
|
|
|
@ -320,7 +320,7 @@ pub use self::info_kind::{Info, Kind};
|
|||
/// }
|
||||
/// ```
|
||||
///
|
||||
/// [request-local state]: https://rocket.rs/v0.4/guide/state/#request-local-state
|
||||
/// [request-local state]: https://rocket.rs/v0.5/guide/state/#request-local-state
|
||||
|
||||
pub trait Fairing: Send + Sync + 'static {
|
||||
/// Returns an [`Info`] structure containing the `name` and [`Kind`] of this
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
|
||||
#![recursion_limit="256"]
|
||||
|
||||
#![doc(html_root_url = "https://api.rocket.rs/v0.4")]
|
||||
#![doc(html_favicon_url = "https://rocket.rs/v0.4/images/favicon.ico")]
|
||||
#![doc(html_logo_url = "https://rocket.rs/v0.4/images/logo-boxed.png")]
|
||||
#![doc(html_root_url = "https://api.rocket.rs/v0.5")]
|
||||
#![doc(html_favicon_url = "https://rocket.rs/v0.5/images/favicon.ico")]
|
||||
#![doc(html_logo_url = "https://rocket.rs/v0.5/images/logo-boxed.png")]
|
||||
|
||||
//! # Rocket - Core API Documentation
|
||||
//!
|
||||
|
@ -26,10 +26,10 @@
|
|||
//! automatic JSON (de)serialiazation, templating support, static file serving,
|
||||
//! and other useful features.
|
||||
//!
|
||||
//! [overview]: https://rocket.rs/v0.4/overview
|
||||
//! [full, detailed guide]: https://rocket.rs/v0.4/guide
|
||||
//! [quickstart]: https://rocket.rs/v0.4/guide/quickstart
|
||||
//! [getting started]: https://rocket.rs/v0.4/guide/getting-started
|
||||
//! [overview]: https://rocket.rs/v0.5/overview
|
||||
//! [full, detailed guide]: https://rocket.rs/v0.5/guide
|
||||
//! [quickstart]: https://rocket.rs/v0.5/guide/quickstart
|
||||
//! [getting started]: https://rocket.rs/v0.5/guide/getting-started
|
||||
//!
|
||||
//! ## Libraries
|
||||
//!
|
||||
|
@ -45,7 +45,7 @@
|
|||
//!
|
||||
//! ```toml
|
||||
//! [dependencies]
|
||||
//! rocket = "0.4.0"
|
||||
//! rocket = "0.5.0-dev"
|
||||
//! ```
|
||||
//!
|
||||
//! Then, add the following to the top of your `main.rs` file:
|
||||
|
@ -58,7 +58,7 @@
|
|||
//! # fn main() { rocket::ignite().mount("/", routes![hello]); }
|
||||
//! ```
|
||||
//!
|
||||
//! See the [guide](https://rocket.rs/v0.4/guide) for more information on how to
|
||||
//! See the [guide](https://rocket.rs/v0.5/guide) for more information on how to
|
||||
//! write Rocket applications. Here's a simple example to get you started:
|
||||
//!
|
||||
//! ```rust
|
||||
|
@ -85,7 +85,7 @@
|
|||
//! configure Rocket, see the [configuration section] of the guide as well as
|
||||
//! the [`config`] module documentation.
|
||||
//!
|
||||
//! [configuration section]: https://rocket.rs/v0.4/guide/configuration/
|
||||
//! [configuration section]: https://rocket.rs/v0.5/guide/configuration/
|
||||
//!
|
||||
//! ## Testing
|
||||
//!
|
||||
|
@ -94,7 +94,7 @@
|
|||
//! documentation and the [testing chapter of the guide] include detailed
|
||||
//! examples.
|
||||
//!
|
||||
//! [testing chapter of the guide]: https://rocket.rs/v0.4/guide/testing/#testing
|
||||
//! [testing chapter of the guide]: https://rocket.rs/v0.5/guide/testing/#testing
|
||||
|
||||
#[allow(unused_imports)] #[macro_use] extern crate rocket_codegen;
|
||||
#[doc(hidden)] pub use rocket_codegen::*;
|
||||
|
|
|
@ -342,7 +342,7 @@ impl<S, E> IntoOutcome<S, (Status, E), ()> for Result<S, E> {
|
|||
/// Notice that these request guards provide access to *borrowed* data (`&'a
|
||||
/// User` and `Admin<'a>`) as the data is now owned by the request's cache.
|
||||
///
|
||||
/// [request-local state]: https://rocket.rs/v0.4/guide/state/#request-local-state
|
||||
/// [request-local state]: https://rocket.rs/v0.5/guide/state/#request-local-state
|
||||
|
||||
pub trait FromRequest<'a, 'r>: Sized {
|
||||
/// The associated error to be returned if derivation fails.
|
||||
|
|
|
@ -25,8 +25,8 @@ function major() {
|
|||
|
||||
function do_replace() {
|
||||
find "${PROJECT_ROOT}" -name "*.rs" | xargs sed -i.bak "s/${1}/${2}/g"
|
||||
find "${PROJECT_ROOT}" -name "*.toml" | xargs sed -i.bak "s/${1}/${2}/g"
|
||||
find "${SITE_ROOT}" -name "*.md" | xargs sed -i.bak "s/${1}/${2}/g"
|
||||
find "${PROJECT_ROOT}" -name "*.toml" -not -path "*/news/*" | xargs sed -i.bak "s/${1}/${2}/g"
|
||||
find "${SITE_ROOT}" -name "*.md" -not -path "*/news/*" | xargs sed -i.bak "s/${1}/${2}/g"
|
||||
sed -i.bak "s/${1}/${2}/g" "${SCRIPT_DIR}/config.sh"
|
||||
sed -i.bak "s/${1}/${2}/g" "${PROJECT_ROOT}/README.md"
|
||||
}
|
||||
|
|
|
@ -24,9 +24,9 @@ function relative() {
|
|||
}
|
||||
|
||||
# Full and major version of Rocket
|
||||
ROCKET_VERSION="0.4.0"
|
||||
ROCKET_MAJOR_VERSION="0.4"
|
||||
CURRENT_RELEASE=true
|
||||
ROCKET_VERSION="0.5.0-dev"
|
||||
ROCKET_MAJOR_VERSION=$(echo "${ROCKET_VERSION}" | cut -d'.' -f1-2)
|
||||
CURRENT_RELEASE=false
|
||||
|
||||
# Root of workspace-like directories.
|
||||
PROJECT_ROOT=$(relative "") || exit $?
|
||||
|
@ -54,6 +54,9 @@ ALL_PROJECT_DIRS=(
|
|||
)
|
||||
|
||||
if [ "${1}" = "-p" ]; then
|
||||
echo "ROCKET_VERSION: ${ROCKET_VERSION}"
|
||||
echo "ROCKET_MAJOR_VERSION: ${ROCKET_MAJOR_VERSION}"
|
||||
echo "CURRENT_RELEASE: ${CURRENT_RELEASE}"
|
||||
echo "SCRIPT_DIR: ${SCRIPT_DIR}"
|
||||
echo "PROJECT_ROOT: ${PROJECT_ROOT}"
|
||||
echo "CORE_ROOT: ${CORE_ROOT}"
|
||||
|
|
|
@ -13,7 +13,7 @@ This directory contains the following:
|
|||
* `news/*.md` - News articles linked to from `news/index.toml`.
|
||||
* `guide/*.md` - Guide pages linked to from `guide.md`.
|
||||
|
||||
[Rocket Programming Guide]: https://rocket.rs/v0.4/guide/
|
||||
[Rocket Programming Guide]: https://rocket.rs/v0.5/guide/
|
||||
|
||||
### Guide Links
|
||||
|
||||
|
|
|
@ -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
|
||||
git checkout v0.5.0-dev
|
||||
cd examples/hello_world
|
||||
cargo run
|
||||
```
|
||||
|
|
|
@ -43,7 +43,7 @@ Then add the usual Rocket dependencies to the `Cargo.toml` file:
|
|||
|
||||
```toml
|
||||
[dependencies]
|
||||
rocket = "0.4.0"
|
||||
rocket = "0.5.0-dev"
|
||||
```
|
||||
|
||||
And finally, create a skeleton Rocket application to work off of in
|
||||
|
|
|
@ -50,7 +50,7 @@ Now, add Rocket as a dependency in your `Cargo.toml`:
|
|||
|
||||
```
|
||||
[dependencies]
|
||||
rocket = "0.4.0"
|
||||
rocket = "0.5.0-dev"
|
||||
```
|
||||
|
||||
Modify `src/main.rs` so that it contains the code for the Rocket `Hello, world!`
|
||||
|
|
|
@ -560,7 +560,7 @@ so that you depend on `rocket` as follows:
|
|||
|
||||
```toml
|
||||
[dependencies]
|
||||
rocket = { version = "0.4.0", default-features = false }
|
||||
rocket = { version = "0.5.0-dev", default-features = false }
|
||||
```
|
||||
|
||||
[`ring`]: https://github.com/briansmith/ring
|
||||
|
|
|
@ -104,7 +104,7 @@ generated by `Status` for these and other codes:
|
|||
| 100, [200, 205] | Empty with given status. |
|
||||
| All others. | Invalid. Errors to `500` catcher. |
|
||||
|
||||
[`Status`]: https://api.rocket.rs/v0.4/rocket/http/struct.Status.html
|
||||
[`Status`]: https://api.rocket.rs/v0.5/rocket/http/struct.Status.html
|
||||
|
||||
## Custom Responders
|
||||
|
||||
|
|
|
@ -221,7 +221,7 @@ databases, you'd write in `Cargo.toml`:
|
|||
|
||||
```toml
|
||||
[dependencies.rocket_contrib]
|
||||
version = "0.4.0"
|
||||
version = "0.5.0-dev"
|
||||
default-features = false
|
||||
features = ["diesel_sqlite_pool"]
|
||||
```
|
||||
|
|
|
@ -279,7 +279,7 @@ dependency in your `Cargo.toml` file:
|
|||
|
||||
```
|
||||
[dependencies]
|
||||
rocket = { version = "0.4.0", features = ["tls"] }
|
||||
rocket = { version = "0.5.0-dev", features = ["tls"] }
|
||||
```
|
||||
|
||||
TLS is configured through the `tls` configuration parameter. The value of `tls`
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
Welcome to Rocket!
|
||||
|
||||
This is the official guide for Rocket v0.4. It is designed to serve as a
|
||||
This is the official guide for Rocket v0.5. It is designed to serve as a
|
||||
starting point to writing web applications with Rocket and Rust. The guide is
|
||||
also designed to be a reference for experienced Rocket developers. This guide is
|
||||
conversational in tone. For purely technical documentation with examples, see
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
###############################################################################
|
||||
|
||||
[release]
|
||||
version = "0.4.0"
|
||||
date = "Dec 06, 2018"
|
||||
version = "0.5.0-dev"
|
||||
date = "May 13, 2019"
|
||||
|
||||
###############################################################################
|
||||
# Top features: displayed in the header under the introductory text.
|
||||
|
|
Loading…
Reference in New Issue