lib/pact/mock_service/run.rb in pact-mock_service-2.9.3 vs lib/pact/mock_service/run.rb in pact-mock_service-2.9.8
- old
+ new
@@ -1,10 +1,11 @@
require 'find_a_port'
require 'pact/mock_service/app'
require 'pact/consumer/mock_service/set_location'
require 'pact/mock_service/run'
require 'pact/mock_service/server/webrick_request_monkeypatch'
+require 'pact/specification_version'
module Pact
module MockService
class Run
@@ -48,17 +49,18 @@
end
end
end
def service_options
+ # dummy pact_specification_version is needed to stop RequestHandlers blowing up
service_options = {
pact_dir: options[:pact_dir],
log_level: options[:log_level],
unique_pact_file_names: options[:unique_pact_file_names],
consumer: options[:consumer],
provider: options[:provider],
cors_enabled: options[:cors],
- pact_specification_version: options[:pact_specification_version],
+ pact_specification_version: Pact::SpecificationVersion::NIL_VERSION.to_s,
pactfile_write_mode: options[:pact_file_write_mode],
stub_pactfile_paths: options[:stub_pactfile_paths]
}
service_options[:log_file] = open_log_file if options[:log]
service_options