Module: Fanforce::CLI::Help

Extended by:
Help
Included in:
Help
Defined in:
lib/fanforce/cli/help.rb

Instance Method Summary collapse

Instance Method Details

#bundle_commandObject



68
69
70
71
# File 'lib/fanforce/cli/help.rb', line 68

def bundle_command; "bundle     install|update                           Run bundle on all apps in current fanforce\n"
end

#cleanorgs_commandObject



94
95
96
97
# File 'lib/fanforce/cli/help.rb', line 94

def cleanorgs_command; "cleanorgs  environment   supercore_api_key          Remove installs that are no longer valid in the db\n"
end

#commands(allowed_commands) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/fanforce/cli/help.rb', line 9

def commands(allowed_commands)
  response  = "\n\nAVAILABLE COMMANDS...\n-----------------------------------------------------------------------------------------------------------------------\n"
  commands  = allowed_commands.inject([]) do |results, c|
    results << self.send(:"#{c}_command") rescue next results
  end
  response += commands.join("-----------------------------------------------------------------------------------------------------------------------\n")
  response += "-----------------------------------------------------------------------------------------------------------------------\n\n"
end

#config_commandObject



89
90
91
92
# File 'lib/fanforce/cli/help.rb', line 89

def config_command; "config                                              Display your Fanforce CLI config in the current directory\n"
end

#count_commandObject



63
64
65
66
# File 'lib/fanforce/cli/help.rb', line 63

def count_command; "count                                               Display the number of fanforce apps in the current directory\n"
end

#create_commandObject



29
30
31
32
# File 'lib/fanforce/cli/help.rb', line 29

def create_command; "create     app-ID                                   Creates a new app folder and sets up the file structure\n"
end

#delete_commandObject



34
35
36
37
# File 'lib/fanforce/cli/help.rb', line 34

def delete_command; "delete     app-ID                                   Delete the app folder and all related services\n"
end

#for(command, allowed_commands) ⇒ Object



18
19
20
21
22
# File 'lib/fanforce/cli/help.rb', line 18

def for(command, allowed_commands)
  response  = "\n#{command.to_s.upcase} COMMAND...\n-----------------------------------------------------------------------------------------------------------------------\n"
  response += self.method("#{command}_command").call
  response += "-----------------------------------------------------------------------------------------------------------------------\n\n"
end

#git_commandObject



73
74
75
76
77
# File 'lib/fanforce/cli/help.rb', line 73

def git_command; "git        [ANY GIT COMMAND]                        Run the same git command across all apps in current fanforce\ngit        status:overview                          A custom git command that displays a simple status for each app\n"
end

#intro(executable, runtype) ⇒ Object



4
5
6
7
# File 'lib/fanforce/cli/help.rb', line 4

def intro(executable, runtype)
  response  = "-----------------------------------------------------------------------------------------------------------------------\n"
  response += "USAGE: #{executable} <command>\n"
end

#iron_commandObject



79
80
81
82
# File 'lib/fanforce/cli/help.rb', line 79

def iron_command; "iron       upload|reset|delete    RACK_ENV|all      Updates env variables and upload one or more workers to iron.io\n"
end

#list_commandObject



24
25
26
27
# File 'lib/fanforce/cli/help.rb', line 24

def list_command; "list                                                Show a list of all apps in the current directory\n"
end

#push_commandObject



49
50
51
52
53
54
55
56
# File 'lib/fanforce/cli/help.rb', line 49

def push_command; "push       RACK_ENV       all|OR...                 Push all changes to the environment specified\n                           |env                   Update environment vars in remote environments\n                           |bitbucket             Push the latest commit to bitbucket\n                           |heroku                Push the latest commit to heroku and restart\n                           |iron                  Push changes to workers\n"
end

#restart_commandObject



58
59
60
61
# File 'lib/fanforce/cli/help.rb', line 58

def restart_command; "restart    [*development|RACK_ENV|all]              Runs `touch tmp/restart` if development or else `heroku restart`\n"
end

#update_commandObject



39
40
41
42
43
44
45
46
47
# File 'lib/fanforce/cli/help.rb', line 39

def update_command; "update     all|OR...                                Similar to the create command, except it updates existing files\n            |files                                Ensure all files exist and contain correct config\n            |bundle                               Run bundle install\n            |pow                                  Ensure correct pow domains are configured\n            |git                                  Ensure git is initialized\n            |env                                  Update ENV variables\n"
end

#version_commandObject



84
85
86
87
# File 'lib/fanforce/cli/help.rb', line 84

def version_command; "version                                             Display your current Fanforce CLI version number\n"
end