Skip to content

Commit cd1ac50

Browse files
committed
Update numbered param types - internal
1 parent 9b1e9bd commit cd1ac50

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,5 @@ usage: assertthat-bdd-standalone-1.6.jar
4343
-u,--proxyUsername <USERNAME> Proxy username
4444
-x,--proxyURI <URI> Proxy URI
4545
-l,--jiraServerUrl <URI> Jira Server URL
46+
-d,--numbered <true|false> Prepend ordinal to feature name (default is true)
4647
```

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>com.assertthat.plugins</groupId>
77
<artifactId>assertthat-bdd-standalone</artifactId>
8-
<version>1.9.1</version>
8+
<version>1.9.2</version>
99
<name>assertthat-bdd-standalone</name>
1010
<description>AssertThat BDD Jira plugin client standalone</description>
1111
<url>http://www.assertthat.com</url>

src/main/java/com/assertthat/plugins/api/Main.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,9 @@ public static void main(String[] args) throws IOException, JSONException {
123123
Option featuresOption = new Option("f", "features", false, "Download features");
124124
featuresOption.setRequired(false);
125125

126-
Option numberedOption = new Option("d", "numbered", false, "Prepend ordinal to feature name");
126+
Option numberedOption = new Option("d", "numbered", true, "Prepend ordinal to feature name (default is true)");
127127
numberedOption.setRequired(false);
128+
numberedOption.setArgName("true|false");
128129
options.addOption(numberedOption);
129130

130131
Option reportOption = new Option("r", "report", false, "Upload report");
@@ -174,7 +175,7 @@ public static void main(String[] args) throws IOException, JSONException {
174175
cmd.getOptionValue("tags"),
175176
cmd.getOptionValue("type"),
176177
cmd.getOptionValue("jiraServerUrl"),
177-
cmd.hasOption("numbered")
178+
cmd.getOptionValue("numbered")
178179
);
179180

180181
APIUtil apiUtil = new APIUtil(arguments.getProjectId(), arguments.getAccessKey(), arguments.getSecretKey(), arguments.getProxyURI(), arguments.getProxyUsername(), arguments.getProxyPassword(), arguments.getJiraServerUrl());

src/main/java/com/assertthat/plugins/internal/Arguments.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public Arguments(String accessKey,
6060
String tags,
6161
String type,
6262
String jiraServerUrl,
63-
boolean numbered) {
63+
String numbered) {
6464
this.accessKey = System.getenv("ASSERTTHAT_ACCESS_KEY");
6565
this.secretKey = System.getenv("ASSERTTHAT_SECRET_KEY");
6666
if (accessKey != null && !accessKey.trim().isEmpty()) {
@@ -78,7 +78,7 @@ public Arguments(String accessKey,
7878
this.proxyPassword = proxyPassword;
7979
this.proxyUsername = proxyUsername;
8080
this.jiraServerUrl = jiraServerUrl;
81-
this.numbered = numbered;
81+
this.numbered = numbered == null || numbered.equals("true");
8282

8383
if (runName != null) {
8484
this.runName = runName;
@@ -116,12 +116,13 @@ public Arguments(String accessKey,
116116
String type,
117117
String jiraServerUrl,
118118
String metadata,
119-
boolean numbered) {
120-
this(accessKey,secretKey ,projectId,runName,outputFolder,jsonReportFolder,jsonReportIncludePattern,proxyURI,proxyUsername,proxyPassword,mode,jql,tags,type,jiraServerUrl, numbered);
119+
String numbered) {
120+
this(accessKey, secretKey, projectId, runName, outputFolder, jsonReportFolder, jsonReportIncludePattern, proxyURI, proxyUsername, proxyPassword, mode, jql, tags, type, jiraServerUrl, numbered);
121121
this.metadata = metadata;
122122

123123

124124
}
125+
125126
public String getMetadata() {
126127
return metadata;
127128
}

0 commit comments

Comments
 (0)