lib/pact/mock_service/run.rb in pact-mock_service-2.5.4 vs lib/pact/mock_service/run.rb in pact-mock_service-2.6.0
- old
+ new
@@ -19,10 +19,12 @@
require 'pact/mock_service/app'
trap(:INT) { call_shutdown_hooks }
trap(:TERM) { call_shutdown_hooks }
+ require_monkeypatch
+
Rack::Handler::WEBrick.run(mock_service, webbrick_opts)
end
private
@@ -98,9 +100,13 @@
@host ||= options[:host] || "localhost"
end
def base_url
options[:ssl] ? "https://#{host}:#{port}" : "http://#{host}:#{port}"
+ end
+
+ def require_monkeypatch
+ require options[:monkeypatch] if options[:monkeypatch]
end
end
end
end