lib/pragmater/cli.rb in pragmater-5.0.2 vs lib/pragmater/cli.rb in pragmater-5.1.0

- old
+ new

@@ -11,11 +11,11 @@ include Thor::Actions package_name Identity.version_label def self.configuration - Runcom::Configuration.new project_name: Identity.name, defaults: { + Runcom::Configuration.new Identity.name, defaults: { add: { comments: "", includes: [] }, remove: { @@ -43,11 +43,13 @@ aliases: "-i", desc: "File include list", type: :array, default: configuration.to_h.dig(:add, :includes) def add path = "." - settings = configuration.merge add: {comments: options.comments, includes: options.includes} + settings = configuration.merge( + add: {comments: options.comments, includes: options.includes} + ).to_h runner = Runner.new path, comments: settings.dig(:add, :comments), includes: settings.dig(:add, :includes) @@ -65,13 +67,12 @@ aliases: "-i", desc: "File include list", type: :array, default: configuration.to_h.dig(:remove, :includes) def remove path = "." - settings = configuration.merge remove: { - comments: options.comments, - includes: options.includes - } + settings = configuration.merge( + remove: {comments: options.comments, includes: options.includes} + ).to_h runner = Runner.new path, comments: settings.dig(:remove, :comments), includes: settings.dig(:remove, :includes)