You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@batchee.apache.org by rm...@apache.org on 2015/12/02 17:47:08 UTC
incubator-batchee git commit: Some header for cli help make it more
human friendly probably?
Repository: incubator-batchee
Updated Branches:
refs/heads/master d24d2ef09 -> bfb6535e4
Some header for cli help make it more human friendly probably?
Project: http://git-wip-us.apache.org/repos/asf/incubator-batchee/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-batchee/commit/bfb6535e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-batchee/tree/bfb6535e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-batchee/diff/bfb6535e
Branch: refs/heads/master
Commit: bfb6535e40fad4c365196f78ec9c0a4a72f18036
Parents: d24d2ef
Author: Romain Manni-Bucau <rm...@gmail.com>
Authored: Wed Dec 2 17:46:59 2015 +0100
Committer: Romain Manni-Bucau <rm...@gmail.com>
Committed: Wed Dec 2 17:46:59 2015 +0100
----------------------------------------------------------------------
tools/cli/src/main/java/org/apache/batchee/cli/BatchEECLI.java | 5 +++--
tools/cli/src/test/java/org/apache/batchee/cli/MainTest.java | 1 +
2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/bfb6535e/tools/cli/src/main/java/org/apache/batchee/cli/BatchEECLI.java
----------------------------------------------------------------------
diff --git a/tools/cli/src/main/java/org/apache/batchee/cli/BatchEECLI.java b/tools/cli/src/main/java/org/apache/batchee/cli/BatchEECLI.java
index 6fb656e..4ebb4eb 100644
--- a/tools/cli/src/main/java/org/apache/batchee/cli/BatchEECLI.java
+++ b/tools/cli/src/main/java/org/apache/batchee/cli/BatchEECLI.java
@@ -210,7 +210,8 @@ public class BatchEECLI {
}
private static String help(final Map<String, Class<? extends Runnable>> commands) {
- final StringBuilder builder = new StringBuilder();
+ final String ln = System.getProperty("line.separator");
+ final StringBuilder builder = new StringBuilder("Available commands:").append(ln).append(ln);
for (final Map.Entry<String, Class<? extends Runnable>> cmd : commands.entrySet()) {
final Command c = cmd.getValue().getAnnotation(Command.class);
if (c == null) {
@@ -220,7 +221,7 @@ public class BatchEECLI {
if (!c.description().isEmpty()) {
builder.append(": ").append(c.description());
}
- builder.append(System.getProperty("line.separator"));
+ builder.append(ln);
}
return builder.toString();
}
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/bfb6535e/tools/cli/src/test/java/org/apache/batchee/cli/MainTest.java
----------------------------------------------------------------------
diff --git a/tools/cli/src/test/java/org/apache/batchee/cli/MainTest.java b/tools/cli/src/test/java/org/apache/batchee/cli/MainTest.java
index 957ab3b..84eadc3 100644
--- a/tools/cli/src/test/java/org/apache/batchee/cli/MainTest.java
+++ b/tools/cli/src/test/java/org/apache/batchee/cli/MainTest.java
@@ -46,6 +46,7 @@ public class MainTest {
public void argHelp() {
main(null);
assertEquals(
+ "Available commands:\n\n" +
"abandon: abandon a batch from its id\n" +
"evict: remove old data, uses embedded configuration (no JAXRS support yet)\n" +
"executions: list executions\n" +