Commit Graph

165 Commits

Author SHA1 Message Date
mikejiang f0836e22fa Add tests for static_files example. 2017-02-24 18:54:13 -08:00
mikejiang 7e7c31b9e7 Add tests for extended_validation example. 2017-02-17 23:35:29 -08:00
Josh Holmer 937fe50ad7 Fix typo in json example. 2017-02-16 19:09:16 -08:00
Sergio Benitez 0acfea9c71 Remove unnecessary pub qualifier in forms example. 2017-02-16 18:30:44 -08:00
Crazy-Owl 3e063af965 Use managed state in json example. 2017-02-16 18:11:03 -08:00
Sergio Benitez 53390164cd Remove the unnecessary hidden field in kitchen sink example. 2017-02-03 18:56:05 -08:00
Sergio Benitez a88aa21b60 Commit the missing db.rs file. 2017-02-02 18:15:24 -08:00
Sergio Benitez a15002877d Use connection pool in todo example. 2017-02-02 18:01:00 -08:00
Sergio Benitez 7f9ced7db3 Add raw sqlite example; not in workspace due to sqlite3-sys conflict. 2017-02-02 18:00:30 -08:00
Sergio Benitez 9069f91bea Remove extraneous argument from popd in todo boostrap. 2017-02-02 15:19:23 -08:00
Sergio Benitez b69527c392 Reenable the options decorator. 2017-02-02 15:02:32 -08:00
Sergio Benitez ecc62beeac Update uuid in contrib to 0.4. 2017-02-02 14:51:04 -08:00
Sergio Benitez 1a18c73970 Update to todo example to diesel 0.10. 2017-02-02 14:47:53 -08:00
Sergio Benitez a9c3b8a919 Silence warnings during testing. 2017-02-02 02:16:21 -08:00
Sergio Benitez 7b8d104ae0 Silence cargo and diesel in todo bootstrap. 2017-02-02 01:08:43 -08:00
Sergio Benitez d4eda278a2 Parallelize testing. Fix compiletest dependencies. 2017-02-02 00:41:47 -08:00
Sergio Benitez 4d2f695db0 Add more bad form tests to forms example. 2017-02-01 18:35:54 -08:00
Garrett Squire 11e90f525f Update status code for form processing failure. 2017-02-01 18:29:29 -08:00
Sergio Benitez cc22836867 Precisely route formats. Make 'content_type' an 'Option' in 'Request'.
This commit changes the routing algorithm. In particular, it enforces
precise matching of formats. With this change, a route with a specified
format only matches requests that have the same format specified. A
route with no format specified matches any request's format. This is
contrast to the previous behavior, where a route without a specified
format would match requests regardless of their format or whether one
was specified.

This commit also changes the following:
  * The return type of the 'content_type' method of 'Request' is now
    'Option<ContentType>'.
  * The 'ContentType' request guard forwards when the request has no
    specified ContentType.
  * The 'add_header' and 'replace_header' methods take the header
    argument generically.

Closes #120.
2017-02-01 03:12:24 -08:00
Sergio Benitez 5fabb43a1b Update to serde 0.9, handlebars 0.25. Move from `map!` to `json!` macro.
Resolves #154.
2017-01-31 17:15:42 -08:00
Sergio Benitez 52d627cf44 Use only 'Request' parameter in content_types example catcher. 2017-01-31 02:46:28 -08:00
Sergio Benitez 374593c2f0 Use 'ContentType::Plain' for 'String' responses.
Resolves #49.
2017-01-31 02:43:19 -08:00
Sergio Benitez c1697509ba Improve lints: gather info on per-instance basis. 2017-01-31 02:01:30 -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
Lori Holden f230d43fd5 Add example for the contrib UUID type. 2017-01-26 23:20:05 -08:00
Sergio Benitez 06a7317fd9 Update to Hyper 0.10. Use cookie crate directly.
A few interesting notes on this breakage:

  * `Cookie` how has a lifetime. It should be `'static'` everywhere.
  * The `SetCookie` header is no longer reexported.
  * Instead, `Cookie` implements `Into<Header>` for Set-Cookie.
2017-01-26 23:08:15 -08:00
Sergio Benitez c61e740572 Allow any Serialize type in RHS of map macro. 2017-01-26 11:56:06 -08:00
Sergio Benitez 466b58970e Pin Hyper to 0.9.14 due to non-semver breaking change. 2017-01-26 11:11:43 -08:00
Sergio Benitez c815911705 Introduce Managed State. 2017-01-20 23:17:28 -08:00
Sergio Benitez 44e367c64c Remove authorship from all examples. 2017-01-19 17:14:01 -08:00
Sergio Benitez 725191d3c3 Adjust spacing in handlebars_templates example. 2017-01-13 00:22:16 -08:00
FliegendeWurst 99a17b42ae Add tests for handlebars_templates example. 2017-01-13 00:19:58 -08:00
Seth Lopez dec585dbd4 Add tests for content_types example. 2017-01-13 00:05:58 -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 e2f342a384 Rearrange formatting in cookies test. 2017-01-09 17:23:04 -08:00
Seth Lopez da7026c781 Add tests for cookies example. 2017-01-09 17:21:19 -08:00
Cliff H 83e33cf0be Add tests for redirect example. 2017-01-09 17:17:47 -08:00
Sergio Benitez 44296980fc Remove proc_macro as a feature - it's stabilized! 2017-01-07 20:59:35 -08:00
Robert e4006c56c8 Add tests for hello_alt_methods example. 2017-01-06 01:41:48 -06:00
Reilly Tucker Siemens 5e30262378 Add tests for errors example. 2017-01-06 00:43:20 -06:00
Liigo Zhuang 0af01abe5f Fix decoding of String form values.
@liigo originated a fix and found the problem in #82.
2016-12-31 01:06:22 -06:00
Sergio Benitez 83bbea7d4a Fix decoding of form value Strings. 2016-12-31 00:48:31 -06:00
Seth Lopez 9580d6cdfd Add tests for optional_redirect example. 2016-12-29 12:41:51 -06:00
Matt McCoy 21ddb7390f Add tests for query_params example. 2016-12-28 23:20:21 -06:00
Seth Lopez ab94e344b4 Add tests for optional_result example. 2016-12-28 21:05:15 -06: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 3d0f7f2f80 Clarify todo example requirements. 2016-12-27 02:38:21 -06:00
Sergio Benitez 4f30afc30f Show RDP information when starting AppVeyor build. 2016-12-27 02:04:47 -06:00