Commit Graph

856 Commits

Author SHA1 Message Date
Sergio Benitez da9bf1189f Add variant checker methods to 'StatusClass'. 2017-07-04 01:33:52 -07:00
Sergio Benitez 1e7bf33e0a Update CHANGELOG for 'State' changes. 2017-07-03 15:51:09 -07:00
Sergio Benitez 15c2ef7aaa Derive 'PartialOrd', 'Ord', and 'Hash' for 'State'. 2017-07-03 15:39:24 -07:00
Sergio Benitez 8eb1fff93f Silence incorrect unmanaged state warnings. 2017-07-03 15:37:24 -07:00
Sergio Benitez a94dc9a270 Document 'IntoOutcome'. 2017-07-03 15:29:12 -07:00
Sergio Benitez 00df2846d7 Improve 'State' docs. 2017-07-03 15:13:21 -07:00
Sergio Benitez 9dd83a9c39 Use 'eprintln' instead of custom 'printerr'. 2017-07-03 02:59:47 -07:00
Sergio Benitez 0fa2c459d9 Remove 'more_io_inner_methods' feature: it's been stabilized. 2017-07-03 02:39:32 -07:00
Sergio Benitez 77c51ff43f Use the '!' type for 'str::FromForm::Error'. 2017-07-03 02:25:02 -07:00
Sergio Benitez aec2d9ea30 Finished draft of requests guide for 0.3. 2017-07-03 02:21:03 -07:00
Sergio Benitez 82a2d2f44e Implement 'FromForm' for 'Option' and 'Result'. 2017-07-03 02:13:35 -07:00
Sergio Benitez 02f466fa17 Inline 'Method::supports_payload()'. 2017-07-03 01:38:14 -07:00
Sergio Benitez 6781c329ea Reworking of first few chapters of guide for 0.3. 2017-07-02 22:52:07 -07:00
Sergio Benitez a6d03b1e2f Small code improvements in guide. 2017-07-02 01:37:50 -07:00
Lori Holden a6e01f97c1 Initial guide updates for 0.3. 2017-07-02 01:36:13 -07:00
Sergio Benitez 4409a903e3 Preliminary 0.3.0 CHANGELOG. 2017-07-01 21:02:25 -07:00
Sergio Benitez 4d586c5006 Checkout the current tag in quickstart guide. 2017-06-30 18:36:59 -07:00
Sergio Benitez 1f367af704 Fix broken link to 'LaunchError' in 'Rocket' docs. 2017-06-30 13:50:36 -07:00
Sergio Benitez beb5ca14cf Improve 'Route' documentation. 2017-06-30 13:17:40 -07:00
Sergio Benitez b0612d7346 Enable features on docs.rs. 2017-06-30 02:41:00 -07:00
Sergio Benitez 3310c19960 Add examples for 'Data' methods. 2017-06-30 02:18:56 -07:00
Sergio Benitez 0a772286a9 Fully document the 'local' module. 2017-06-30 02:06:03 -07:00
Sergio Benitez 06ad52157d Use Into<Value> from 'toml' instead of 'IntoValue'. 2017-06-29 14:04:54 -07:00
Sergio Benitez ef4c2fd989 Fix 'Accept' PartialEq impl. Finish 'Request' docs. 2017-06-24 21:00:50 -07:00
Sergio Benitez dfbd3265f3 Improve fairing and request/data guard docs. 2017-06-24 18:43:10 -07:00
Sergio Benitez 150aef7764 Impl 'try' for 'Outcome'. Document 'Cookies'.
The 'try' impl for 'Outcome' allows the '?' operator to be used with
'Outcome' values. This is likely to make 'FromRequest' and 'FromData'
implementations more ergonomic.

This commit also expands the 'IntoOutcome' trait. It is now
implemented for 'Option'. It also now includes an additional
'or_forward' method.
2017-06-24 02:49:31 -07:00
Sergio Benitez 0376fb5fe5 Rename 'WeightedMediaType' to 'QMediaType'. More docs.
This commit nears completion of the 'http' module docs.
2017-06-22 04:29:59 -07:00
Sergio Benitez 3c4cb27d55 Upgrade 'state' to 0.3 to prevent memory leaks.
Fixes #323.
2017-06-20 16:46:07 -07:00
Sergio Benitez 3f87b16d75 Update minimum nightly to '2017-06-19'. 2017-06-19 22:58:31 -07:00
Sergio Benitez ce363810c5 Disable coloring when output isn't a tty. 2017-06-19 18:29:26 -07:00
Sergio Benitez 539a7fc55b Remove 'struct_field_attributes' feature: it's been stabilized. 2017-06-19 17:44:01 -07:00
Sergio Benitez 6a7fde6d70 Initial cleanup of 'http' docs. Add 'handler::Outcome' docs.
This commit also changes the signature of the 'ContentType'
'from_extension" method so that it returns an 'Option<ContentType>' as
opposed to 'ContentType'.

