slumber-python 5.3.0__tar.gz → 5.4.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. {slumber_python-5.3.0 → slumber_python-5.4.2}/Cargo.lock +127 -15
  2. {slumber_python-5.3.0 → slumber_python-5.4.2}/Cargo.toml +12 -11
  3. {slumber_python-5.3.0 → slumber_python-5.4.2}/PKG-INFO +1 -1
  4. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/core/Cargo.toml +1 -1
  5. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/core/src/database/convert.rs +1 -1
  6. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/core/src/database/tests.rs +1 -1
  7. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/core/src/database.rs +2 -2
  8. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/core/src/http/tests.rs +1 -1
  9. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/core/src/render/tests.rs +1 -1
  10. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/core/src/render.rs +4 -0
  11. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/util/src/lib.rs +3 -3
  12. {slumber_python-5.3.0 → slumber_python-5.4.2}/README.md +0 -0
  13. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/config/Cargo.toml +0 -0
  14. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/config/src/cereal.rs +0 -0
  15. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/config/src/default.yml +0 -0
  16. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/config/src/default_old.yml +0 -0
  17. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/config/src/lib.rs +0 -0
  18. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/config/src/tui/cereal.rs +0 -0
  19. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/config/src/tui/input.rs +0 -0
  20. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/config/src/tui/mime.rs +0 -0
  21. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/config/src/tui/theme.rs +0 -0
  22. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/config/src/tui.rs +0 -0
  23. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/console/Cargo.toml +0 -0
  24. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/console/src/lib.rs +0 -0
  25. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/core/src/collection/cereal.rs +0 -0
  26. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/core/src/collection/models.rs +0 -0
  27. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/core/src/collection/recipe_tree.rs +0 -0
  28. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/core/src/collection/schema.rs +0 -0
  29. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/core/src/collection/value_template.rs +0 -0
  30. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/core/src/collection.rs +0 -0
  31. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/core/src/database/migrations.rs +0 -0
  32. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/core/src/http/curl.rs +0 -0
  33. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/core/src/http/models.rs +0 -0
  34. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/core/src/http.rs +0 -0
  35. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/core/src/lib.rs +0 -0
  36. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/core/src/render/functions.rs +0 -0
  37. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/core/src/render/util.rs +0 -0
  38. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/core/src/test_util.rs +0 -0
  39. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/core/src/util/json.rs +0 -0
  40. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/core/src/util.rs +0 -0
  41. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/macros/Cargo.toml +0 -0
  42. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/macros/src/lib.rs +0 -0
  43. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/python/Cargo.toml +0 -0
  44. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/python/README.md +0 -0
  45. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/python/dev.py +0 -0
  46. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/python/mise.toml +0 -0
  47. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/python/slumber.pyi +0 -0
  48. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/python/src/lib.rs +0 -0
  49. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/python/tests/slumber.yml +0 -0
  50. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/python/tests/test.py +0 -0
  51. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/python/uv.lock +0 -0
  52. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/template/Cargo.toml +0 -0
  53. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/template/proptest-regressions/parse.txt +0 -0
  54. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/template/src/cereal.rs +0 -0
  55. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/template/src/display.rs +0 -0
  56. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/template/src/error.rs +0 -0
  57. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/template/src/expression.rs +0 -0
  58. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/template/src/lib.rs +0 -0
  59. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/template/src/parse.rs +0 -0
  60. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/template/src/test_util.rs +0 -0
  61. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/template/src/tests.rs +0 -0
  62. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/template/src/value.rs +0 -0
  63. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/util/Cargo.toml +0 -0
  64. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/util/src/paths.rs +0 -0
  65. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/util/src/test_util.rs +0 -0
  66. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/util/src/yaml/error.rs +0 -0
  67. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/util/src/yaml/resolve.rs +0 -0
  68. {slumber_python-5.3.0 → slumber_python-5.4.2}/crates/util/src/yaml.rs +0 -0
  69. {slumber_python-5.3.0 → slumber_python-5.4.2}/pyproject.toml +0 -0
