Commit Graph

62 Commits

Author SHA1 Message Date
Sergio Benitez
722ee93f8b Update to cookie 0.7. Use 256-bit session_keys.
This commit involves several breaking changes:
  * `session_key` config param must be a 256-bit base64 encoded string.
  * `FromRequest` is implemented for `Cookies`, not `Cookie`.
  * Only a single `Cookies` instance can be retrieved at a time.
  * `Config::take_session_key` returns a `Vec<u8>`.
  * `Into<Header>` is implemented for `&Cookie`, not `Cookie`.
2017-03-07 01:19:06 -08:00
Sergio Benitez
4eaf9ba9c5 Add lints to catch unmanaged state and unmounted routes.
* The `unmanaged_state` lint emits a warning when a `State<T>` request
    guard is used without an accompanying `manage` call for `T`.

  * The `unmounted_route` lint emits a warning when a route declared via
    a Rocket attribute is not mounted via a call to `mount`.

There is one known shortcoming of these lints at present: _any_ call to
`manage` or `mount` marks state/routes as managed/mounted. This can be
an issue when an application uses more than one `Rocket` instance, with
different calls to `mount` and `manage` in each. The lints should
perform their analyses on a per-instance basis.
2017-01-29 01:13:52 -08:00
Sergio Benitez
44e367c64c Remove authorship from all examples. 2017-01-19 17:14:01 -08:00
Sergio Benitez
36bf704673 Fix config example tests for new Config structure. 2017-01-12 02:47:25 -08:00
Sergio Benitez
ddda8fe79b Add workers config parameter. 2017-01-12 02:38:14 -08:00
Sergio Benitez
55a2535896 Clean up config example. 2016-12-28 18:24:54 -06:00
Seth Lopez
e650587159 Add tests for config example. 2016-12-28 18:09:19 -06:00
Sergio Benitez
4f30afc30f Show RDP information when starting AppVeyor build. 2016-12-27 02:04:47 -06:00
Sergio Benitez
1323e7a420 Add config::get(), for global config access. Use it for Template. 2016-10-14 18:57:36 -07:00
Sergio Benitez
4b6c72e33f Use move builder pattern to launch Rocket apps. 2016-10-03 19:48:33 -07:00
Sergio Benitez
d631dfd300 Use ignite in README example. Check ROCKET_ENV without Rocket.toml being present. 2016-10-03 19:21:21 -07:00
Sergio Benitez
17b88d0a6b Implement configuration and environments. 2016-10-03 03:39:56 -07:00