Jeb Rosen
59346ccfdc
Update 'postgres' dependency to 0.19.
2021-02-28 15:28:37 -08:00
Jeb Rosen
87f03d3b26
Update UI tests for latest nightly and 'pear' error messages.
2021-02-26 22:15:37 -08:00
Sergio Benitez
73037c6620
Use 'normpath' to fix canonicalization on Windows.
2021-02-22 19:33:50 -08:00
Sergio Benitez
374ad8804c
Fix 'legacy_derive_helpers' warning in todo example.
2021-02-22 19:33:50 -08:00
hpodhaisky
ac9d403242
Fix typo in getting started guide: 'latst' -> 'latest'.
2021-02-20 12:01:45 -08:00
Lucille Blumire
a2fa4296a0
Update guide to reflect the removal of specialization in `impl Responder for Result`.
...
`Result<T, E>` only implements `Responder` if both `T` and `E` implement
`Responder`.
2021-02-20 12:01:44 -08:00
atouchet
0c5e184299
Update various dead hyperlinks; change some links from http to https.
2021-02-20 12:01:44 -08:00
ami-GS
38e4067a58
Fix invalid JSON syntax in doc examples: remove trailing commas.
2021-02-20 12:01:44 -08:00
mixio
46a46df5fe
Fix several typos in the guide.
2021-02-20 12:01:44 -08:00
Jeb Rosen
453fa037da
Update UI tests for latest stable.
2021-02-20 12:01:44 -08:00
Sergio Benitez
8ee581a697
Canonicalize template directory before globbing.
...
This prevents the glob from returning paths that don't include the root
template dir due to resolution of relative paths like `./foo`,
preventing #1541 from reoccurring. Furthermore, this prevents
misconfigured, non-existent template directories from silently passing
through, instead causing an error at init-time.
2021-02-19 12:50:03 -08:00
Sergio Benitez
aaea84d750
Check profile in jail to avoid env races.
2021-02-19 12:49:39 -08:00
Sergio Benitez
e4c2324bab
Update CHANGELOG for 0.4.7.
2021-02-10 16:50:07 -08:00
Sergio Benitez
2a49368313
Update UI tests for latest nightly.
2021-02-09 17:17:44 -08:00
Sergio Benitez
0af25bfb6d
Move derive attribute after derive.
2021-02-09 17:17:26 -08:00
Sergio Benitez
e325e2fce4
Fix soundness issue: make 'Formatter' panic-safe.
...
Fixes #1534 .
2021-02-09 16:58:34 -08:00
Sergio Benitez
c24f15c18f
Add regression test for #1503 .
...
Closes #1503 .
2021-01-14 15:15:57 -08:00
Sergio Benitez
407e346a6a
Clean up 'on_launch_fairing_can_inspect_port' test.
2021-01-13 17:20:44 -08:00
Filip Gospodinov
48fd83a31d
Run launch fairings after effective port is known.
2021-01-13 17:20:33 -08:00
Sergio Benitez
43ade920c5
Warn when deprecated profiles are set.
2021-01-13 16:21:36 -08:00
Sergio Benitez
28976a5bd3
Preserve 'secret_key' in 'Config' provider data.
...
Also fixes emission of 'secret_key' warnings when 'secrets' feature is
disabled.
Resolves #1505 .
Fixes #1510 .
2021-01-13 16:01:39 -08:00
Jeb Rosen
92af8fca72
Update to 'tokio' 1.0, 'hyper' 0.14.
2021-01-13 15:22:16 -08:00
Sergio Benitez
031948c1da
Remove superfluous semicolons.
2021-01-13 14:30:08 -08:00
Jeb Rosen
a0d4a4749a
Update 'memcache' dependency to 0.15.
2021-01-13 14:20:43 -08:00
Brendon Federko
cb33429ce4
Enable 'std' 'indexmap' feature.
2021-01-12 14:52:37 -08:00
Brendon Federko
e68a951a54
Upodate tests for latest stable.
2021-01-12 14:52:34 -08:00
Sergio Benitez
9671115796
Use 'workers' value from 'Config::figment()'.
...
This commit also improves config pretty-printing and warning messages.
It also fixes an issue that resulted in config value deprecation
warnings not being emitted. The 'workers' value is now a 'usize', not a
'u16'; contrib pool sizes now default to 'workers * 2'.
Closes #1470 .
2020-12-24 15:58:48 -08:00
Jeb Rosen
1f1f44f336
Update UI tests for latest stable.
2020-11-21 12:42:57 -08:00
Jeb Rosen
bcb8b3334b
Update CI to use GitHub 'environment files'.
2020-11-18 12:38:24 -08:00
Sergio Benitez
fa77435187
Bust cache on 'Request::{add,replace}_header()'.
...
Also changes 'Header::name()' to return '&UncasedStr'.
Resolves #518 .
2020-11-05 21:03:58 -08:00
Jeb Rosen
c6298b9e11
Use 'spawn_blocking' to drop sync database pools.
...
This was already done for the connections, but pools might also do
synchronous/blocking work on Drop.
Fixes #1466 .
2020-11-05 00:06:41 -08:00
Jeb Rosen
2f98299272
Allow fallible callback in 'Template::try_custom()'.
...
Closes #1064 .
2020-11-04 02:40:53 -08:00
Sergio Benitez
007c4b093f
Use '#[rocket::main]', not '#[main]'.
2020-11-03 14:20:29 -08:00
Sergio Benitez
bb295ae21b
Update console output in guide.
2020-11-03 12:56:20 -08:00
Sergio Benitez
86a6b4b12f
Improve async, mount sections of overview guide.
...
Resolves #1458 .
Closes #1464 .
2020-11-03 12:52:31 -08:00
Sergio Benitez
86ff66a69c
Streamline raw identifier support in codegen.
2020-11-03 12:07:23 -08:00
Jeb Rosen
97f6bc5dc0
Support raw identifiers in forms, routes, uri.
...
Resolves #881 .
2020-11-03 01:42:37 -08:00
Sergio Benitez
b5e4dded8a
Accept browser-sent unencoded query characters.
...
Closes #941 .
Co-authored-by: Vladimir Ignatev <ya.na.pochte@gmail.com>
2020-11-02 15:08:33 -08:00
Sergio Benitez
949bb01e2d
Generate path encoding set using 'const fn'.
...
Co-authored-by: Jakub Wieczorek <jakub.adam.wieczorek@gmail.com>
2020-11-01 21:26:31 -08:00
Sergio Benitez
337e8843a4
Use 'Option', 'Result' directly in 'uri!' query.
...
Prior to this commit, the conversion 'T -> Option<T>' was applied in
both the path and query parts of a URI in the 'uri' macro via the
'FromUriParam' trait with no implementation for 'Option<T>' directly.
This meant that it was impossible to directly render an 'Option<T>'.
This was exactly desired for the path part, where rendering a 'None'
would yield an incorrect URI, but the restriction was too strict for the
query part, where a 'None' is entirely valid. This commit makes changes
the conversion so that it only applied to path parts and adds the
identity conversions for 'Option<T>' and 'Result<T, E>' for query parts.
The side effect is a breaking change: due to conflicting impls, the 'T'
to 'Option<T>' conversion was removed for query parts. Thus, all 'uri!'
query route arguments of type 'Option' or 'Result' must now be wrapped
in 'Some' or 'Ok'. Due to new 'Option<T> <-> Result<T, E>' conversions,
either 'Some' _and_ 'Ok' work in both contexts.
Closes #1420 .
2020-11-01 10:30:30 -08:00
Sergio Benitez
edc91f65b7
Mimic Rocket's config in custom providers example.
2020-10-30 03:08:26 -07:00
Compro Prasad
de1cffba46
Remove unnecessary 'RawStr.as_str()' in guide.
...
Closes #1454 .
2020-10-30 02:49:00 -07:00
Sergio Benitez
55b651bd70
Use 'rocket::custom()' for 'State' tests.
2020-10-30 02:49:00 -07:00
Jonty
b7565172eb
Impl 'Clone' for 'State'.
...
Resolves #1411 .
2020-10-30 02:16:24 -07:00
Sergio Benitez
a6f5a63535
Add tests for ignored parameters '<_>'.
...
Co-authored-by: timokoesters <timo@koesters.xyz>
2020-10-30 00:47:41 -07:00
Sergio Benitez
8e8fb4cae8
Allow ignored route path segments.
...
Co-authored-by: timokoesters <timo@koesters.xyz>
2020-10-30 00:06:39 -07:00
Sergio Benitez
23738446f0
Impl 'std::error::Error' for 'Error'.
...
Resolves #1460 .
2020-10-27 16:04:25 -07:00
Sergio Benitez
8570afff3e
Use threaded scheduler in tests.
...
This prevents async I/O timeouts in attach fairings.
Co-authored-by: Jeb Rosen <jeb@jebrosen.com>
2020-10-26 13:29:36 -07:00
Sergio Benitez
0c150c2a0e
Remove unused 'config' examples tests.
2020-10-22 18:13:19 -07:00
Sergio Benitez
09f0087034
Split server parts of 'Rocket' into 'server.rs'.
2020-10-22 18:00:07 -07:00