module RuboCop::Server
The bootstrap module for server. @api private
Constants
- TIMEOUT
Public Class Methods
running?()
click to toggle source
# File lib/rubocop/server.rb, line 33 def running? return false unless support_server? # Never running. Cache.pid_running? end
support_server?()
click to toggle source
# File lib/rubocop/server.rb, line 29 def support_server? RUBY_ENGINE == 'ruby' && !RuboCop::Platform.windows? end
wait_for_running_status!(expected)
click to toggle source
# File lib/rubocop/server.rb, line 39 def wait_for_running_status!(expected) start_time = Time.now while Server.running? != expected sleep 0.1 next unless Time.now - start_time > TIMEOUT warn "running? was not #{expected} after #{TIMEOUT} seconds!" exit 1 end end