Skip to content

Commit e9ff65a

Browse files
committed
Boolean option
1 parent 25cc8e3 commit e9ff65a

File tree

5 files changed

+20
-5
lines changed

5 files changed

+20
-5
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright {yyyy} {name of copyright owner}
189+
Copyright 2015 Wave Software
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# HTTP/S Java Checker
2+
23
[![Build Status](https://travis-ci.org/wavesoftware/java-https-checker.svg?branch=master)](https://travis-ci.org/wavesoftware/java-https-checker) [![Coverage Status](https://coveralls.io/repos/wavesoftware/java-https-checker/badge.svg?branch=master&service=github)](https://coveralls.io/github/wavesoftware/java-https-checker?branch=master) [![Maven Central](https://img.shields.io/maven-central/v/pl.wavesoftware.utils/https-checker.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22pl.wavesoftware%22%20AND%20a%3A%22https-checker%22)
34

45
HTTP/S Java Checker - It can check is your Java installation can perform connection with given HTTPS address
@@ -8,6 +9,19 @@ HTTP/S Java Checker - It can check is your Java installation can perform connect
89
```bash
910
dpkg -i jhttps-checker_0.8.0.deb
1011
jhttps-checker --help
12+
usage: jhttps-checker [-h] [-q QUIET] [-r MAX_REDIRECTS] address
13+
14+
It can check is your Java installation can perform connection with given HTTPS address
15+
16+
positional arguments:
17+
address Address to be checked
18+
19+
optional arguments:
20+
-h, --help show this help message and exit
21+
-q QUIET, --quiet QUIET
22+
Do not display anything, only retcodes (default: false)
23+
-r MAX_REDIRECTS, --max_redirects MAX_REDIRECTS
24+
Number of redirects to perform at maximum (default: 10)
1125
```
1226

1327
## Maven

src/main/java/pl/wavesoftware/utils/https/checker/cli/Cli.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
*/
2424
public abstract class Cli {
2525

26-
public static final String APP_NAME = "HttpsChecker";
26+
public static final String APP_NAME = "jhttps-checker";
2727

2828
public static final String DESCRIPTION = "It can check is your Java installation can perform connection "
2929
+ "with given HTTPS address";

src/main/java/pl/wavesoftware/utils/https/checker/cli/argsparse4j/Argparse4jParser.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ private void addAddress(ArgumentParser parser, Arguments argument) {
5555

5656
private void addQuiet(ArgumentParser parser, Arguments argument) {
5757
parser.addArgument(argument.config)
58+
.action(net.sourceforge.argparse4j.impl.Arguments.storeTrue())
5859
.setDefault(argument.defaultValue)
5960
.type(argument.type)
6061
.help(argument.help);

src/test/java/pl/wavesoftware/utils/https/checker/HttpsCheckerMainTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,17 @@ public void testDoMain() {
3535
assertNotNull(args);
3636
assertEquals(0, result.retcode());
3737

38-
args = new String[]{"-q", "true", GOOGLE};
38+
args = new String[]{"-q", GOOGLE};
3939
result = HttpsCheckerMain.doMain(args);
4040
assertNotNull(args);
4141
assertEquals(0, result.retcode());
4242

43-
args = new String[]{"-q", "false", "--max_redirects", "3", GOOGLE};
43+
args = new String[]{"-q", "-r", "3", GOOGLE};
4444
result = HttpsCheckerMain.doMain(args);
4545
assertNotNull(args);
4646
assertEquals(0, result.retcode());
4747

48-
args = new String[]{"-quoa!", "false", "--max_redirects", "3"};
48+
args = new String[]{"-quoa!", "--max_redirects", "3"};
4949
result = HttpsCheckerMain.doMain(args);
5050
assertNotNull(args);
5151
assertEquals(Result.result(Cli.Retcodes.INVALID_ARGS).retcode(), result.retcode());

0 commit comments

Comments
 (0)