http_spew RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: http_spew-public@bogomips.org
Subject: [PATCH] relax dependency on unicorn
Date: Sat, 21 Nov 2015 02:02:25 +0000	[thread overview]
Message-ID: <20151121020225.32018-1-normalperson@yhbt.net> (raw)

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


                 reply	other threads:[~2015-11-21  2:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://yhbt.net/http_spew/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151121020225.32018-1-normalperson@yhbt.net \
    --to=normalperson@yhbt.net \
    --cc=http_spew-public@bogomips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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