Module: Fanforce::Factory::Help
Instance Method Summary collapse
- #bundle_command ⇒ Object
- #cleanorgs_command ⇒ Object
- #commands(allowed_commands) ⇒ Object
- #config_command ⇒ Object
- #count_command ⇒ Object
- #create_command ⇒ Object
- #delete_command ⇒ Object
- #for(command, allowed_commands) ⇒ Object
- #git_command ⇒ Object
- #intro(executable, runtype) ⇒ Object
- #iron_command ⇒ Object
- #push_command ⇒ Object
- #restart_command ⇒ Object
- #setup_command ⇒ Object
- #update_command ⇒ Object
- #version_command ⇒ Object
Instance Method Details
#bundle_command ⇒ Object
66 67 68 69 |
# File 'lib/fanforce/factory/help.rb', line 66 def bundle_command; "bundle (install|update) Run bundle on all addons in current factory\n" end |
#cleanorgs_command ⇒ Object
92 93 94 95 |
# File 'lib/fanforce/factory/help.rb', line 92 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/factory/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_command ⇒ Object
87 88 89 90 |
# File 'lib/fanforce/factory/help.rb', line 87 def config_command; "config Display your Fanforce Factory config in the current directory\n" end |
#count_command ⇒ Object
61 62 63 64 |
# File 'lib/fanforce/factory/help.rb', line 61 def count_command; "count Display the number of addons in the current factory\n" end |
#create_command ⇒ Object
23 24 25 26 |
# File 'lib/fanforce/factory/help.rb', line 23 def create_command; "create (plugin|widget|app)-ID [PLUGIN_TYPE] Create new addon folder and setup the file structure\n" end |
#delete_command ⇒ Object
33 34 35 36 |
# File 'lib/fanforce/factory/help.rb', line 33 def delete_command; "delete (plugin|widget|app)-ID Delete the addon folder and all related services\n" end |
#for(command, allowed_commands) ⇒ Object
18 19 20 21 |
# File 'lib/fanforce/factory/help.rb', line 18 def for(command, allowed_commands) response = "\n#{command.to_s.upcase} COMMAND...\n-----------------------------------------------------------------------------------------------------------------------\n" response += "-----------------------------------------------------------------------------------------------------------------------\n\n" end |
#git_command ⇒ Object
71 72 73 74 75 |
# File 'lib/fanforce/factory/help.rb', line 71 def git_command; "git [ANY GIT COMMAND] Run the same git command across all addons in current factory\ngit status:overview A custom git command that displays a simple status for each addon\n" end |
#intro(executable, runtype) ⇒ Object
4 5 6 7 |
# File 'lib/fanforce/factory/help.rb', line 4 def intro(executable, runtype) response = "-----------------------------------------------------------------------------------------------------------------------\n" response += "USAGE: #{executable} #{runtype == :single ? '' : '[:filter] '}<command>\n" end |
#iron_command ⇒ Object
77 78 79 80 |
# File 'lib/fanforce/factory/help.rb', line 77 def iron_command; "iron (upload|reset|delete):[*all|RACK_ENV] Updates env variables and upload one or more workers to iron.io\n" end |
#push_command ⇒ Object
53 54 55 56 57 58 59 |
# File 'lib/fanforce/factory/help.rb', line 53 def push_command; "push RACK_ENV:[*all|OR...] Push all changes to the environment specified\n |bitbucket Push the latest commit to bitbucket\n |heroku Push the latest commit to heroku and restart\n |iron:[*upload:nuclear] Push changes to workers\n" end |
#restart_command ⇒ Object
48 49 50 51 |
# File 'lib/fanforce/factory/help.rb', line 48 def restart_command; "restart [*development|RACK_ENV|all] Runs `touch tmp/restart` if development or else `heroku restart`\n" end |
#setup_command ⇒ Object
28 29 30 31 |
# File 'lib/fanforce/factory/help.rb', line 28 def setup_command; "setup (plugin|widget|app)-ID [PLUGIN_TYPE] Similar to the create command, except it uses existing files\n" end |
#update_command ⇒ Object
38 39 40 41 42 43 44 45 46 |
# File 'lib/fanforce/factory/help.rb', line 38 def update_command; "update (all|OR...) Update all items\n |files Create or update needed files\n |env:[*all|RACK_ENV] Update environment vars for a specific environment\n |pow Ensure pow domains are setup for development environment\n |bitbucket Create new repositories in bitbucket and push latest commit\n |heroku:[*all|RACK_ENV] Create new app in heroku account and push latest commit\n" end |
#version_command ⇒ Object
82 83 84 85 |
# File 'lib/fanforce/factory/help.rb', line 82 def version_command; "version Display your current Fanforce Factory version number\n" end |