Class: Webhookd::CLI
- Inherits:
-
Thor
- Object
- Thor
- Webhookd::CLI
- Includes:
- Thor::Actions
- Defined in:
- lib/webhookd/cli.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/webhookd/cli.rb', line 7 def name @name end |
Instance Method Details
#start(*args) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/webhookd/cli.rb', line 11 def start(*args) port_option = args.include?('-p') ? '' : ' -p 8088' args = args.join(' ') command = "thin -R #{get_rackup_config} start#{port_option} #{args}" command.prepend "export CONFIG_FILE=#{[:config_file]}; " if [:config_file] begin run_command(command) rescue SystemExit, Interrupt puts "Program interrupted" exit end end |
#stop ⇒ Object
25 26 27 28 |
# File 'lib/webhookd/cli.rb', line 25 def stop command = "thin -R #{get_rackup_config} stop" run_command(command) end |