Module: Anycablebility::Cli

Defined in:
lib/anycablebility/cli.rb

Overview

:nodoc:

Class Method Summary collapse

Class Method Details

.runObject

CLI entrypoint



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/anycablebility/cli.rb', line 14

def run
  parse_options!

  ActionCable.server.config.logger = Rails.logger = Anycable.logger

  # Start RPC server (unless specified otherwise, e.g. when
  # we want to test Action Cable itself)
  RPC.start unless @skip_rpc

  # Start webosocket server under test
  Command.run

  # Run tests
  Tests.run ? 0 : 1
ensure
  RPC.stop unless @skip_rpc
  Command.stop
end