Skip to content

Commit

Permalink
feat: use Pact::Query.parse_string to parse query string
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Nov 12, 2020
1 parent 3338e80 commit 6cd0733
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/pact/consumer/mock_service/rack_request_helper.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
require 'cgi/core'
require 'pact/consumer_contract/query'

module Pact
module Consumer

Expand All @@ -11,7 +13,7 @@ module RackRequestHelper
}

def params_hash env
CGI::parse env["QUERY_STRING"]
Pact::Query.parse_string(env["QUERY_STRING"])
end

def request_as_hash_from env
Expand Down
2 changes: 1 addition & 1 deletion pact-mock_service.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Gem::Specification.new do |gem|
gem.add_runtime_dependency 'json'
gem.add_runtime_dependency 'webrick', '~> 1.3'
gem.add_runtime_dependency 'term-ansicolor', '~> 1.0'
gem.add_runtime_dependency 'pact-support', '~> 1.12', '>= 1.12.0'
gem.add_runtime_dependency 'pact-support', '~> 1.16', '>= 1.16.4'
gem.add_runtime_dependency 'filelock', '~> 1.1'

gem.add_development_dependency 'rack-test', '~> 0.7'
Expand Down

0 comments on commit 6cd0733

Please sign in to comment.