lib/hanami/cli/commands/command.rb in hanami-1.3.3 vs lib/hanami/cli/commands/command.rb in hanami-1.3.4
- old
+ new
@@ -1,9 +1,9 @@
require 'hanami'
require 'hanami/environment'
require 'hanami/components'
-require 'hanami/cli/command'
+require 'dry/cli/command'
require 'hanami/cli/commands/project'
require 'hanami/cli/commands/templates'
require 'concurrent'
require 'hanami/utils/files'
require 'erb'
@@ -15,11 +15,11 @@
class CLI
module Commands
# Abstract command
#
# @since 1.1.0
- class Command < Hanami::CLI::Command
+ class Command < Dry::CLI::Command
# @since 1.1.0
# @api private
def self.inherited(component)
super
@@ -80,22 +80,20 @@
requirements.resolve(self.class.requirements)
options = environment.to_options.merge(options)
end
- super(options)
+ super(**options)
rescue StandardError => e
warn e.message
warn e.backtrace.join("\n\t")
exit(1)
end
end
# @since 1.1.0
# @api private
- def initialize(command_name:, out: $stdout, files: Utils::Files)
- super(command_name: command_name)
-
+ def initialize(out: $stdout, files: Utils::Files)
@out = out
@files = files
@templates = Templates.new(self.class)
end