From 995ae03db29a83e739721d9319ede4421fa7fe47 Mon Sep 17 00:00:00 2001 From: Nic Benders Date: Tue, 2 May 2017 13:48:20 +0200 Subject: [PATCH 1/2] Explicitly set license to MIT in .gemspec (#130) This will help out any tooling that reads the gemspec instead of scanning the contents. --- rack-test.gemspec | 1 + 1 file changed, 1 insertion(+) diff --git a/rack-test.gemspec b/rack-test.gemspec index 6c7cb427..21304f33 100644 --- a/rack-test.gemspec +++ b/rack-test.gemspec @@ -6,6 +6,7 @@ Gem::Specification.new do |s| s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["Bryan Helmkamp"] + s.license = 'MIT' s.date = "2015-01-09" s.description = "Rack::Test is a small, simple testing API for Rack apps. It can be used on its\nown or as a reusable starting point for Web frameworks and testing libraries\nto build on. Most of its initial functionality is an extraction of Merb 1.0's\nrequest helpers feature." s.email = "bryan@brynary.com" From e1b0d73a2e562464b80260f4e2b6e403416b2315 Mon Sep 17 00:00:00 2001 From: Koen Punt Date: Tue, 2 May 2017 13:50:59 +0200 Subject: [PATCH 2/2] Rack::Test::Utils#build_multipart: Allow passing a third parameter to force multipart (#142) --- lib/rack/test/utils.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/rack/test/utils.rb b/lib/rack/test/utils.rb index c5394d4c..0f02ef44 100644 --- a/lib/rack/test/utils.rb +++ b/lib/rack/test/utils.rb @@ -30,13 +30,12 @@ def build_nested_query(value, prefix = nil) end module_function :build_nested_query - def build_multipart(params, first = true) + def build_multipart(params, first = true, multipart = false) if first unless params.is_a?(Hash) raise ArgumentError, "value must be a Hash" end - multipart = false query = lambda { |value| case value when Array