Sha256: 906308737105d7dcb0169477961370ae5d033f7fb03927fda717d39403a922a0
Contents?: true
Size: 1.27 KB
Versions: 13
Compression:
Stored size: 1.27 KB
Contents
module FaaStRuby module Command class Help < BaseCommand def initialize(args) @args = args end def run puts "FaaStRuby CLI - Manage workspaces and functions hosted at faastruby.io" puts puts "Usage: faastruby [--region REGION, -h, -v] COMMAND ARGS" puts puts 'help, -h, --help # Displays this help' puts '-v # Print version and exit' puts '--region tor1 # Specify a region. "tor1" (default) is the only region available' workspaces = ["Workspaces:"] functions = ["Functions:"] credentials = ["Credentials:"] FaaStRuby::Command::COMMANDS.each do |command, klass| next if command == 'upgrade' next if klass.to_s.match(/.+Command::Help$/) next if klass.to_s.match(/.+Command::Version$/) section = functions if klass.to_s.match(/.+::Function::.+/) section = workspaces if klass.to_s.match(/.+::Workspace::.+/) section = credentials if klass.to_s.match(/.+::Credentials::.+/) section ||= [] section << " #{klass.help}" end puts workspaces puts puts functions puts puts credentials puts end end end end
Version data entries
13 entries across 13 versions & 1 rubygems