Skip to content

Commit

Permalink
[breaking] shell - using static classes for deps command's subcommands
Browse files Browse the repository at this point in the history
  • Loading branch information
fcamblor committed Aug 27, 2017
1 parent 90d4ec1 commit 489961d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
Expand Down
Expand Up @@ -67,7 +67,7 @@ public Iterable<Completer> getCompleters() {
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 {
Expand Down Expand Up @@ -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;

Expand Down
Expand Up @@ -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",
Expand Down

0 comments on commit 489961d

Please sign in to comment.