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