@@ -26,6 +26,21 @@ dependencies = [
26
26
  "memchr",
27
27
  ]
28
28
 
29
+ [[package]]
30
+ name = "alloc-no-stdlib"
31
+ version = "2.0.4"
32
+ source = "registry+https://github.com/rust-lang/crates.io-index"
33
+ checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3"
34
+
35
+ [[package]]
36
+ name = "alloc-stdlib"
37
+ version = "0.2.4"
38
+ source = "registry+https://github.com/rust-lang/crates.io-index"
39
+ checksum = "0e76a019e91224d279006ff972f1e984179a6e9feb050adba6ce8274aef23195"
40
+ dependencies = [
41
+ "alloc-no-stdlib",
42
+ ]
43
+
29
44
  [[package]]
30
45
  name = "allocator-api2"
31
46
  version = "0.2.21"
@@ -131,15 +146,27 @@ dependencies = [
131
146
  "wait-timeout",
132
147
  ]
133
148
 
149
+ [[package]]
150
+ name = "async-compression"
151
+ version = "0.4.39"
152
+ source = "registry+https://github.com/rust-lang/crates.io-index"
153
+ checksum = "68650b7df54f0293fd061972a0fb05aaf4fc0879d3b3d21a638a182c5c543b9f"
154
+ dependencies = [
155
+ "compression-codecs",
156
+ "compression-core",
157
+ "pin-project-lite",
158
+ "tokio",
159
+ ]
160
+
134
161
  [[package]]
135
162
  name = "async-trait"
136
- version = "0.1.89"
163
+ version = "0.1.92"
137
164
  source = "registry+https://github.com/rust-lang/crates.io-index"
138
- checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb"
165
+ checksum = "82f6aeea286b8eb4dd3431a1be1b59d290ace00f5bfd8e2a159bc2a05e2c1667"
139
166
  dependencies = [
140
167
  "proc-macro2",
141
168
  "quote",
142
- "syn 2.0.114",
169
+ "syn 3.0.9",
143
170
  ]
144
171
 
145
172
  [[package]]
@@ -309,6 +336,27 @@ dependencies = [
309
336
  "generic-array",
310
337
  ]
311
338
 
339
+ [[package]]
340
+ name = "brotli"
341
+ version = "8.0.2"
342
+ source = "registry+https://github.com/rust-lang/crates.io-index"
343
+ checksum = "4bd8b9603c7aa97359dbd97ecf258968c95f3adddd6db2f7e7a5bef101c84560"
344
+ dependencies = [
345
+ "alloc-no-stdlib",
346
+ "alloc-stdlib",
347
+ "brotli-decompressor",
348
+ ]
349
+
350
+ [[package]]
351
+ name = "brotli-decompressor"
352
+ version = "5.0.3"
353
+ source = "registry+https://github.com/rust-lang/crates.io-index"
354
+ checksum = "3a32acac15fe1967bc3986b2a6347dffc965602354ea6f450ad07e8bfd253583"
355
+ dependencies = [
356
+ "alloc-no-stdlib",
357
+ "alloc-stdlib",
358
+ ]
359
+
312
360
  [[package]]
313
361
  name = "bstr"
314
362
  version = "1.12.1"
@@ -492,6 +540,26 @@ dependencies = [
492
540
  "static_assertions",
493
541
  ]
494
542
 
543
+ [[package]]
544
+ name = "compression-codecs"
545
+ version = "0.4.36"
546
+ source = "registry+https://github.com/rust-lang/crates.io-index"
547
+ checksum = "00828ba6fd27b45a448e57dbfe84f1029d4c9f26b368157e9a448a5f49a2ec2a"
548
+ dependencies = [
549
+ "brotli",
550
+ "compression-core",
551
+ "flate2",
552
+ "memchr",
553
+ "zstd",
554
+ "zstd-safe",
555
+ ]
556
+
557
+ [[package]]
558
+ name = "compression-core"
559
+ version = "0.4.31"
560
+ source = "registry+https://github.com/rust-lang/crates.io-index"
561
+ checksum = "75984efb6ed102a0d42db99afb6c1948f0380d1d91808d5529916e6c08b49d8d"
562
+
495
563
  [[package]]
