[DHG_packages] 02/03: http-client: Upgrading from 0.4.31.2 to 0.5.7.0
Clint Adams
clint at moszumanska.debian.org
Fri Jul 7 01:52:33 UTC 2017
This is an automated email from the git hooks/post-receive script.
clint pushed a commit to branch master
in repository DHG_packages.
commit 83b49d9077272e7a2eb9acd16a9e8c21fae75229
Author: Clint Adams <clint at debian.org>
Date: Thu Jul 6 21:47:12 2017 -0400
http-client: Upgrading from 0.4.31.2 to 0.5.7.0
---
p/haskell-http-client/debian/changelog | 6 ++
p/haskell-http-client/debian/control | 3 -
.../disable-external-network-connection-test.diff | 81 ++++++++++++++++------
3 files changed, 64 insertions(+), 26 deletions(-)
diff --git a/p/haskell-http-client/debian/changelog b/p/haskell-http-client/debian/changelog
index 4abe613..365fa6f 100644
--- a/p/haskell-http-client/debian/changelog
+++ b/p/haskell-http-client/debian/changelog
@@ -1,3 +1,9 @@
+haskell-http-client (0.5.7.0-1) unstable; urgency=medium
+
+ * New upstream release
+
+ -- Clint Adams <clint at debian.org> Thu, 06 Jul 2017 21:47:12 -0400
+
haskell-http-client (0.4.31.2-1) unstable; urgency=medium
* New upstream release
diff --git a/p/haskell-http-client/debian/control b/p/haskell-http-client/debian/control
index e5a1056..f19ee20 100644
--- a/p/haskell-http-client/debian/control
+++ b/p/haskell-http-client/debian/control
@@ -23,8 +23,6 @@ Build-Depends:
libghc-case-insensitive-prof,
libghc-cookie-dev,
libghc-cookie-prof,
- libghc-data-default-class-dev,
- libghc-data-default-class-prof,
libghc-exceptions-dev (>= 0.4),
libghc-exceptions-prof,
libghc-hspec-dev,
@@ -56,7 +54,6 @@ Build-Depends-Indep:
libghc-blaze-builder-doc,
libghc-case-insensitive-doc,
libghc-cookie-doc,
- libghc-data-default-class-doc,
libghc-exceptions-doc,
libghc-http-types-doc,
libghc-mime-types-doc,
diff --git a/p/haskell-http-client/debian/patches/disable-external-network-connection-test.diff b/p/haskell-http-client/debian/patches/disable-external-network-connection-test.diff
index ffd072a..0d3aea8 100644
--- a/p/haskell-http-client/debian/patches/disable-external-network-connection-test.diff
+++ b/p/haskell-http-client/debian/patches/disable-external-network-connection-test.diff
@@ -1,52 +1,87 @@
--- a/test/Network/HTTP/ClientSpec.hs
+++ b/test/Network/HTTP/ClientSpec.hs
-@@ -12,48 +12,4 @@
+@@ -15,83 +15,4 @@
main = hspec spec
spec :: Spec
-spec = describe "Client" $ do
- it "works" $ withSocketsDo $ do
-- req <- parseUrl "http://httpbin.org/"
+- req <- parseUrlThrow "http://httpbin.org/"
- man <- newManager defaultManagerSettings
- res <- httpLbs req man
- responseStatus res `shouldBe` status200
-
- describe "method in URL" $ do
- it "success" $ withSocketsDo $ do
-- req <- parseUrl "POST http://httpbin.org/post"
+- req <- parseUrlThrow "POST http://httpbin.org/post"
- man <- newManager defaultManagerSettings
- res <- httpLbs req man
- responseStatus res `shouldBe` status200
-
- it "failure" $ withSocketsDo $ do
-- req' <- parseUrl "PUT http://httpbin.org/post"
-- let req = req'
-- { checkStatus = \_ _ _ -> Nothing
-- }
+- req <- parseRequest "PUT http://httpbin.org/post"
- man <- newManager defaultManagerSettings
- res <- httpLbs req man
- responseStatus res `shouldBe` status405
-
-- describe "managerModifyRequest" $ do
--
-- it "can set port to 80" $ do
-- let modify req = return req { port = 80 }
-- settings = defaultManagerSettings { managerModifyRequest = modify }
-- withManager settings $ \man -> do
-- res <- httpLbs "http://httpbin.org:1234" man
+- describe "redirects" $ do
+- it "follows redirects" $ do
+- req <- parseRequest "http://httpbin.org/redirect-to?url=http://httpbin.org"
+- man <- newManager defaultManagerSettings
+- res <- httpLbs req man
- responseStatus res `shouldBe` status200
-
-- it "can set 'checkStatus' to throw StatusCodeException" $ do
-- let modify req = return req { checkStatus = \s hs cj -> Just $ toException $ StatusCodeException s hs cj }
-- settings = defaultManagerSettings { managerModifyRequest = modify }
-- withManager settings $ \man ->
-- httpLbs "http://httpbin.org" man `shouldThrow` anyException
+- it "allows to disable redirect following" $ do
+- req <- (\ r -> r{ redirectCount = 0 }) <$>
+- parseRequest "http://httpbin.org/redirect-to?url=http://httpbin.org"
+- man <- newManager defaultManagerSettings
+- res <- httpLbs req man
+- responseStatus res `shouldBe` found302
-
-- it "can set redirectCount to 0 to prevent following redirects" $ do
-- let modify req = return req { redirectCount = 0 }
-- settings = defaultManagerSettings { managerModifyRequest = modify }
+- context "managerModifyResponse" $ do
+- it "allows to modify the response status code" $ do
+- let modify :: Response BodyReader -> IO (Response BodyReader)
+- modify res = do
+- return res {
+- responseStatus = (responseStatus res) {
+- statusCode = 201
+- }
+- }
+- settings = defaultManagerSettings { managerModifyResponse = modify }
- man <- newManager settings
-- httpLbs "http://httpbin.org/redirect-to?url=foo" man `shouldThrow` ( \ (StatusCodeException s _ _) -> s == found302)
+- res <- httpLbs "http://httpbin.org" man
+- (statusCode.responseStatus) res `shouldBe` 201
-
+- it "modifies the response body" $ do
+- let modify :: Response BodyReader -> IO (Response BodyReader)
+- modify res = do
+- reader <- constBodyReader [BS.pack "modified response body"]
+- return res {
+- responseBody = reader
+- }
+- settings = defaultManagerSettings { managerModifyResponse = modify }
+- man <- newManager settings
+- res <- httpLbs "http://httpbin.org" man
+- responseBody res `shouldBe` "modified response body"
+-
+- context "managerModifyRequest" $ do
+- it "port" $ do
+- let modify req = return req { port = 80 }
+- settings = defaultManagerSettings { managerModifyRequest = modify }
+- man <- newManager settings
+- res <- httpLbs "http://httpbin.org:1234" man
+- responseStatus res `shouldBe` status200
+-
+- it "checkResponse" $ do
+- let modify req = return req { checkResponse = \_ _ -> error "some exception" }
+- settings = defaultManagerSettings { managerModifyRequest = modify }
+- man <- newManager settings
+- httpLbs "http://httpbin.org" man `shouldThrow` anyException
-
+- it "redirectCount" $ do
+- let modify req = return req { redirectCount = 0 }
+- settings = defaultManagerSettings { managerModifyRequest = modify }
+- man <- newManager settings
+- response <- httpLbs "http://httpbin.org/redirect-to?url=foo" man
+- responseStatus response `shouldBe` found302
+spec = return ()
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-haskell/DHG_packages.git
More information about the Pkg-haskell-commits
mailing list