Class: Yadecli::Cli::Composer
- Inherits:
-
Thor
- Object
- Thor
- Yadecli::Cli::Composer
- Defined in:
- lib/yadecli/cli/composer.rb
Overview
composer
Instance Method Summary collapse
- #install(project_name, branch_name = nil) ⇒ Object
- #list ⇒ Object
- #log(project_name, service_name) ⇒ Object
- #setup ⇒ Object
- #start(project_name, service_name) ⇒ Object
- #stop(project_name, service_name) ⇒ Object
- #switch(project_name, target_branch) ⇒ Object
- #uninstall(project_name) ⇒ Object
Instance Method Details
#install(project_name, branch_name = nil) ⇒ Object
44 45 46 47 48 49 50 51 52 |
# File 'lib/yadecli/cli/composer.rb', line 44 def install(project_name, branch_name = nil) CliUtil.print_header('YadeCli Composer Install', ["Going to install Yade composer project #{project_name}", '']) outcome = Yadecli::Command::Composer::ComposerInstallCommand.run(project_name: project_name, branch_name: branch_name, options: ) CliUtil.print_command_outcome(outcome) end |
#list ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/yadecli/cli/composer.rb', line 24 def list CliUtil.print_header('YadeCli Composer List', ['This are the available Yade composer projects you can install', '']) outcome = Yadecli::Command::Composer::ComposerListCommand.run CliUtil.print_command_outcome(outcome) puts '' puts 'You can install any of the listed project with the following command:' puts '' puts ' bin/yadecli composer install <name> <branch> [--pull] [--setup] [--clean]'.colorize(:mode => :bold) puts '' end |
#log(project_name, service_name) ⇒ Object
112 113 114 115 116 117 118 119 120 121 |
# File 'lib/yadecli/cli/composer.rb', line 112 def log(project_name, service_name) CliUtil.print_header('Composer Service Log',["Going to show logs for composer service #{service_name}.", 'Hit ctrl + c to stop when you use the -f option']) outcome = Yadecli::Command::Composer::ComposerLogCommand.run(project_name: project_name, service_name: service_name, options: ) CliUtil.print_command_outcome(outcome) end |
#setup ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/yadecli/cli/composer.rb', line 13 def setup CliUtil.print_header('YadeCli Composer Setup', ['Answer the following questions to setup Composer on this host:', '']) outcome = Yadecli::Command::Composer::ComposerSetupCommand.run CliUtil.print_command_outcome(outcome) end |
#start(project_name, service_name) ⇒ Object
81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/yadecli/cli/composer.rb', line 81 def start(project_name, service_name) CliUtil.print_header('YadeCli Composer Start', ['Going to start composer service:', " ↳ Composer Project : #{project_name}", " ↳ Service Name : #{service_name}"]) outcome = Yadecli::Command::Composer::ComposerStartCommand.run(project_name: project_name, service_name: service_name, options: ) CliUtil.print_command_outcome(outcome) end |
#stop(project_name, service_name) ⇒ Object
97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/yadecli/cli/composer.rb', line 97 def stop(project_name, service_name) CliUtil.print_header('Composer Service Stop',['Going to stop composer service:', " ↳ Composer Project : #{project_name}", " ↳ Service Name : #{service_name}"]) outcome = Yadecli::Command::Composer::ComposerStopCommand.run(project_name: project_name, service_name: service_name, options: ) CliUtil.print_command_outcome(outcome) end |
#switch(project_name, target_branch) ⇒ Object
57 58 59 60 61 62 63 64 65 |
# File 'lib/yadecli/cli/composer.rb', line 57 def switch(project_name, target_branch) CliUtil.print_header('Composer Switch', ["Going to switch branch of composer project #{project_name} to #{target_branch}", '']) outcome = Yadecli::Command::Composer::ComposerSwitchCommand.run(project_name: project_name, target_branch: target_branch, options: ) CliUtil.print_command_outcome(outcome) end |
#uninstall(project_name) ⇒ Object
70 71 72 73 74 75 76 77 |
# File 'lib/yadecli/cli/composer.rb', line 70 def uninstall(project_name) CliUtil.print_header('YadeCli Composer Uninstall', ["Going to uninstall composer project #{project_name}", '']) outcome = Yadecli::Command::Composer::ComposerUninstallCommand.run(project_name: project_name, options: ) CliUtil.print_command_outcome(outcome) end |