Skip to content

Commit

Permalink
Merge pull request #106 from 3scale/print-usage-when-missing-subcommand
Browse files Browse the repository at this point in the history
print usage when missing subcommand
  • Loading branch information
eguzki committed Mar 21, 2019
2 parents 4dffc13 + 5cbe39e commit 8e057d8
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/3scale_toolbox/commands/3scale_command.rb
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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

0 comments on commit 8e057d8

Please sign in to comment.