Skip to content

Commit 904d38a

Browse files
authored
Merge pull request #65 from cucumber/v6.x
Upgrade to Cucumber Core v6
2 parents 63cc39f + b600ce1 commit 904d38a

File tree

11 files changed

+69
-28
lines changed

11 files changed

+69
-28
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,18 @@ See also the [CHANGELOG](https://github.com/cucumber/cucumber-jvm/blob/master/CH
1212
### Added
1313

1414
- [Scala] Conversion methods from `DataTable` to scala types ([#56](https://github.com/cucumber/cucumber-jvm-scala/issues/56) Gaël Jourdan-Weil)
15+
- [Scala] Add `attach(String, String, String)` in `Scenario` (Gaël Jourdan-Weil)
1516

1617
### Changed
1718

19+
- [Core] Update `cucumber-core` dependency to 6.0.0 (Gaël Jourdan-Weil)
20+
1821
### Deprecated
1922

2023
### Removed
2124

25+
- [Scala] Remove deprecated methods in `Scenario` (Gaël Jourdan-Weil)
26+
2227
### Fixed
2328

2429
- [Scala DSL] Raise an exception at runtime if hooks are not correctly defined ([#60](https://github.com/cucumber/cucumber-jvm-scala/issues/60) Gaël Jourdan-Weil)

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ The minor version might differ because Cucumber Scala may add Scala-related feat
1717

1818
| Cucumber Scala version | Cucumber version | Scala versions |
1919
|------------------------|------------------|------------------|
20+
| 6.0.0 | 6.0.0 | 2.11, 2.12, 2.13 |
2021
| 5.7.0 | 5.7.0 | 2.11, 2.12, 2.13 |
2122
| 5.6.0 | 5.6.0 | 2.11, 2.12, 2.13 |
2223
| 4.7.1 | 4.7.1 | 2.11, 2.12, 2.13 |
@@ -25,6 +26,7 @@ The minor version might differ because Cucumber Scala may add Scala-related feat
2526

2627
- [Installation](./docs/install.md)
2728
- Upgrade notes
29+
- [Version 6.x](docs/upgrade_v6.md)
2830
- [Version 5.x](docs/upgrade_v5.md)
2931
- Documentation
3032
- [Basic usage](docs/usage.md)

docs/default_jackson_datatable_transformer.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ To use this optional transformer, you need to have Jackson Scala in your depende
1212
<dependency>
1313
<groupId>com.fasterxml.jackson.module</groupId>
1414
<artifactId>jackson-module-scala_2.13</artifactId>
15-
<version>2.10.3</version>
15+
<version>2.11.0</version>
1616
<scope>test</scope>
1717
</dependency>
1818
```
@@ -23,7 +23,7 @@ libraryDependencies += "com.fasterxml.jackson.module" %% "jackson-module-scala"
2323
```
2424

2525

26-
The current version of Cucumber Scala has been tested against Jackson Module Scala **version 2.10.3**.
26+
The current version of Cucumber Scala has been tested against Jackson Module Scala **version 2.11.0**.
2727

2828
## Add the transformer
2929

docs/upgrade_v6.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Upgrading from 5.x to 6.x
2+
3+
Upgrading from v5 should be straightforward.
4+
Prior to upgrading to v6.0.0 upgrade to v5.7.0 and stop using all deprecated features.
5+
Some features will log a deprecation warning.
6+
7+
See also:
8+
- [Cucumber Scala CHANGELOG](../CHANGELOG.md)
9+
- [Cucumber JVM CHANGELOG](https://github.com/cucumber/cucumber-jvm/blob/master/CHANGELOG.md)
10+
- [Cucumber JVM v6 Release Notes](https://github.com/cucumber/cucumber-jvm/blob/master/release-notes/v6.0.0.md)
11+
12+
## Map DataTables to Scala types
13+
14+
You can now map `DataTable`s to Scala collection types using additional `asScalaXxx` methods on the `DataTable` class.
15+
16+
**The benefit of using Scala types** if that you will be handling `Option`s instead of potentially `null` values in the Java collections.
17+
18+
For instance with `asScalaMaps`:
19+
20+
```scala
21+
import io.cucumber.scala.{ScalaDsl, EN}
22+
import io.cucumber.scala.Implicits._
23+
24+
class StepDefs extends ScalaDsl with EN {
25+
26+
Given("the following table as List of Map") { (table: DataTable) =>
27+
val scalaTable: Seq[Map[String, Option[Int]]] = table.asScalaMaps[String, Int]
28+
// Do something
29+
}
30+
31+
}
32+
```
33+
34+
See the [DataTable documentation](./datatables.md) for more details.

examples/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>io.cucumber</groupId>
66
<artifactId>cucumber-jvm-scala</artifactId>
7-
<version>5.7.1-SNAPSHOT</version>
7+
<version>6.0.0-SNAPSHOT</version>
88
</parent>
99

1010
<artifactId>scala-examples</artifactId>

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
22
<modelVersion>4.0.0</modelVersion>
33
<artifactId>cucumber-jvm-scala</artifactId>
4-
<version>5.7.1-SNAPSHOT</version>
4+
<version>6.0.0-SNAPSHOT</version>
55
<packaging>pom</packaging>
66
<name>Cucumber-JVM: Scala</name>
77
<description>Cucumber for Scala</description>
@@ -21,10 +21,10 @@
2121
<outputDirectory>${project.build.directory}</outputDirectory>
2222
<scala-maven-plugin.version>3.4.6</scala-maven-plugin.version>
2323
<build-helper-maven-plugin.version>3.1.0</build-helper-maven-plugin.version>
24-
<cucumber.version>5.7.0</cucumber.version>
24+
<cucumber.version>6.0.0</cucumber.version>
2525
<gherkin.version>9.2.0</gherkin.version>
2626
<groovy.version>2.4.19</groovy.version>
27-
<jackson-databind.version>2.10.3</jackson-databind.version>
27+
<jackson-databind.version>2.11.0</jackson-databind.version>
2828
<junit.version>4.13</junit.version>
2929
<scala.2.11.version>2.11.12</scala.2.11.version>
3030
<scala.2.12.version>2.12.11</scala.2.12.version>

scala/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>io.cucumber</groupId>
66
<artifactId>cucumber-jvm-scala</artifactId>
7-
<version>5.7.1-SNAPSHOT</version>
7+
<version>6.0.0-SNAPSHOT</version>
88
</parent>
99

1010
<artifactId>cucumber-scala-aggregator</artifactId>

scala/scala_2.11/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>io.cucumber</groupId>
66
<artifactId>cucumber-scala-aggregator</artifactId>
7-
<version>5.7.1-SNAPSHOT</version>
7+
<version>6.0.0-SNAPSHOT</version>
88
</parent>
99

1010
<artifactId>cucumber-scala_2.11</artifactId>

scala/scala_2.12/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>io.cucumber</groupId>
66
<artifactId>cucumber-scala-aggregator</artifactId>
7-
<version>5.7.1-SNAPSHOT</version>
7+
<version>6.0.0-SNAPSHOT</version>
88
</parent>
99

1010
<artifactId>cucumber-scala_2.12</artifactId>

scala/scala_2.13/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>io.cucumber</groupId>
66
<artifactId>cucumber-scala-aggregator</artifactId>
7-
<version>5.7.1-SNAPSHOT</version>
7+
<version>6.0.0-SNAPSHOT</version>
88
</parent>
99

1010
<artifactId>cucumber-scala_2.13</artifactId>

0 commit comments

Comments
 (0)