File tree 3 files changed +15
-2
lines changed
main/java/io/cucumber/cienvironment
3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
6
6
and this project adheres to [ Semantic Versioning] ( http://semver.org/ ) .
7
7
8
8
## [ Unreleased]
9
+ ### Fixed
10
+ - [ Java] Make ` DetectCiEnvironment.detectCiEnvironment ` public
9
11
10
12
## [ 9.0.3] - 2022-03-04
11
13
### Fixed
Original file line number Diff line number Diff line change @@ -7,7 +7,14 @@ public final class DetectCiEnvironment {
7
7
private DetectCiEnvironment () {
8
8
}
9
9
10
- static Optional <CiEnvironment > detectCiEnvironment (Map <String , String > env ) {
10
+ /**
11
+ * Detects the ci system currently in use based on well known environment
12
+ * variables.
13
+ *
14
+ * @param env the environment variables (e.g {@code System.getenv()}
15
+ * @return the detected ci system
16
+ */
17
+ public static Optional <CiEnvironment > detectCiEnvironment (Map <String , String > env ) {
11
18
return CiEnvironments .TEMPLATES .stream ()
12
19
.map (ciEnvironment -> ciEnvironment .detect (env ))
13
20
.filter (Optional ::isPresent )
Original file line number Diff line number Diff line change 1
- package io .cucumber .cienvironment ;
1
+ package io .cucumber ;
2
+
3
+ import io .cucumber .cienvironment .CiEnvironment ;
4
+
5
+ import java .util .Optional ;
2
6
3
7
import static io .cucumber .cienvironment .DetectCiEnvironment .detectCiEnvironment ;
4
8
You can’t perform that action at this time.
0 commit comments