Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update gherkin requirement from 0.11.2 to 0.12.0 #211

Merged
merged 7 commits into from
Mar 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@ All user visible changes to `cucumber` crate will be documented in this file. Th



## [0.13.0] · 2022-03-29
[0.13.0]: /../../tree/v0.13.0

[Diff](/../../compare/v0.12.2...v0.13.0) | [Milestone](/../../milestone/12)

### BC Breaks

- Upgraded [`gherkin`] crate to 0.12 version. ([#211])

[#211]: /../../pull/211




## [0.12.2] · 2022-03-28
[0.12.2]: /../../tree/v0.12.2

Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cucumber"
version = "0.12.2"
version = "0.13.0"
edition = "2021"
rust-version = "1.57"
description = """\
Expand Down Expand Up @@ -44,7 +44,7 @@ console = "0.15"
derive_more = { version = "0.99.17", features = ["as_ref", "deref", "deref_mut", "display", "error", "from", "into"], default_features = false }
either = "1.6"
futures = "0.3.17"
gherkin = "0.11.2"
gherkin = "0.12"
globwalk = "0.8.1"
itertools = "0.10"
linked-hash-map = "0.5.3"
Expand All @@ -53,7 +53,7 @@ regex = "1.5.5"
sealed = "0.4"

# "macros" feature dependencies.
cucumber-codegen = { version = "0.12.1", path = "./codegen", optional = true }
cucumber-codegen = { version = "0.13", path = "./codegen", optional = true }
cucumber-expressions = { version = "0.2.1", features = ["into-regex"], optional = true }
inventory = { version = "0.2", optional = true }

Expand Down
1 change: 1 addition & 0 deletions book/src/architecture/parser.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ impl<I> cucumber::Parser<I> for CustomParser {
scenarios: vec![gherkin::Scenario {
keyword: "Scenario".into(),
name: "If we feed a hungry cat it won't be hungry".into(),
description: None,
steps: vec![
gherkin::Step {
keyword: "Given".into(),
Expand Down
1 change: 1 addition & 0 deletions book/src/architecture/runner.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ Now, let's implement a custom [`Runner`] which simply executes [scenario]s in [f
# scenarios: vec![gherkin::Scenario {
# keyword: "Scenario".into(),
# name: "If we feed a hungry cat it won't be hungry".into(),
# description: None,
# steps: vec![
# gherkin::Step {
# keyword: "Given".into(),
Expand Down
2 changes: 2 additions & 0 deletions book/src/architecture/writer.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ Finally, let's implement a custom [`Writer`] which simply outputs [cucumber even
# scenarios: vec![gherkin::Scenario {
# keyword: "Scenario".into(),
# name: "If we feed a hungry cat it won't be hungry".into(),
# description: None,
# steps: vec![
# gherkin::Step {
# keyword: "Given".into(),
Expand Down Expand Up @@ -379,6 +380,7 @@ async fn main() {
# scenarios: vec![gherkin::Scenario {
# keyword: "Scenario".into(),
# name: "If we feed a hungry cat it won't be hungry".into(),
# description: None,
# steps: vec![
# gherkin::Step {
# keyword: "Given".into(),
Expand Down
2 changes: 1 addition & 1 deletion book/src/output/json.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Cucumber JSON format

This requires `output-json` feature to be enabled in `Cargo.toml`:
```toml
cucumber = { version = "0.11", features = ["output-json"] }
cucumber = { version = "0.13", features = ["output-json"] }
```

And configuring output to [`writer::Json`]:
Expand Down
2 changes: 1 addition & 1 deletion book/src/output/junit.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ JUnit XML report

This requires `output-junit` feature to be enabled in `Cargo.toml`:
```toml
cucumber = { version = "0.11", features = ["output-junit"] }
cucumber = { version = "0.13", features = ["output-junit"] }
```

And configuring output to [`writer::JUnit`]:
Expand Down
4 changes: 2 additions & 2 deletions book/src/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Add this to `Cargo.toml`:
```toml
[dev-dependencies]
async-trait = "0.1"
cucumber = "0.11"
cucumber = "0.13"
futures = "0.3"

[[test]]
Expand Down Expand Up @@ -427,7 +427,7 @@ Let's switch our runtime to `tokio`:
```toml
[dev-dependencies]
async-trait = "0.1"
cucumber = "0.11"
cucumber = "0.13"
tokio = { version = "1.10", features = ["macros", "rt-multi-thread", "time"] }

[[test]]
Expand Down
4 changes: 2 additions & 2 deletions book/tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ publish = false
[dependencies]
async-trait = "0.1"
clap = { version = "3.0", features = ["derive"] }
cucumber = { version = "0.12", path = "../..", features = ["output-json", "output-junit"] }
cucumber = { version = "0.13", path = "../..", features = ["output-json", "output-junit"] }
futures = "0.3"
humantime = "2.1"
once_cell = { version = "1.8", features = ["parking_lot"] }
skeptic = "0.13.7"
tokio = { version = "1", features = ["macros", "rt-multi-thread", "time"] }
tokio = { version = "1.12", features = ["macros", "rt-multi-thread", "time"] }

[build-dependencies]
skeptic = "0.13.7"
12 changes: 12 additions & 0 deletions codegen/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ All user visible changes to `cucumber-codegen` crate will be documented in this



## [0.13.0] · 2022-03-29
[0.13.0]: /../../tree/v0.13.0/codegen

[Milestone](/../../milestone/12)

### Version bump only

See `cucumber` crate [changelog](https://github.com/cucumber-rs/cucumber/blob/v0.13.0/CHANGELOG.md).




## [0.12.2] · 2022-03-28
[0.12.2]: /../../tree/v0.12.2/codegen

Expand Down
2 changes: 1 addition & 1 deletion codegen/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cucumber-codegen"
version = "0.12.2" # should be the same as main crate version
version = "0.13.0" # should be the same as main crate version
edition = "2021"
rust-version = "1.57"
description = "Code generation for `cucumber` crate."
Expand Down
8 changes: 7 additions & 1 deletion src/feature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,13 @@ fn expand_scenario(
scenario
.examples
.iter()
.filter_map(|ex| ex.table.rows.split_first().map(|(h, v)| (h, v, ex)))
.filter_map(|ex| {
ex.table
.as_ref()?
.rows
.split_first()
.map(|(h, v)| (h, v, ex))
})
.flat_map(|(header, vals, example)| {
vals.iter()
.map(|v| header.iter().zip(v))
Expand Down
16 changes: 8 additions & 8 deletions src/writer/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ impl<Out: io::Write> Basic<Out> {
self.indent += 4;
if self.styles.is_present {
let output = format!(
"{indent}{} {}{}{}",
"{indent}{}{}{}{}",
step.keyword,
step.value,
step.docstring
Expand Down Expand Up @@ -532,7 +532,7 @@ impl<Out: io::Write> Basic<Out> {

// TODO: Use "{step_keyword}" syntax once MSRV bumps above 1.58.
self.output.write_line(&self.styles.ok(format!(
"{indent}{} {}{}{}",
"{indent}{}{}{}{}",
step_keyword,
step_value,
doc_str,
Expand All @@ -552,7 +552,7 @@ impl<Out: io::Write> Basic<Out> {
) -> io::Result<()> {
self.clear_last_lines_if_term_present()?;
self.output.write_line(&self.styles.skipped(format!(
"{indent}? {} {}{}{}\n\
"{indent}? {}{}{}{}\n\
{indent} Step skipped: {}:{}:{}",
step.keyword,
step.value,
Expand Down Expand Up @@ -651,7 +651,7 @@ impl<Out: io::Write> Basic<Out> {

// TODO: Use "{step_keyword}" syntax once MSRV bumps above 1.58.
self.write_line(&format!(
"{} {}{}",
"{}{}{}",
step_keyword, step_value, diagnostics,
))
}
Expand Down Expand Up @@ -711,7 +711,7 @@ impl<Out: io::Write> Basic<Out> {
self.indent += 4;
if self.styles.is_present {
let output = format!(
"{indent}> {} {}{}{}",
"{indent}> {}{}{}{}",
step.keyword,
step.value,
step.docstring
Expand Down Expand Up @@ -776,7 +776,7 @@ impl<Out: io::Write> Basic<Out> {

// TODO: Use "{step_keyword}" syntax once MSRV bumps above 1.58.
self.output.write_line(&self.styles.ok(format!(
"{indent}{} {}{}{}",
"{indent}{}{}{}{}",
step_keyword,
step_value,
doc_str,
Expand All @@ -797,7 +797,7 @@ impl<Out: io::Write> Basic<Out> {
) -> io::Result<()> {
self.clear_last_lines_if_term_present()?;
self.output.write_line(&self.styles.skipped(format!(
"{indent}?> {} {}{}{}\n\
"{indent}?> {}{}{}{}\n\
{indent} Background step failed: {}:{}:{}",
step.keyword,
step.value,
Expand Down Expand Up @@ -896,7 +896,7 @@ impl<Out: io::Write> Basic<Out> {

// TODO: Use "{step_keyword}" syntax once MSRV bumps above 1.58.
self.write_line(&format!(
"{} {}{}",
"{}{}{}",
step_keyword, step_value, diagnostics,
))
}
Expand Down
Loading