Permalink
Browse files

[breaking] shell - using static classes for deps command's subcommands

  • Loading branch information...
fcamblor committed Aug 25, 2017
1 parent 90d4ec1 commit 489961d78687e283858f429d74d122ce2f1417f3
@@ -305,7 +305,7 @@ public void run(RestxShell shell) throws Exception {
"You can always install the deps later by using the `deps install` command\n" +
"and run the app with the `app run` command")) {
shell.println("restx> deps install");
new DepsShellCommand().new InstallDepsCommandRunner().run(shell);
new DepsShellCommand.InstallDepsCommandRunner().run(shell);
shell.println("restx> app run");
new RunAppCommandRunner(Collections.<String>emptyList()).run(shell);
}
@@ -632,7 +632,7 @@ public void run(final RestxShell shell) throws Exception {
if (!DepsShellCommand.depsUpToDate(shell)) {
shell.println("restx> deps install");
new DepsShellCommand().new InstallDepsCommandRunner().run(shell);
new DepsShellCommand.InstallDepsCommandRunner().run(shell);
}
List<String> vmOptions = new ArrayList<>(this.vmOptions);
@@ -67,7 +67,7 @@ protected String resourceMan() {
new StringsCompleter("deps"), new StringsCompleter("install", "add")));
}
public class InstallDepsCommandRunner implements ShellCommandRunner {
public static class InstallDepsCommandRunner implements ShellCommandRunner {
@Override
public void run(RestxShell shell) throws Exception {
@@ -111,7 +111,7 @@ private void installDepsFromModuleDescriptor(RestxShell shell, File mdFile) thro
}
}
class AddDepsCommandRunner implements ShellCommandRunner {
static class AddDepsCommandRunner implements ShellCommandRunner {
private final String scope;
private Optional<List<String>> pluginIds;
@@ -104,7 +104,7 @@ public void run(final RestxShell shell) throws Exception {
if (!DepsShellCommand.depsUpToDate(shell)) {
shell.println("restx> deps install");
new DepsShellCommand().new InstallDepsCommandRunner().run(shell);
new DepsShellCommand.InstallDepsCommandRunner().run(shell);
}
new ShellAppRunner(appSettings, "restx.tests.RestxSpecTestServer",

0 comments on commit 489961d

Please sign in to comment.