From 37a0a98e9d2ab36169d4ffef440f31f294830a8c Mon Sep 17 00:00:00 2001 From: reidspencer Date: Sun, 25 Aug 2024 06:21:58 -0400 Subject: [PATCH] Remove Plugin Cruft --- .../services/com.ossuminc.riddl.command.CommandPlugin | 0 ...nputFileCommandPlugin.scala => InputFileCommand.scala} | 8 ++++---- 2 files changed, 4 insertions(+), 4 deletions(-) delete mode 100644 command/src/main/resources/META-INF/services/com.ossuminc.riddl.command.CommandPlugin rename command/src/main/scala/com/ossuminc/riddl/command/{InputFileCommandPlugin.scala => InputFileCommand.scala} (83%) diff --git a/command/src/main/resources/META-INF/services/com.ossuminc.riddl.command.CommandPlugin b/command/src/main/resources/META-INF/services/com.ossuminc.riddl.command.CommandPlugin deleted file mode 100644 index e69de29bb..000000000 diff --git a/command/src/main/scala/com/ossuminc/riddl/command/InputFileCommandPlugin.scala b/command/src/main/scala/com/ossuminc/riddl/command/InputFileCommand.scala similarity index 83% rename from command/src/main/scala/com/ossuminc/riddl/command/InputFileCommandPlugin.scala rename to command/src/main/scala/com/ossuminc/riddl/command/InputFileCommand.scala index 25de941c9..626a3a94c 100644 --- a/command/src/main/scala/com/ossuminc/riddl/command/InputFileCommandPlugin.scala +++ b/command/src/main/scala/com/ossuminc/riddl/command/InputFileCommand.scala @@ -13,7 +13,7 @@ import scopt.OParser import java.io.File import java.nio.file.Path -object InputFileCommandPlugin { +object InputFileCommand { case class Options(inputFile: Option[Path] = None, command: String = "unspecified") extends CommandOptions } @@ -21,13 +21,13 @@ object InputFileCommandPlugin { * @param name * The name of the command */ -abstract class InputFileCommandPlugin(name: String) extends Command[InputFileCommandPlugin.Options](name) { - import InputFileCommandPlugin.Options +abstract class InputFileCommand(name: String) extends Command[InputFileCommand.Options](name) { + import InputFileCommand.Options def getOptions: (OParser[Unit, Options], Options) = { import builder.* cmd(name).children( arg[File]("input-file").action((f, opt) => opt.copy(command = name, inputFile = Some(f.toPath))) - ) -> InputFileCommandPlugin.Options() + ) -> InputFileCommand.Options() } override def getConfigReader: ConfigReader[Options] = { (cur: ConfigCursor) =>