http_spew RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
* [PATCH] relax dependency on unicorn
@ 2015-11-21  2:02 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2015-11-21  2:02 UTC (permalink / raw)
  To: http_spew-public

We don't need it for all tests, and certainly don't need a version
pin since we won't use it beyond the command-line interface.
We'll probably switch WEBrick soon, anyways.
---
 http_spew.gemspec                 | 1 -
 test/helper.rb                    | 1 +
 test/test_content_md5.rb          | 2 +-
 test/test_hit_n_run.rb            | 2 +-
 test/test_input_spray_with_md5.rb | 2 +-
 test/test_mirror.rb               | 2 +-
 test/test_request.rb              | 2 +-
 test/test_unexpected_response.rb  | 2 +-
 test/test_upload.rb               | 2 +-
 9 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/http_spew.gemspec b/http_spew.gemspec
index d2daa51..258641a 100644
--- a/http_spew.gemspec
+++ b/http_spew.gemspec
@@ -18,6 +18,5 @@ Gem::Specification.new do |s|
   s.add_dependency(%q<kcar>, [ "~> 0.3", ">= 0.3.1"])
   s.add_dependency(%q<kgio>, "~> 2.6")
   s.add_development_dependency(%q<olddoc>, "~> 1.0")
-  s.add_development_dependency(%q<unicorn>, "~> 4.8")
   s.licenses = %w(GPL-2.0+)
 end
diff --git a/test/helper.rb b/test/helper.rb
index 816e46f..60c4908 100644
--- a/test/helper.rb
+++ b/test/helper.rb
@@ -10,6 +10,7 @@ require "rack"
 require "tempfile"
 $-w = true
 require "http_spew"
+HAVE_UNICORN = `which unicorn 2>/dev/null`.size > 0
 
 def start_server(config, worker_processes = 4, rewindable_input = false)
   ENV["RACK_ENV"] = "deployment"
diff --git a/test/test_content_md5.rb b/test/test_content_md5.rb
index 6bb817f..aade755 100644
--- a/test/test_content_md5.rb
+++ b/test/test_content_md5.rb
@@ -102,4 +102,4 @@ class TestContentMD5 < Test::Unit::TestCase
     assert_equal expect_md5, input.content_md5
     assert_equal 123 * 8 * 1021 * 13, input.bytes_digested
   end
-end
+end if HAVE_UNICORN
diff --git a/test/test_hit_n_run.rb b/test/test_hit_n_run.rb
index 1676426..751a8bf 100644
--- a/test/test_hit_n_run.rb
+++ b/test/test_hit_n_run.rb
@@ -44,4 +44,4 @@ class TestHitNRun < Test::Unit::TestCase
     end
     assert_equal HTTP_Spew::HitNRun::RESPONSE.object_id, rv.object_id
   end
-end
+end if HAVE_UNICORN
diff --git a/test/test_input_spray_with_md5.rb b/test/test_input_spray_with_md5.rb
index 07b1609..1e030e0 100644
--- a/test/test_input_spray_with_md5.rb
+++ b/test/test_input_spray_with_md5.rb
@@ -104,4 +104,4 @@ class TestInputSprayWithMD5 < Test::Unit::TestCase
     assert_equal expect_md5, input.content_md5
     assert_equal 123 * 8 * 1021 * 13, input.bytes_digested
   end
-end
+end if HAVE_UNICORN
diff --git a/test/test_mirror.rb b/test/test_mirror.rb
index 66bdbbe..de7a7dc 100644
--- a/test/test_mirror.rb
+++ b/test/test_mirror.rb
@@ -57,4 +57,4 @@ class TestMirror < Test::Unit::TestCase
       assert_equal expect, tmp
     end
   end
-end
+end if HAVE_UNICORN
diff --git a/test/test_request.rb b/test/test_request.rb
index 8458742..67ad70c 100644
--- a/test/test_request.rb
+++ b/test/test_request.rb
@@ -51,4 +51,4 @@ class TestRequest < Test::Unit::TestCase
     assert_equal 3, rv.size
     assert_equal req, rv[2]
   end
-end
+end if HAVE_UNICORN
diff --git a/test/test_unexpected_response.rb b/test/test_unexpected_response.rb
index 7ab4c3e..bbd63be 100644
--- a/test/test_unexpected_response.rb
+++ b/test/test_unexpected_response.rb
@@ -44,4 +44,4 @@ class TestRequest < Test::Unit::TestCase
     rv[2].each { |chunk| buf << chunk }
     assert_equal "da39a3ee5e6b4b0d3255bfef95601890afd80709\n", buf
   end
-end
+end if HAVE_UNICORN
diff --git a/test/test_upload.rb b/test/test_upload.rb
index e4efa34..33c494a 100644
--- a/test/test_upload.rb
+++ b/test/test_upload.rb
@@ -126,4 +126,4 @@ class TestUpload < Test::Unit::TestCase
     assert rv.size > 0
     rv.each { |r| assert before.include?(r) }
   end
-end
+end if HAVE_UNICORN
-- 
EW


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-11-21  2:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-21  2:02 [PATCH] relax dependency on unicorn Eric Wong

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/http_spew.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox