Hello community,

here is the log from the commit of package ghc-haskell-neo4j-client for 
openSUSE:Factory checked in at 2017-03-24 02:18:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-haskell-neo4j-client (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-haskell-neo4j-client.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-haskell-neo4j-client"

Fri Mar 24 02:18:01 2017 rev:2 rq:479407 version:0.3.2.4

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/ghc-haskell-neo4j-client/ghc-haskell-neo4j-client.changes
        2017-03-08 00:51:59.353347120 +0100
+++ 
/work/SRC/openSUSE:Factory/.ghc-haskell-neo4j-client.new/ghc-haskell-neo4j-client.changes
   2017-03-24 02:18:02.730703817 +0100
@@ -1,0 +2,5 @@
+Mon Sep 26 06:52:10 UTC 2016 - [email protected]
+
+- Update to version 0.3.2.4 with cabal2obs.
+
+-------------------------------------------------------------------

Old:
----
  haskell-neo4j-client-0.3.2.2.tar.gz

New:
----
  haskell-neo4j-client-0.3.2.4.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-haskell-neo4j-client.spec ++++++
--- /var/tmp/diff_new_pack.39b5dX/_old  2017-03-24 02:18:04.658431060 +0100
+++ /var/tmp/diff_new_pack.39b5dX/_new  2017-03-24 02:18:04.662430494 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-haskell-neo4j-client
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,15 +19,14 @@
 %global pkg_name haskell-neo4j-client
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        0.3.2.2
+Version:        0.3.2.4
 Release:        0
 Summary:        A Haskell neo4j client
 License:        MIT
-Group:          System/Libraries
+Group:          Development/Languages/Other
 Url:            https://hackage.haskell.org/package/%{pkg_name}
 Source0:        
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
 BuildRequires:  ghc-Cabal-devel
-# Begin cabal-rpm deps:
 BuildRequires:  ghc-HTTP-devel
 BuildRequires:  ghc-aeson-devel
 BuildRequires:  ghc-bytestring-devel
@@ -59,7 +58,6 @@
 BuildRequires:  ghc-test-framework-quickcheck2-devel
 BuildRequires:  ghc-test-framework-th-devel
 %endif
-# End cabal-rpm deps
 
 %description
 Library to interact with Neo4j databases.
@@ -96,20 +94,14 @@
 %prep
 %setup -q -n %{pkg_name}-%{version}
 
-
 %build
 %ghc_lib_build
 
-
 %install
 %ghc_lib_install
 
-
 %check
-%if %{with tests}
-%{cabal} test
-%endif
-
+%cabal_test
 
 %post devel
 %ghc_pkg_recache

++++++ haskell-neo4j-client-0.3.2.2.tar.gz -> 
haskell-neo4j-client-0.3.2.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/haskell-neo4j-client-0.3.2.2/haskell-neo4j-client.cabal 
new/haskell-neo4j-client-0.3.2.4/haskell-neo4j-client.cabal
--- old/haskell-neo4j-client-0.3.2.2/haskell-neo4j-client.cabal 2016-05-04 
09:46:15.000000000 +0200
+++ new/haskell-neo4j-client-0.3.2.4/haskell-neo4j-client.cabal 2016-09-22 
08:47:18.000000000 +0200
@@ -1,5 +1,5 @@
 name:                haskell-neo4j-client
-version:             0.3.2.2
+version:             0.3.2.4
 synopsis:            A Haskell neo4j client
 description:         
     Library to interact with Neo4j databases. 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/haskell-neo4j-client-0.3.2.2/src/Database/Neo4j/Http.hs 
new/haskell-neo4j-client-0.3.2.4/src/Database/Neo4j/Http.hs
--- old/haskell-neo4j-client-0.3.2.2/src/Database/Neo4j/Http.hs 2016-05-04 
09:46:15.000000000 +0200
+++ new/haskell-neo4j-client-0.3.2.4/src/Database/Neo4j/Http.hs 2016-09-22 
08:47:18.000000000 +0200
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
 {-# LANGUAGE OverloadedStrings  #-}
 
 module Database.Neo4j.Http where
@@ -77,21 +78,33 @@
          let conn = Connection hostname port mgr (Just creds) True
          liftIO $ runNeo4j cmds conn
 
+#if MIN_VERSION_http_client(0,4,30)
+defaultReq = HC.defaultRequest
+#else
+defaultReq = def
+#endif
 
 -- | General function for HTTP requests
 httpReq :: Connection -> HT.Method -> S.ByteString -> L.ByteString -> 
(HT.Status -> Bool) ->
      IO (HC.Response L.ByteString)
 httpReq (Connection h p m c s) method path body statusCheck = do
-            let request = def {
+            let request = defaultReq {
                     HC.host = h,
                     HC.port = p,
                     HC.path = path,
                     HC.method = method,
                     HC.requestBody = HC.RequestBodyLBS body,
                     HC.secure = s,
+#if MIN_VERSION_http_client(0,5,0)
+                    HC.checkResponse = \_ r -> let s = HC.responseStatus r in 
+                                                 if statusCheck s
+                                                 then return ()
+                                                 else throw 
(Neo4jUnexpectedResponseException s),
+#else
                     HC.checkStatus = \s _ _ -> if statusCheck s
                                                  then Nothing
                                                  else Just (toException $ 
Neo4jUnexpectedResponseException s),
+#endif
                     HC.requestHeaders = [(HT.hAccept, "application/json; 
charset=UTF-8"),
                                           (HT.hContentType, 
"application/json")]}
             -- TODO: Would be better to use exceptions package 
Control.Monad.Catch ??
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/haskell-neo4j-client-0.3.2.2/tests/IntegrationTests.hs 
new/haskell-neo4j-client-0.3.2.4/tests/IntegrationTests.hs
--- old/haskell-neo4j-client-0.3.2.2/tests/IntegrationTests.hs  2016-05-04 
09:46:15.000000000 +0200
+++ new/haskell-neo4j-client-0.3.2.4/tests/IntegrationTests.hs  2016-09-22 
08:47:18.000000000 +0200
@@ -49,6 +49,14 @@
     where --checkExc :: (Exception e, Show e) => Maybe e -> Assertion
           checkExc Nothing = assertFailure $ "Expected exception " <> show 
exExc <> " but none raised"
           checkExc (Just e) = assertEqual "" exExc e
+
+assertFException :: (Neo4jException -> Assertion) -> IO a -> Assertion
+assertFException f action = do
+        resExc <- getException action
+        checkExc resExc
+    where --checkExc :: (Exception e, Show e) => Maybe e -> Assertion
+          checkExc Nothing = assertFailure $ "Expected exception but none 
raised"
+          checkExc (Just e) = f e
     
 -- | handy assertEqual inside a Neo4j monad
 neo4jEqual :: (Show a, Eq a) => a -> a -> Neo4j ()
@@ -98,8 +106,8 @@
 
 -- | Test connecting to a non-existing server
 case_NoConnection :: Assertion
-case_NoConnection = assertException expException $ withConnection "localhost" 
77 $ createNode someProperties
-    where expException = Neo4jHttpException "FailedConnectionException2 
\"localhost\" 77 False connect: does not exist (Connection refused)"
+case_NoConnection = assertFException f $ withConnection "localhost" 77 $ 
createNode someProperties
+    where f e = assertBool "" $ e == Neo4jHttpException 
"FailedConnectionException2 \"localhost\" 77 False connect: does not exist 
(Connection refused)" || e == Neo4jHttpException "HttpExceptionRequest Request 
{\n  host                 = \"localhost\"\n  port                 = 77\n  
secure               = False\n  requestHeaders       = 
[(\"Accept\",\"application/json; 
charset=UTF-8\"),(\"Content-Type\",\"application/json\")]\n  path               
  = \"/db/data/node\"\n  queryString          = \"\"\n  method               = 
\"POST\"\n  proxy                = Nothing\n  rawBody              = False\n  
redirectCount        = 10\n  responseTimeout      = ResponseTimeoutDefault\n  
requestVersion       = HTTP/1.1\n}\n (ConnectionFailure connect: does not exist 
(Connection refused))"
 
 -- | Test connecting to a server with improper credentials
 case_ImproperCredentials :: Assertion


Reply via email to