Sha256: 69d7ad11c8a039822d973bf5a024458010f0a6cc365bfd4b1504038865d48a6c

Contents?: true

Size: 1.93 KB

Versions: 3

Compression:

Stored size: 1.93 KB

Contents

class VMC::Cli::Runner

  def basic_usage
    "Usage: vmc [options] command [<args>] [command_options]\n" +
    "Try 'vmc help [command]' or 'vmc help options' for more information."
  end

  def display_usage
    if @usage
      say @usage_error if @usage_error
      say "Usage: #{@usage}"
      return
    elsif @verb_usage
      say @verb_usage
      return
    end
    say command_usage
  end

  def command_usage
    <<-USAGE

#{basic_usage}

Currently available vmc commands are:

  Applications
    apps                                         List deployed applications

  Application Creation
    create [appname]                               Create, create, map, and start a new application
    create [appname] --path                        Create application from specified path

  Application Operations
    delete <appname>                             Delete the application
    run <appname> <command>

  Application Updates
    push <appname> [--path]                      Push the application code

  Application Information
    stats <appname>                              Display resource usage for the application

  Services
    services                                     Lists of services available and provisioned
    create-service <service> [--name,--bind]     Create a provisioned service
    create-service <service> <name>              Create a provisioned service and assign it <name>
    create-service <service> <name> <app>        Create a provisioned service and assign it <name>, and bind to <app>
    delete-service [servicename]                 Delete a provisioned service
    bind-service <servicename> <appname>         Bind a service to an application
    unbind-service <servicename> <appname>       Unbind service from the application

  Help
    help [command]                               Get general help or help on a specific command
    help options                                 Get help on available options
USAGE

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
vmc-tsuru-0.3.alpha lib/cli/usage.rb
vmc-tsuru-0.2.alpha lib/cli/usage.rb
vmc-tsuru-0.1.alpha lib/cli/usage.rb