Module: Padrino::Cli::Adapter
- Defined in:
- lib/vendored-middleman-deps/padrino-core-0.11.2/lib/padrino-core/cli/adapter.rb
Class Method Summary collapse
-
.start(options) ⇒ Object
Start for the given options a rackup handler.
-
.stop(options) ⇒ Object
Method that stop (if exist) a running Padrino.application.
Class Method Details
.start(options) ⇒ Object
Start for the given options a rackup handler
6 7 8 |
# File 'lib/vendored-middleman-deps/padrino-core-0.11.2/lib/padrino-core/cli/adapter.rb', line 6 def start() Padrino.run!(.symbolize_keys) end |
.stop(options) ⇒ Object
Method that stop (if exist) a running Padrino.application
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/vendored-middleman-deps/padrino-core-0.11.2/lib/padrino-core/cli/adapter.rb', line 11 def stop() .symbolize_keys! if File.exist?([:pid]) pid = File.read([:pid]).to_i print "=> Sending INT to process with pid #{pid} wait " Process.kill(2, pid) rescue nil else puts "=> #{[:pid]} not found!" end end |