Commit Graph

123 Commits

Author SHA1 Message Date
jeb 00dd691252 Update codegen and related dependencies for latest nightly. 2018-05-29 18:37:14 +02:00
Sergio Benitez 2bb343ad70 Use a specific git revision for pear dependencies. 2018-05-15 23:35:28 -07:00
Sergio Benitez 6a31cb5f5a Freeze managed state before launch. 2018-04-28 18:23:01 -07:00
Sergio Benitez eda635aaeb Add automatic cookie propogation to 'local::Client'. 2018-04-14 19:41:37 -07:00
Sergio Benitez efc511c6dc Add a 'FromFormValue' derive. Start 'codegen_next' crate.
The 'codegen_next' crate will eventually be renamed 'codegen'. It
contains procedural macros written with the upcoming 'proc_macro' APIs,
which will eventually be stabilized. All compiler extensions in the
present 'codegen' crate will be rewritten as procedural macros and moved
to the 'codegen_next' crate.

At present, macros from 'codegen_next' are exported from the core
`rocket` crate automatically. In the future, we may wish to feature-gate
this export to allow using Rocket's core without codegen.

Resolves #16.
2018-04-12 16:07:37 -07:00
Sergio Benitez bae3140adf Improve robustness of environment variable TOML parser.
Fixes #598.
2018-04-05 01:14:56 -07:00
Sergio Benitez e0bf21f288 Update pear dependency. 2018-04-03 21:53:25 -07:00
messense b0fc8b31f6 Update 'indexmap' to 1.0. 2018-03-22 04:03:54 -05:00
Sergio Benitez c3b6c542e8 Update from 'ordermap' to 'indexmap' 0.4. 2018-02-25 20:32:10 -08:00
Sergio Benitez 63ebe7d06a Update yansi and pear dependencies. 2018-02-21 00:37:31 -08:00
Sergio Benitez 3a8d0e8a9a Dynamically increase/decrease log level at launch.
This commit modifies the internal logger so that launch messages are
emitted with the proper "info" level. The approach is to temporarily
weaken the log level to "normal" during launch and reset it to the
user's setting after launching.

This commit also upgrades to 'log' 0.4.

Fixes #553.
2018-01-29 13:16:04 -08:00
Sergio Benitez 944aa79a8f Update 'state' to 0.4. 2018-01-23 18:53:30 -08:00
Sergio Benitez 69abd4fc83 Update dependencies for 'ring' '0.13.0-alpha'.
Closes #533.
2018-01-13 10:51:33 -08:00
Sergio Benitez 0f9828d095 Pin 'hyper-sync-rustls' version. 2018-01-13 10:05:30 -08:00
Sergio Benitez a583137d96 Update 'state' to '0.3.3' for 'Storage.clone()' fix.
Fixes #505.
2018-01-05 19:36:05 -08:00
Sergio Benitez 65baa83fb4 Update dependencies.
* 'memchr' to 2.0
  * 'base64' to 0.9
  * 'smallvec' to 0.6
  * 'lazy_static' to 1.0

Update example dependencies.

  * 'rand' to 0.4
  * 'parking_lot' to 0.5
