Class: NSISam::FakeServerManager
- Inherits:
-
Object
- Object
- NSISam::FakeServerManager
- Defined in:
- lib/nsisam/fake_server.rb
Instance Method Summary collapse
-
#start_server(port = 8888) ⇒ Object
Start the SAM fake server.
-
#stop_server ⇒ Object
Stop the SAM fake server.
Instance Method Details
#start_server(port = 8888) ⇒ Object
Start the SAM fake server
65 66 67 68 69 70 71 |
# File 'lib/nsisam/fake_server.rb', line 65 def start_server(port=8888) @thread = Thread.new do Server.run! :port => port end sleep(1) self end |
#stop_server ⇒ Object
Stop the SAM fake server
74 75 76 77 |
# File 'lib/nsisam/fake_server.rb', line 74 def stop_server @thread.kill self end |