lib/fakeit/app/routes/openapi_route.rb in fakeit-0.10.0 vs lib/fakeit/app/routes/openapi_route.rb in fakeit-0.11.0
- old
+ new
@@ -32,11 +32,10 @@
def headers(request)
request
.each_header
.select { |k, _| k.start_with? 'HTTP_' }
- .map { |k, v| [k.sub(/^HTTP_/, '').split('_').map(&:capitalize).join('-'), v] }
- .to_h
+ .to_h { |k, v| [k.sub(/^HTTP_/, '').split('_').map(&:capitalize).join('-'), v] }
end
def parse_query(query_string)
rack_query = Rack::Utils.parse_nested_query(query_string)
cgi_query = CGI.parse(query_string)