This commit also disallows negative quality values in 'Accept' media
types.
2017-06-19 17:32:33 -07:00
Sergio Benitez cdf9ff9bde Remove 'LoggingLevel' from root. Add ConfigError::Io.
This tentatively completes the 'config' rustdocs.
2017-06-18 21:06:41 -07:00
Sergio Benitez 43a4028085 Use a less confusing version number during dev. 2017-06-18 02:25:26 -07:00
Vesa Kaihlavirta 3ef14f5392 Fix benchmarks to use 'route.uri' instead of 'route.path'. 2017-06-18 02:07:13 -07:00
Sergio Benitez a3ea9d0f9a Add support for lenient forms via 'LenientForm'.
This commit changes the 'FromForm' trait in two ways:

  1. The singular method is now named 'from_form'.
  2. The method takes a second parameter: 'strict: bool'.

The 'strict' parameter is used to specify whether form parsing should
be strict or not (i.e. lenient). When parsing is lenient, extra form
fields do not result in an error. This lenient behavior is used by a
new 'LenientForm' data guard type to request lenient form parsing. The
behavior for 'Form' remains unchanged.

Resolves #242.
2017-06-18 01:59:22 -07:00
Sergio Benitez 8536e39d10 Update 'cookie' for cookie path deletion fix. 2017-06-17 13:31:24 -07:00
Sergio Benitez 876a8b8329 Make tera/handlebars rendering a little clearer. 2017-06-16 20:56:51 -07:00
Sergio Benitez 2aad1d876b Update ring-based dependencies. 2017-06-16 20:32:20 -07:00
Sergio Benitez 3fcf6c43dc Clean up LaunchError docs. Add Rocket::{config, routes} example.
This commit also:

  * Cleans up the stored URIs in routes.
  * Removes LaunchError as a root export.
  * Adds a URI::base() method.
2017-06-12 15:11:01 -07:00
Sergio Benitez 7cf3367183 Document the `Limits` structure. Change default workers.
The default workers config parameter is now [num_cpus * 2].
2017-06-11 03:39:30 -07:00
Sergio Benitez ea485e52e8 Update diesel and rusqlite example dependencies. 2017-06-11 02:57:41 -07:00
Sergio Benitez 8badc73c4b Update toml to 0.4. Add Config::get_datetime. 2017-06-11 02:20:57 -07:00
Sergio Benitez 2bfb41d968 Update 'handlebars' and 'base64' dependencies. 2017-06-11 01:07:18 -07:00
Sergio Benitez 9a297f776b Tidy up broken links. Set 'html_root_url'. 2017-06-11 01:03:59 -07:00
Sergio Benitez f57d5146d3 Fix link to COMPILER_TESTS in README. 2017-06-09 03:04:41 -07:00
Sergio Benitez d09920c021 Emit warning when no 'secret_key' is set in prod. 2017-06-08 23:33:16 -07:00
Sergio Benitez b8ba7b855f Remove Session in favor of private cookies. New testing API.
Sessions
--------

This commit removes the `Session` type in favor of methods on the
`Cookies` types that allow for adding, removing, and getting private
(signed and encrypted) cookies. These methods provide a superset of
the functionality of `Session` while also being a minimal addition to
the existing API. They can be used to implement the previous `Session`
type as well as other forms of session storage. The new methods are:

  * Cookie::add_private(&mut self, Cookie)
  * Cookie::remove_private(&mut self, Cookie)
  * Cookie::get_private(&self, &str)

Resolves #20

Testing
-------

This commit removes the `rocket::testing` module. It adds the
`rocket::local` module which provides a `Client` type for local
dispatching of requests against a `Rocket` instance. This `local`
package subsumes the previous `testing` package.

Rocket Examples
---------------

The `forms`, `optional_result`, and `hello_alt_methods` examples have
been removed. The following example have been renamed:

  * extended_validation -> form_validation
  * hello_ranks -> ranking
  * from_request -> request_guard
  * hello_tls -> tls

Other Changes
-------------

This commit also includes the following smaller changes:

  * Config::{development, staging, production} constructors have been
    added for easier creation of default `Config` structures.
  * The `Config` type is exported from the root.
  * `Request` implements `Clone` and `Debug`.
  * `Request::new` is no longer exported.
  * A `Response::body_bytes` method was added to easily retrieve a
    response's body as a `Vec<u8>`.
2017-06-08 17:34:50 -07:00
Sergio Benitez 504a7fe583 Update to yansi 0.3 for proper Debug formatting.
This commit also improves the format of TOML parsing error messages.

Fixes #310.
2017-06-06 13:56:13 -07:00
Sergio Benitez 3eeae77ed6 Add tests for 'form_kitchen_sink' example.
Closes #62.
2017-06-02 18:46:34 -07:00