Rsense does not start before the first request for autcompletion is made, and
rsense only starts if not already started by this instance of ruby-autcompletion
Test specs for starting and stopping rsense
This implementation of rsense autostart does not keep track of multiple instances of autocomplete-ruby, which means if a second atom windows is launched, rsense restarts. If two atom windows are open with autocomplete-ruby and one of them is closed, rsense stops.
This implementation tries to stop any "lingering" rsense servers before starting any, this is neccessary because if any rsense server is running and someone calls "rsense start", a second instance is launched without a PID file, clogging up the system.
Side note:
It would be useful if we could spawn multiple instances of rsense, with their own PID files, or something like that, but that is for the rsense repo, not this. Or perhaps a command to check if rsense is already running.
Added:
This implementation of rsense autostart does not keep track of multiple instances of autocomplete-ruby, which means if a second atom windows is launched, rsense restarts. If two atom windows are open with autocomplete-ruby and one of them is closed, rsense stops.
This implementation tries to stop any "lingering" rsense servers before starting any, this is neccessary because if any rsense server is running and someone calls "rsense start", a second instance is launched without a PID file, clogging up the system.
Side note: It would be useful if we could spawn multiple instances of rsense, with their own PID files, or something like that, but that is for the rsense repo, not this. Or perhaps a command to check if rsense is already running.