Class: RightDevelop::Testing::Server::MightApi::App::Record

Inherits:
Base
  • Object
show all
Defined in:
lib/right_develop/testing/servers/might_api/app/record.rb

Constant Summary collapse

STATE_FILE_NAME =
'record_state.yml'

Constants inherited from Base

Base::DEFAULT_PROXY_SETTINGS, Base::MAX_REDIRECTS, Base::MUTEX

Instance Attribute Summary

Attributes inherited from Base

#config, #logger, #state_file_path

Instance Method Summary collapse

Methods inherited from Base

app_threads, #call, #cleanup, interrupted=, interrupted?

Constructor Details

#initialize(options = {}) ⇒ Record

Returns a new instance of Record.

See Also:



29
30
31
32
33
# File 'lib/right_develop/testing/servers/might_api/app/record.rb', line 29

def initialize(options = {})
  options = { state_file_name: STATE_FILE_NAME }.merge(options)
  super(options)
  fail "Unexpected mode: #{config.mode}" unless config.mode == :record
end

Instance Method Details

#handle_request(env, verb, uri, headers, body) ⇒ Object



36
37
38
39
40
41
42
43
# File 'lib/right_develop/testing/servers/might_api/app/record.rb', line 36

def handle_request(env, verb, uri, headers, body)
  proxy(
    ::RightDevelop::Testing::Client::Rest::Request::Record,
    verb,
    uri,
    headers,
    body)
end