Skip to content

Commit

Permalink
chore: support rack 2 and rack 3
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Oct 22, 2023
1 parent 652047c commit c639ecb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/pact/provider/configuration/service_provider_dsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ class ServiceProviderDSL
unless File.exist? Pact.configuration.config_ru_path
raise "Could not find config.ru file at #{Pact.configuration.config_ru_path} Please configure the service provider app or create a config.ru file in the root directory of the project. See https://github.com/pact-foundation/pact-ruby/wiki/Verifying-pacts for more information."
end
Rack::Builder.parse_file(Pact.configuration.config_ru_path)
result = Rack::Builder.parse_file(Pact.configuration.config_ru_path)

if result.respond_to?(:first) # rack 2
result.first
else # rack 3
result
end
}

def initialize name
Expand Down

0 comments on commit c639ecb

Please sign in to comment.