Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

print usage when missing subcommand #106

Merged
merged 1 commit into from
Mar 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/3scale_toolbox/commands/3scale_command.rb
Expand Up @@ -6,6 +6,7 @@ module ThreeScaleToolbox
module Commands
module ThreeScaleCommand
include ThreeScaleToolbox::Command

def self.command
Cri::Command.define do
name '3scale'
Expand All @@ -23,6 +24,10 @@ def self.command
puts cmd.help
exit 0
end

run do |_opts, _args, cmd|
puts cmd.help
end
end
end
end
Expand Down
4 changes: 4 additions & 0 deletions lib/3scale_toolbox/commands/copy_command.rb
Expand Up @@ -12,6 +12,10 @@ def self.command
usage 'copy <sub-command> [options]'
summary 'copy super command'
description 'Copy 3scale entities between tenants'

run do |_opts, _args, cmd|
puts cmd.help
end
end
end
add_subcommand(CopyServiceSubcommand)
Expand Down
4 changes: 4 additions & 0 deletions lib/3scale_toolbox/commands/import_command.rb
Expand Up @@ -13,6 +13,10 @@ def self.command
usage 'import <sub-command> [options]'
summary 'import super command'
description 'Importing 3scale entities'

run do |_opts, _args, cmd|
puts cmd.help
end
end
end
add_subcommand(ImportCsvSubcommand)
Expand Down
4 changes: 4 additions & 0 deletions lib/3scale_toolbox/commands/update_command.rb
Expand Up @@ -12,6 +12,10 @@ def self.command
usage 'update <sub-command> [options]'
summary 'update super command'
description 'Update 3scale entities between tenants'

run do |_opts, _args, cmd|
puts cmd.help
end
end
end
add_subcommand(UpdateServiceSubcommand)
Expand Down