2018-01-05 02:00:26 -08:00
Sergio Benitez 1b77376162 Bump 'cookie' dependency for 'SameSite' changes. 2018-01-04 23:47:28 -08:00
Stanislav Ivanov 70413b155f Add 'LocalRequest::private_cookie()'.
Resolves #368.
2017-12-29 09:16:08 -08:00
Sergio Benitez a9c66c9426 Update codegen and pear_codegen for 2017-12-17 nightly. 2017-12-18 06:50:27 -08:00
Sergio Benitez 07d4d23cc8 Update dependencies. 2017-10-09 20:15:18 -07:00
Sergio Benitez a90d625abe Set safer defaults for private cookies. 2017-10-05 21:58:27 -07:00
Sergio Benitez 3bf577db6e Handle segments parameters in 'uri!'.
This commit also moves the 'uri' module into its own directory,
includes the beginning of the 'FromUriParam' trait, and abandons the
'url' crate in favor of 'percent_encoding' for percent encoding.
2017-09-14 22:13:07 -07:00
Sergio Benitez 2f84d4b18a Add 'Config::root_relative()'. Make TLS config paths root-relative.
Prior to this commit, relative paths to TLS PEM files were incorrectly
treated as being relative to the CWD as opposed to the Rocket config
file, when present. This commit resolves the issue.
2017-09-04 19:01:26 -07:00
Sergio Benitez 237370533c Update cert in 'tls' example for new 'rustls'.
The latest version of `rustls` acts on the SNI extension to TLS without
the apparent ability to disable the behavior. `rustls` requires that the
server's certificate match the client's requested server. The matching
is done by looking at DNS names in the `subjectAltName` extension and
checking if the requested server name is present. Since the certificate
in the `tls` example did not have the `subjectAltName` extension, this
check always failed, and the TLS connection was aborted. This commit
adds the extension to the certificate with a DNS name of `localhost`,
ensuring that TLS succeeds on `localhost`.
2017-09-01 03:16:36 -07:00
Sergio Benitez 7ce250b82f Update dependencies for ring 0.12. 2017-08-31 16:58:24 -07:00
Sergio Benitez 6f180d9d7c Require 'yansi' 0.3.3. 2017-08-11 10:09:23 -07:00
Sergio Benitez 3f6c6fd576 Move to 0.4.0-dev on master. 2017-08-11 09:32:27 -07:00
Sergio Benitez b276e1d51f Enable ASCII escape sequences in Windows consoles. 2017-07-26 22:54:45 -04:00
Sergio Benitez cdacda0896 New version: 0.3.0. 2017-07-14 11:30:48 -07:00
Sergio Benitez 0bbfa5e21a Update 'version_check' to 0.1.3. 2017-07-12 04:15:30 -07:00
Sergio Benitez 85846c2af1 Use 'hyper_sync_rustls' for hyper/rustls interop. 2017-07-12 04:13:46 -07:00
Sergio Benitez 4609413828 Update 'pear' and 'pear_codegen' to 0.0.10. 2017-07-12 04:07:55 -07:00
Sergio Benitez 6050eb5169 Update for 2017-07-09. 'associated_consts' is stable. 2017-07-09 22:00:01 -07:00
Sergio Benitez b0612d7346 Enable features on docs.rs. 2017-06-30 02:41:00 -07:00
Sergio Benitez 06ad52157d Use Into<Value> from 'toml' instead of 'IntoValue'. 2017-06-29 14:04:54 -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 ce363810c5 Disable coloring when output isn't a tty. 2017-06-19 18:29:26 -07:00
Sergio Benitez 43a4028085 Use a less confusing version number during dev. 2017-06-18 02:25:26 -07:00
Sergio Benitez 8536e39d10 Update 'cookie' for cookie path deletion fix. 2017-06-17 13:31:24 -07:00
Sergio Benitez 2aad1d876b Update ring-based dependencies. 2017-06-16 20:32:20 -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 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 fa31b6ae42 Support the 'dev' channel during build.
Resolves #306.
2017-06-02 17:41:15 -07:00
Sergio Benitez a6c4d053ad Switch to 'yansi' for all terminal coloring.
Resolves #299.
2017-06-01 22:10:05 -07:00
Sergio Benitez 73fed03ef4 New version: 0.2.8. 2017-06-01 22:10:05 -07:00
Sergio Benitez e42fe78e41 Update 'smallvec' dependency to 0.4. 2017-05-31 17:28:12 -07:00
Sergio Benitez 5f2b2ee3df New version: 0.2.7. 2017-05-26 20:37:54 -07:00
Sergio Benitez 6a5d8ab58a Update rustls and hyper-rustls dependencies. 2017-05-24 16:02:16 -07:00