496
564
  name = "console"
497
565
  version = "0.16.2"
@@ -809,7 +877,7 @@ dependencies = [
809
877
 
810
878
  [[package]]
811
879
  name = "doc_utils"
812
- version = "5.3.0"
880
+ version = "5.4.2"
813
881
  dependencies = [
814
882
  "anyhow",
815
883
  "clap",
@@ -3280,7 +3348,7 @@ checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589"
3280
3348
 
3281
3349
  [[package]]
3282
3350
  name = "slumber"
3283
- version = "5.3.0"
3351
+ version = "5.4.2"
3284
3352
  dependencies = [
3285
3353
  "anyhow",
3286
3354
  "slumber_cli",
@@ -3292,7 +3360,7 @@ dependencies = [
3292
3360
 
3293
3361
  [[package]]
3294
3362
  name = "slumber_cli"
3295
- version = "5.3.0"
3363
+ version = "5.4.2"
3296
3364
  dependencies = [
3297
3365
  "anyhow",
3298
3366
  "assert_cmd",
@@ -3327,7 +3395,7 @@ dependencies = [
3327
3395
 
3328
3396
  [[package]]
3329
3397
  name = "slumber_config"
3330
- version = "5.3.0"
3398
+ version = "5.4.2"
3331
3399
  dependencies = [
3332
3400
  "derive_more",
3333
3401
  "dirs",
@@ -3352,7 +3420,7 @@ dependencies = [
3352
3420
 
3353
3421
  [[package]]
3354
3422
  name = "slumber_console"
3355
- version = "5.3.0"
3423
+ version = "5.4.2"
3356
3424
  dependencies = [
3357
3425
  "anyhow",
3358
3426
  "async-trait",
@@ -3366,7 +3434,7 @@ dependencies = [
3366
3434
 
3367
3435
  [[package]]
3368
3436
  name = "slumber_core"
3369
- version = "5.3.0"
3437
+ version = "5.4.2"
3370
3438
  dependencies = [
3371
3439
  "async-trait",
3372
3440
  "base64 0.22.1",
@@ -3414,7 +3482,7 @@ dependencies = [
3414
3482
 
3415
3483
  [[package]]
3416
3484
  name = "slumber_import"
3417
- version = "5.3.0"
3485
+ version = "5.4.2"
3418
3486
  dependencies = [
3419
3487
  "anyhow",
3420
3488
  "base64 0.22.1",
@@ -3446,7 +3514,7 @@ dependencies = [
3446
3514
 
3447
3515
  [[package]]
3448
3516
  name = "slumber_macros"
3449
- version = "5.3.0"
3517
+ version = "5.4.2"
3450
3518
  dependencies = [
3451
3519
  "proc-macro2",
3452
3520
  "quote",
@@ -3455,7 +3523,7 @@ dependencies = [
3455
3523
 
3456
3524
  [[package]]
3457
3525
  name = "slumber_python"
3458
- version = "5.3.0"
3526
+ version = "5.4.2"
3459
3527
  dependencies = [
3460
3528
  "async-trait",
3461
3529
  "indexmap",
@@ -3469,7 +3537,7 @@ dependencies = [
3469
3537
 
3470
3538
  [[package]]
3471
3539
  name = "slumber_template"
3472
- version = "5.3.0"
3540
+ version = "5.4.2"
3473
3541
  dependencies = [
3474
3542
  "bytes",
3475
3543
  "derive_more",
@@ -3496,7 +3564,7 @@ dependencies = [
3496
3564
 
3497
3565
  [[package]]
3498
3566
  name = "slumber_tui"
3499
- version = "5.3.0"
3567
+ version = "5.4.2"
3500
3568
  dependencies = [
3501
3569
  "anyhow",
3502
3570
  "async-trait",
@@ -3538,7 +3606,7 @@ dependencies = [
3538
3606
 
3539
3607
  [[package]]
3540
3608
  name = "slumber_util"
3541
- version = "5.3.0"
3609
+ version = "5.4.2"
3542
3610
  dependencies = [
3543
3611
  "console-subscriber",
3544
3612
  "derive_more",
@@ -3660,6 +3728,17 @@ dependencies = [
3660
3728
  "unicode-ident",
3661
3729
  ]
3662
3730
 
3731
+ [[package]]
3732
+ name = "syn"
3733
+ version = "3.0.9"
3734
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3735
+ checksum = "d78c8dee4c7bf0e14673097256fed6142ce9d3b85a408189d07482442145823b"
3736
+ dependencies = [
3737
+ "proc-macro2",
3738
+ "quote",
3739
+ "unicode-ident",
3740
+ ]
3741
+
3663
3742
  [[package]]
3664
3743
  name = "sync_wrapper"
3665
3744
  version = "1.0.2"
@@ -4048,13 +4127,18 @@ version = "0.6.8"
4048
4127
  source = "registry+https://github.com/rust-lang/crates.io-index"
4049
4128
  checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8"
4050
4129
  dependencies = [
4130
+ "async-compression",
4051
4131
  "bitflags 2.10.0",
4052
4132
  "bytes",
4133
+ "futures-core",
4053
4134
  "futures-util",
4054
4135
  "http",
4055
4136
  "http-body",
4137
+ "http-body-util",
4056
4138
  "iri-string",
4057
4139
  "pin-project-lite",
4140
+ "tokio",
4141
+ "tokio-util",
4058
4142
  "tower",
4059
4143
  "tower-layer",
4060
4144
  "tower-service",
@@ -5004,3 +5088,31 @@ name = "zmij"
5004
5088
  version = "1.0.14"
5005
5089
  source = "registry+https://github.com/rust-lang/crates.io-index"
5006
5090
  checksum = "bd8f3f50b848df28f887acb68e41201b5aea6bc8a8dacc00fb40635ff9a72fea"
5091
+
5092
+ [[package]]
5093
+ name = "zstd"
5094
+ version = "0.13.3"
5095
+ source = "registry+https://github.com/rust-lang/crates.io-index"
5096
+ checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a"
5097
+ dependencies = [
5098
+ "zstd-safe",
5099
+ ]
5100
+
5101
+ [[package]]
5102
+ name = "zstd-safe"
5103
+ version = "7.2.4"
5104
+ source = "registry+https://github.com/rust-lang/crates.io-index"
5105
+ checksum = "8f49c4d5f0abb602a93fb8736af2a4f4dd9512e36f7f570d66e65ff867ed3b9d"
5106
+ dependencies = [
5107
+ "zstd-sys",
5108
+ ]
5109
+
5110
+ [[package]]
5111
+ name = "zstd-sys"
5112
+ version = "2.0.16+zstd.1.5.7"
5113
+ source = "registry+https://github.com/rust-lang/crates.io-index"
5114
+ checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748"
5115
+ dependencies = [
5116
+ "cc",
5117
+ "pkg-config",
5118
+ ]
@@ -9,9 +9,9 @@ homepage = "https://slumber.lucaspickering.me"
9
9
  keywords = ["rest", "http", "terminal", "tui"]
10
10
  license = "MIT"
11
11
  repository = "https://github.com/LucasPickering/slumber"
12
- version = "5.3.0"
12
+ version = "5.4.2"
13
13
  # Keep in sync w/ rust-toolchain.toml
14
- rust-version = "1.90.0"
14
+ rust-version = "1.99.0"
15
15
 
16
16
  # Dependencies used in multiple crates get de-duplicated here
17
17
  [workspace.dependencies]
@@ -43,15 +43,15 @@ serde_json = {version = "1.0.120", default-features = false, features = ["preser
43
43
  serde_json_path = "0.7.1"
44
44
  serde_test = "1.0.176"
45
45
  serde_yaml = {version = "0.9.0", default-features = false}
46
- slumber_cli = {path = "./crates/cli", version = "5.3.0" }
47
- slumber_config = {path = "./crates/config", version = "5.3.0", default-features = false}
48
- slumber_console = {path = "./crates/console", version = "5.3.0" }
49
- slumber_core = {path = "./crates/core", version = "5.3.0" }
50
- slumber_import = {path = "./crates/import", version = "5.3.0" }
51
- slumber_macros = {path = "./crates/macros", version = "5.3.0" }
52
- slumber_template = {path = "./crates/template", version = "5.3.0" }
53
- slumber_tui = {path = "./crates/tui", version = "5.3.0" }
54
- slumber_util = {path = "./crates/util", version = "5.3.0" }
46
+ slumber_cli = {path = "./crates/cli", version = "5.4.2" }
47
+ slumber_config = {path = "./crates/config", version = "5.4.2", default-features = false}
48
+ slumber_console = {path = "./crates/console", version = "5.4.2" }
49
+ slumber_core = {path = "./crates/core", version = "5.4.2" }
50
+ slumber_import = {path = "./crates/import", version = "5.4.2" }
51
+ slumber_macros = {path = "./crates/macros", version = "5.4.2" }
52
+ slumber_template = {path = "./crates/template", version = "5.4.2" }
53
+ slumber_tui = {path = "./crates/tui", version = "5.4.2" }
54
+ slumber_util = {path = "./crates/util", version = "5.4.2" }
55
55
  strum = {version = "0.27.0", default-features = false}
56
56
  syn = "2.0.101"
57
57
  terminput = "0.5.3"
@@ -92,6 +92,7 @@ needless_pass_by_value = "allow"
92
92
  similar_names = "allow"
93
93
  single_match = "allow"
94
94
  too_many_lines = "allow"
95
+ unused_async_trait_impl = "allow"
95
96
  unused_self = "allow"
96
97
  used_underscore_binding = "allow"
97
98
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: slumber-python
3
- Version: 5.3.0
3
+ Version: 5.4.2
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -25,7 +25,7 @@ jaq-json = {version = "1.1.3", default-features = false, features = ["serde_json
25
25
  jaq-std = "2.1.2"
26
26
  mime = {workspace = true}
27
27
  regex = {workspace = true}
28
- reqwest = {workspace = true, features = ["json", "form", "multipart", "query", "rustls", "stream"]}
28
+ reqwest = {workspace = true, features = ["brotli", "deflate", "form", "gzip", "json", "multipart", "query", "rustls", "stream", "zstd"]}
29
29
  rstest = {workspace = true, optional = true}
30
30
  rusqlite = {version = "0.38.0", default-features = false, features = ["bundled", "chrono", "uuid"]}
31
31
  rusqlite_migration = "2.4.0"
@@ -353,7 +353,7 @@ impl FromSql for SqlWrap<Bytes> {
353
353
  impl FromSql for SqlWrap<StatusCode> {
354
354
  fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self> {
355
355
  let code: u16 = value.as_i64()?.try_into().map_err(error_other)?;
356
- let code = StatusCode::from_u16(code as u16).map_err(error_other)?;
356
+ let code = StatusCode::from_u16(code).map_err(error_other)?;
357
357
  Ok(Self(code))
358
358
  }
359
359
  }
@@ -293,7 +293,7 @@ fn test_request_body(#[case] body: RequestBody) {
293
293
  });
294
294
 
295
295
  database.insert_exchange(&exchange).unwrap();
296
- let actual = database.get_request(exchange.id).unwrap().unwrap();
296
+ let actual = database.get_exchange(exchange.id).unwrap().unwrap();
297
297
 
298
298
  // What goes in is what comes out
299
299
  assert_eq!(actual.request.body, body);
@@ -392,8 +392,8 @@ impl CollectionDatabase {
392
392
  .traced();
393
393
  }
394
394
 
395
- /// Get a request by ID, or `None` if it does not exist in history.
396
- pub fn get_request(
395
+ /// Get an exchange by ID, or `None` if not in the database
396
+ pub fn get_exchange(
397
397
  &self,
398
398
  request_id: RequestId,
399
399
  ) -> Result<Option<Exchange>, DatabaseError> {
@@ -1082,7 +1082,7 @@ async fn test_send_request(http_engine: HttpEngine) {
1082
1082
  );
1083
1083
 
1084
1084
  // Ensure it was persisted
1085
- assert_eq!(database.get_request(exchange.id).unwrap(), Some(exchange));
1085
+ assert_eq!(database.get_exchange(exchange.id).unwrap(), Some(exchange));
1086
1086
  }
1087
1087
 
1088
1088
  /// Leading/trailing newlines should be stripped from rendered header
@@ -923,7 +923,7 @@ async fn test_response_header(
923
923
  ..ResponseRecord::factory(id)
924
924
  }
925
925
  .into(),
926
- end_time: Utc::now() - Duration::from_secs(60 * 60),
926
+ end_time: Utc::now() - Duration::from_hours(1),
927
927
  ..Exchange::factory((id, None, recipe.id.clone()))
928
928
  };
929
929
  database.insert_exchange(&exchange).unwrap();
@@ -212,6 +212,7 @@ impl TemplateContext {
212
212
  }
213
213
  }
214
214
 
215
+ /// Template context when producing eager values (where streams aren't allowed)
215
216
  impl Context<Value> for TemplateContext {
216
217
  async fn get_field(
217
218
  &self,
@@ -241,11 +242,14 @@ impl Context<Value> for TemplateContext {
241
242
  }
242
243
  }
243
244
 
245
+ /// Template context when producing lazy values (where streams are allowed)
244
246
  impl Context<ValueStream> for TemplateContext {
245
247
  async fn get_field(
246
248
  &self,
247
249
  field: &Identifier,
248
250
  ) -> Result<ValueStream, RenderError> {
251
+ // Streams can't be cached because they can only be resolved once. If
252
+ // the value is cached, it must be eager.
249
253
  let guard = match self.get_field_cache_guard(field).await {
250
254
  FieldCacheOutcome::Hit(value) => return Ok(value.into()),
251
255
  FieldCacheOutcome::Miss(guard) => guard,
@@ -143,11 +143,11 @@ where
143
143
  /// use slumber_util::doc_link;
144
144
  /// assert_eq!(
145
145
  /// doc_link("api/chain"),
146
- /// "https://slumber.lucaspickering.me/api/chain.html",
146
+ /// "https://slmbr.dev/api/chain.html",
147
147
  /// );
148
148
  /// ```
149
149
  pub fn doc_link(path: &str) -> String {
150
- const ROOT: &str = "https://slumber.lucaspickering.me/";
150
+ const ROOT: &str = "https://slmbr.dev/";
151
151
  if path.is_empty() {
152
152
  ROOT.into()
153
153
  } else {
@@ -414,7 +414,7 @@ mod tests {
414
414
  #[case::seconds_longer("100s", Duration::from_secs(100))]
415
415
  #[case::minutes("3m", Duration::from_secs(180))]
416
416
  #[case::hours("3h", Duration::from_secs(10_800))]
417
- #[case::days("2d", Duration::from_secs(172_800))]
417
+ #[case::days("2d", Duration::from_hours(48))]
418
418
  #[case::composite("2d3h10m17s", Duration::from_secs(
419
419
  2 * 86400 + 3 * 3600 + 10 * 60 + 17
420
420
  ))]
File without changes