Class: Appfront::Command::Help

Inherits:
Base
  • Object
show all
Defined in:
lib/appfront/command/help.rb

Class Method Summary collapse

Class Method Details

.clustersObject



30
31
32
33
34
35
36
37
38
39
# File 'lib/appfront/command/help.rb', line 30

def self.clusters
  puts <<-HELP
Clusters commands:

clusters:create -p [provider] [NAME] [type] [region]    # create a new cluster
clusters:rm                                             # permanently destroy a cluster
clusters:info                                           # show detailed cluster information
clusters:list                                           # show clusters list
  HELP
end

.deploysObject



19
20
21
22
23
24
25
26
27
28
# File 'lib/appfront/command/help.rb', line 19

def self.deploys
  puts <<-HELP
Deploys commands:

deploys:create [NAME]      # create a new deploy
deploys:destroy            # permanently destroy an deploy
deploys:info               # show detailed deploy information
deploys:list               # show deploys list
  HELP
end

.method_missing(m, *args, &block) ⇒ Object



62
63
64
65
66
67
# File 'lib/appfront/command/help.rb', line 62

def self.method_missing(m, *args, &block)
  unless self.respond_to? m
    puts "Invalid command: #{m}"
    exit 1
  end
end

.providersObject



41
42
43
44
45
46
47
48
# File 'lib/appfront/command/help.rb', line 41

def self.providers
  puts <<-HELP
Providers commands:

providers:connect -p [amazon|digitalocean] -a access_key  -s secret_key       # connect to the choosen provider
providers:disconnect                                                          # disconnect from provider
  HELP
end

.psObject



51
52
53
54
55
56
57
58
59
60
# File 'lib/appfront/command/help.rb', line 51

def self.ps
  puts <<-HELP
PS commands:

ps:resize  web=TIER                     #  resize dot to the given tier
ps:scale   web=N [mode=scaling|manual]  #  scale dots by the given amount
ps:stop                                 #  stop all dots
ps:reload                               #  restart all dots
  HELP
end

.root_helpObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/appfront/command/help.rb', line 2

def self.root_help
  puts <<-HELP
Usage: appfront COMMAND [-d DEPLOY] [command-specific-options]

Primary help topics, type "appfront help TOPIC" for more details:

deploys      #  manage deploys
clusters   #  manage clusters
providers  #  manager connection with Amazon or DigitalOcean

Additional topics:

help         #  list commands and display help
version      #  display version
  HELP
end