Sha256: 3a9050614645fdd2589dcaaa5e9e10ebffa6647a8578cddf0b4e18f304148437
Contents?: true
Size: 544 Bytes
Versions: 5
Compression:
Stored size: 544 Bytes
Contents
module Daemons module Rails class Controller attr_reader :path, :app_name def initialize(controller_path) @path = controller_path @app_name = "#{controller_path.basename.to_s[0..-'_ctrl'.length]}.rb" end def run(command) `#{path} #{command}` end def start run('start') end def stop run('stop') end def status run('status').to_s.split("\n").last =~ /: running \[pid \d+\]$/ ? :running : :not_exists end end end end
Version data entries
5 entries across 5 versions & 1 rubygems