Class: Pact::MockService::CLI
- Inherits:
-
Thor
- Object
- Thor
- Pact::MockService::CLI
- Defined in:
- lib/pact/mock_service/cli.rb,
lib/pact/mock_service/cli/pidfile.rb
Defined Under Namespace
Classes: Pidfile
Constant Summary collapse
- PACT_FILE_WRITE_MODE_DESC =
"`overwrite` or `merge`. Use `merge` when running multiple mock service instances in parallel for the same consumer/provider pair." + " Ensure the pact file is deleted before running tests when using this option so that interactions deleted from the code are not maintained in the file."
Instance Method Summary collapse
- #control ⇒ Object
- #control_restart ⇒ Object
- #control_start ⇒ Object
- #control_stop ⇒ Object
- #restart ⇒ Object
- #service ⇒ Object
- #start ⇒ Object
- #stop ⇒ Object
- #version ⇒ Object
Instance Method Details
#control ⇒ Object
47 48 49 50 |
# File 'lib/pact/mock_service/cli.rb', line 47 def control require 'pact/mock_service/control_server/run' ControlServer::Run.() end |
#control_restart ⇒ Object
140 141 142 143 144 |
# File 'lib/pact/mock_service/cli.rb', line 140 def control_restart restart_server(control_server_pidfile) do control end end |
#control_start ⇒ Object
114 115 116 117 118 |
# File 'lib/pact/mock_service/cli.rb', line 114 def control_start start_server(control_server_pidfile) do control end end |
#control_stop ⇒ Object
124 125 126 |
# File 'lib/pact/mock_service/cli.rb', line 124 def control_stop control_server_pidfile.kill_process end |
#restart ⇒ Object
96 97 98 99 100 |
# File 'lib/pact/mock_service/cli.rb', line 96 def restart restart_server(mock_service_pidfile) do service end end |
#service ⇒ Object
30 31 32 33 |
# File 'lib/pact/mock_service/cli.rb', line 30 def service require 'pact/mock_service/run' Run.() end |
#start ⇒ Object
67 68 69 70 71 |
# File 'lib/pact/mock_service/cli.rb', line 67 def start start_server(mock_service_pidfile) do service end end |
#stop ⇒ Object
77 78 79 |
# File 'lib/pact/mock_service/cli.rb', line 77 def stop mock_service_pidfile.kill_process end |
#version ⇒ Object
148 149 150 151 |
# File 'lib/pact/mock_service/cli.rb', line 148 def version require 'pact/mock_service/version.rb' puts Pact::MockService::VERSION end |