Skip to content

Commit c0d9b1a

Browse files
committed
Strip trailing / from URLs
1 parent ed082b8 commit c0d9b1a

File tree

8 files changed

+25
-25
lines changed

8 files changed

+25
-25
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ All user visible changes to `cucumber` crate will be documented in this file. Th
439439
- Made test callbacks first argument `&mut World` instead of `World`. ([#128])
440440
- Made `#[step]` argument of step functions `Step` instead of `StepContext` again, while test callbacks still receive `StepContext` as a second parameter. ([#128])
441441
- Completely redesign and reworked CLI, making it composable and extendable. ([#144])
442-
- [Hooks](https://cucumber.io/docs/cucumber/api/#hooks) now accept optional `&mut World` as their last parameter. ([#142])
442+
- [Hooks](https://cucumber.io/docs/cucumber/api#hooks) now accept optional `&mut World` as their last parameter. ([#142])
443443

444444
### Added
445445

book/src/writing/modules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ As the test suit grows, it may become harder to notice how minimal changes to re
3636
[step]: https://cucumber.io/docs/gherkin/reference#steps
3737
[tag]: https://cucumber.io/docs/cucumber/api#tags
3838

39-
[1]: https://cucumber.io/docs/guides/anti-patterns/#feature-coupled-step-definitions
39+
[1]: https://cucumber.io/docs/guides/anti-patterns#feature-coupled-step-definitions
4040
[2]: capturing.md

src/cucumber.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,7 @@ where
869869
/// [`ScenarioType`]: runner::basic::ScenarioType
870870
/// [`Summarize`]: writer::Summarize
871871
///
872-
/// [tag]: https://cucumber.io/docs/cucumber/api/#tags
872+
/// [tag]: https://cucumber.io/docs/cucumber/api#tags
873873
#[must_use]
874874
pub fn new() -> Self {
875875
Self::default()
@@ -1118,7 +1118,7 @@ where
11181118

11191119
/// Inserts [Given] [`Step`].
11201120
///
1121-
/// [Given]: https://cucumber.io/docs/gherkin/reference/#given
1121+
/// [Given]: https://cucumber.io/docs/gherkin/reference#given
11221122
#[must_use]
11231123
pub fn given(mut self, regex: Regex, step: Step<W>) -> Self {
11241124
self.runner = self.runner.given(regex, step);
@@ -1127,7 +1127,7 @@ where
11271127

11281128
/// Inserts [When] [`Step`].
11291129
///
1130-
/// [When]: https://cucumber.io/docs/gherkin/reference/#When
1130+
/// [When]: https://cucumber.io/docs/gherkin/reference#when
11311131
#[must_use]
11321132
pub fn when(mut self, regex: Regex, step: Step<W>) -> Self {
11331133
self.runner = self.runner.when(regex, step);
@@ -1136,7 +1136,7 @@ where
11361136

11371137
/// Inserts [Then] [`Step`].
11381138
///
1139-
/// [Then]: https://cucumber.io/docs/gherkin/reference/#then
1139+
/// [Then]: https://cucumber.io/docs/gherkin/reference#then
11401140
#[must_use]
11411141
pub fn then(mut self, regex: Regex, step: Step<W>) -> Self {
11421142
self.runner = self.runner.then(regex, step);

src/event.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ impl<World> Cucumber<World> {
276276

277277
/// Event specific to a particular [Feature].
278278
///
279-
/// [Feature]: https://cucumber.io/docs/gherkin/reference/#feature
279+
/// [Feature]: https://cucumber.io/docs/gherkin/reference#feature
280280
#[derive(Debug)]
281281
pub enum Feature<World> {
282282
/// [`Feature`] execution being started.
@@ -311,7 +311,7 @@ impl<World> Clone for Feature<World> {
311311

312312
/// Event specific to a particular [Rule].
313313
///
314-
/// [Rule]: https://cucumber.io/docs/gherkin/reference/#rule
314+
/// [Rule]: https://cucumber.io/docs/gherkin/reference#rule
315315
#[derive(Debug)]
316316
pub enum Rule<World> {
317317
/// [`Rule`] execution being started.
@@ -342,7 +342,7 @@ impl<World> Clone for Rule<World> {
342342

343343
/// Event specific to a particular [Step].
344344
///
345-
/// [Step]: https://cucumber.io/docs/gherkin/reference/#step
345+
/// [Step]: https://cucumber.io/docs/gherkin/reference#step
346346
#[derive(Debug)]
347347
pub enum Step<World> {
348348
/// [`Step`] execution being started.
@@ -465,7 +465,7 @@ impl<World> Clone for Hook<World> {
465465

466466
/// Event specific to a particular [Scenario].
467467
///
468-
/// [Scenario]: https://cucumber.io/docs/gherkin/reference/#example
468+
/// [Scenario]: https://cucumber.io/docs/gherkin/reference#example
469469
#[derive(Debug)]
470470
pub enum Scenario<World> {
471471
/// [`Scenario`] execution being started.
@@ -637,7 +637,7 @@ impl<World> Scenario<World> {
637637

638638
/// Event specific to a particular retryable [Scenario].
639639
///
640-
/// [Scenario]: https://cucumber.io/docs/gherkin/reference/#example
640+
/// [Scenario]: https://cucumber.io/docs/gherkin/reference#example
641641
#[derive(Debug)]
642642
pub struct RetryableScenario<World> {
643643
/// Happened [`Scenario`] event.
@@ -660,7 +660,7 @@ impl<World> Clone for RetryableScenario<World> {
660660

661661
/// Event explaining why a [Scenario] has finished.
662662
///
663-
/// [Scenario]: https://cucumber.io/docs/gherkin/reference/#example
663+
/// [Scenario]: https://cucumber.io/docs/gherkin/reference#example
664664
#[allow(variant_size_differences)]
665665
#[derive(Clone, Debug)]
666666
pub enum ScenarioFinished {

src/feature.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ pub trait Ext: Sized {
7373
/// Errors if the [`Examples`][2] cannot be expanded.
7474
/// See [`ExpandExamplesError`] for details.
7575
///
76-
/// [1]: https://cucumber.io/docs/gherkin/reference/#scenario-outline
77-
/// [2]: https://cucumber.io/docs/gherkin/reference/#examples
76+
/// [1]: https://cucumber.io/docs/gherkin/reference#scenario-outline
77+
/// [2]: https://cucumber.io/docs/gherkin/reference#examples
7878
fn expand_examples(self) -> Result<Self, ExpandExamplesError>;
7979

8080
/// Counts all the [`Feature`]'s [`Scenario`]s, including [`Rule`]s inside.
@@ -224,7 +224,7 @@ fn expand_scenario(
224224

225225
/// Error of [`Scenario Outline`][1] expansion encountering an unknown template.
226226
///
227-
/// [1]: https://cucumber.io/docs/gherkin/reference/#scenario-outline
227+
/// [1]: https://cucumber.io/docs/gherkin/reference#scenario-outline
228228
#[derive(Clone, Debug, Display, Error)]
229229
#[display(
230230
fmt = "Failed to resolve <{}> at {}:{}:{}",

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ pub use self::{
185185
/// between [scenarios][0] (ex. database connection pool), we recommend using
186186
/// [`once_cell`][1] crate or organize it other way via [shared state][2].
187187
///
188-
/// [0]: https://cucumber.io/docs/gherkin/reference/#descriptions
188+
/// [0]: https://cucumber.io/docs/gherkin/reference#descriptions
189189
/// [1]: https://docs.rs/once_cell
190190
/// [2]: https://doc.rust-lang.org/book/ch16-03-shared-state.html
191191
/// [Cucumber]: https://cucumber.io

src/runner/basic.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ impl<World, Which, Before, After> Basic<World, Which, Before, After> {
662662

663663
/// Adds a [Given] [`Step`] matching the given `regex`.
664664
///
665-
/// [Given]: https://cucumber.io/docs/gherkin/reference/#given
665+
/// [Given]: https://cucumber.io/docs/gherkin/reference#given
666666
#[must_use]
667667
pub fn given(mut self, regex: Regex, step: Step<World>) -> Self {
668668
self.steps = mem::take(&mut self.steps).given(None, regex, step);
@@ -671,7 +671,7 @@ impl<World, Which, Before, After> Basic<World, Which, Before, After> {
671671

672672
/// Adds a [When] [`Step`] matching the given `regex`.
673673
///
674-
/// [When]: https://cucumber.io/docs/gherkin/reference/#given
674+
/// [When]: https://cucumber.io/docs/gherkin/reference#given
675675
#[must_use]
676676
pub fn when(mut self, regex: Regex, step: Step<World>) -> Self {
677677
self.steps = mem::take(&mut self.steps).when(None, regex, step);
@@ -680,7 +680,7 @@ impl<World, Which, Before, After> Basic<World, Which, Before, After> {
680680

681681
/// Adds a [Then] [`Step`] matching the given `regex`.
682682
///
683-
/// [Then]: https://cucumber.io/docs/gherkin/reference/#then
683+
/// [Then]: https://cucumber.io/docs/gherkin/reference#then
684684
#[must_use]
685685
pub fn then(mut self, regex: Regex, step: Step<World>) -> Self {
686686
self.steps = mem::take(&mut self.steps).then(None, regex, step);

src/step.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,17 @@ pub type WithContext<'me, World> = (
4545
pub struct Collection<World> {
4646
/// Collection of [Given] [`Step`]s.
4747
///
48-
/// [Given]: https://cucumber.io/docs/gherkin/reference/#given
48+
/// [Given]: https://cucumber.io/docs/gherkin/reference#given
4949
given: HashMap<(HashableRegex, Option<Location>), Step<World>>,
5050

5151
/// Collection of [When] [`Step`]s.
5252
///
53-
/// [When]: https://cucumber.io/docs/gherkin/reference/#when
53+
/// [When]: https://cucumber.io/docs/gherkin/reference#when
5454
when: HashMap<(HashableRegex, Option<Location>), Step<World>>,
5555

5656
/// Collection of [Then] [`Step`]s.
5757
///
58-
/// [Then]: https://cucumber.io/docs/gherkin/reference/#then
58+
/// [Then]: https://cucumber.io/docs/gherkin/reference#then
5959
then: HashMap<(HashableRegex, Option<Location>), Step<World>>,
6060
}
6161

@@ -123,7 +123,7 @@ impl<World> Collection<World> {
123123

124124
/// Adds a [Given] [`Step`] matching the given `regex`.
125125
///
126-
/// [Given]: https://cucumber.io/docs/gherkin/reference/#given
126+
/// [Given]: https://cucumber.io/docs/gherkin/reference#given
127127
#[must_use]
128128
pub fn given(
129129
mut self,
@@ -137,7 +137,7 @@ impl<World> Collection<World> {
137137

138138
/// Adds a [When] [`Step`] matching the given `regex`.
139139
///
140-
/// [When]: https://cucumber.io/docs/gherkin/reference/#when
140+
/// [When]: https://cucumber.io/docs/gherkin/reference#when
141141
#[must_use]
142142
pub fn when(
143143
mut self,
@@ -151,7 +151,7 @@ impl<World> Collection<World> {
151151

152152
/// Adds a [Then] [`Step`] matching the given `regex`.
153153
///
154-
/// [Then]: https://cucumber.io/docs/gherkin/reference/#then
154+
/// [Then]: https://cucumber.io/docs/gherkin/reference#then
155155
#[must_use]
156156
pub fn then(
157157
mut self,

0 commit comments

Comments
 (0)