Module: ThreeScaleToolbox::Commands::ThreeScaleCommand
- Includes:
- ThreeScaleToolbox::Command
- Defined in:
- lib/3scale_toolbox/commands/3scale_command.rb
Class Method Summary collapse
Methods included from ThreeScaleToolbox::Command
#config, #config_file, #exit_with_message, #fetch_required_option, included, #remotes, #threescale_client, #verbose, #verify_ssl
Class Method Details
.command ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/3scale_toolbox/commands/3scale_command.rb', line 6 def self.command Cri::Command.define do name '3scale' usage '3scale <sub-command> [options]' summary '3scale toolbox' description '3scale toolbox to manage your API from the terminal.' option :c, 'config-file', '3scale toolbox configuration file', argument: :required, default: ThreeScaleToolbox.default_config_file flag :v, :version, 'Prints the version of this command' do puts ThreeScaleToolbox::VERSION exit 0 end flag :k, :insecure, 'Proceed and operate even for server connections otherwise considered insecure' flag nil, :verbose, 'Verbose mode' flag :h, :help, 'show help for this command' do |_, cmd| puts cmd.help exit 0 end run do |_opts, _args, cmd| puts cmd.help end end end |