cayley-client 0.4.15 → 0.4.16
raw patch · 2 files changed
+12/−3 lines, 2 filesdep ~aesonPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: aeson
API changes (from Hackage documentation)
Files
- cayley-client.cabal +3/−3
- tests/hspec.hs +9/−0
cayley-client.cabal view
@@ -1,6 +1,6 @@ cabal-version: >=1.10 name: cayley-client-version: 0.4.15+version: 0.4.16 license: BSD3 license-file: LICENSE copyright: (c) 2015-2021 - Michel Boucey@@ -32,7 +32,7 @@ other-extensions: OverloadedStrings ghc-options: -Wall build-depends:- aeson >=0.8.0.2 && <1.6,+ aeson >=0.8.0.2 && <1.6 || ==2.0.*, attoparsec >=0.12.1.6 && <0.15, base >=4.8.1.0 && <5, bytestring >=0.10.6 && <0.12,@@ -57,5 +57,5 @@ hspec >=2.1.10 && <3, base >=4.8 && <5, cayley-client -any,- aeson >=0.8.0.2 && <1.6,+ aeson >=0.8.0.2 && <1.6 || ==2.0.*, unordered-containers >=0.2.5 && <0.3
tests/hspec.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} import Data.Aeson@@ -5,6 +6,10 @@ import Database.Cayley.Client as C import Database.Cayley.Types as CT import Test.Hspec+#if MIN_VERSION_aeson(2,0,0)+import qualified Data.Aeson.Key as K+import qualified Data.Aeson.KeyMap as KM+#endif main :: IO () main = hspec $ do@@ -12,7 +17,11 @@ describe "write" $ it "writes a quad to Cayley server" $ do c <- connectCayley defaultCayleyConfig+#if MIN_VERSION_aeson(2,0,0)+ write c Quad { subject = "<danny>", predicate = "<follows>", C.object = "<sandy>", label = Nothing } `shouldReturn` Just (Object (KM.fromList [("result",String "Successfully wrote 1 quads.")]))+#else write c Quad { subject = "<danny>", predicate = "<follows>", C.object = "<sandy>", label = Nothing } `shouldReturn` Just (Object (fromList [("result",String "Successfully wrote 1 quads.")]))+#endif describe "query" $ it "query Cayley server" $ do