Class: AgileProxy::Servers::RequestSpec
- Inherits:
-
Object
- Object
- AgileProxy::Servers::RequestSpec
- Defined in:
- lib/agile_proxy/servers/request_spec.rb
Overview
The ‘Request Spec’ server This server is responsible for handling or passing through a request, depending on if it has a matching ‘Request Specification’
Class Method Summary collapse
-
.start ⇒ Object
Starts the server.
Instance Method Summary collapse
-
#initialize ⇒ RequestSpec
constructor
A new instance of RequestSpec.
-
#port ⇒ Integer
The port the server is running on.
-
#start ⇒ Object
Starts the server.
Constructor Details
#initialize ⇒ RequestSpec
Returns a new instance of RequestSpec.
16 17 18 |
# File 'lib/agile_proxy/servers/request_spec.rb', line 16 def initialize @request_handler = AgileProxy::RequestHandler.new end |
Class Method Details
.start ⇒ Object
Starts the server
13 14 15 |
# File 'lib/agile_proxy/servers/request_spec.rb', line 13 def self.start new.start end |
Instance Method Details
#port ⇒ Integer
The port the server is running on
34 35 36 |
# File 'lib/agile_proxy/servers/request_spec.rb', line 34 def port return AgileProxy.config.proxy_port end |
#start ⇒ Object
Starts the server
20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/agile_proxy/servers/request_spec.rb', line 20 def start # # The API runner runner = ::Goliath::Proxy::Runner.new([], nil) runner.address = '127.0.0.1' runner.port = AgileProxy.config.proxy_port app = @request_handler runner.app = app runner.run self end |