lib/mikoshi/cli.rb in mikoshi-0.6.1 vs lib/mikoshi/cli.rb in mikoshi-0.7.0
- old
+ new
@@ -1,11 +1,11 @@
# frozen_string_literal: true
# rubocop: disable Metrics/AbcSize
# rubocop: disable Metrics/ClassLength
-require 'aws-sdk'
+require 'aws-sdk-ecs'
require 'mikoshi/plan'
require 'mikoshi/plan/task_definition'
require 'mikoshi/plan/service'
require 'optparse'
@@ -41,10 +41,12 @@
deploy
when :version
version
when :help
usage
+ else
+ command_is_unkown(command: @options[:command])
end
end
def parse
opt = OptionParser.new
@@ -171,9 +173,13 @@
task_def_name = @options[:config][:group] || @options[:config][:task_definition]
service_name = @options[:config][:group] || @options[:config][:service]
update_task_definition(task_def_name) if task_def_name
update_service(service_name) if service_name
+ end
+
+ def command_is_unkown(command: nil)
+ warn "'#{command}' is unknown command. Please see help by `mikoshi help`."
end
def aws_client
opt =
if @options[:region].nil?