servant-mock 0.8.2 → 0.8.3
raw patch · 4 files changed
+32/−6 lines, 4 filesdep ~QuickCheckdep ~hspec-waidep ~http-types
Dependency ranges changed: QuickCheck, hspec-wai, http-types, servant, servant-server
Files
- CHANGELOG.md +8/−1
- servant-mock.cabal +12/−5
- src/Servant/Mock.hs +8/−0
- test/Servant/MockSpec.hs +4/−0
CHANGELOG.md view
@@ -1,8 +1,15 @@+0.3.3+-----++- Support for servant-0.12+ - Add `HasMock (Description d :> api)` and `HasMock (Summary d :> api)`+ instances+ 0.8.2 ----- - Support for servant-0.11- Add `HasMock EmptyAPI` instance+ - Add `HasMock EmptyAPI` instance 0.8.1.2 -------
servant-mock.cabal view
@@ -1,5 +1,5 @@ name: servant-mock-version: 0.8.2+version: 0.8.3 synopsis: Derive a mock server for free from your servant API types description: Derive a mock server for free from your servant API types@@ -16,6 +16,11 @@ extra-source-files: README.md CHANGELOG.md include/*.h cabal-version: >=1.10 bug-reports: http://github.com/haskell-servant/servant-mock/issues+tested-with:+ GHC==8.2.1,+ GHC==8.0.2,+ GHC==7.10.3,+ GHC==7.8.4 source-repository head type: git@@ -32,11 +37,11 @@ build-depends: base >=4.7 && <5, bytestring >=0.10.4 && <0.11,- http-types >=0.8 && <0.10,- servant >=0.8 && <0.12,- servant-server >=0.8 && <0.12,+ http-types >=0.8 && <0.11,+ servant >=0.8 && <0.13,+ servant-server >=0.8 && <0.13, transformers >=0.3 && <0.6,- QuickCheck >=2.7 && <2.10,+ QuickCheck >=2.7 && <2.11, wai >=3.0 && <3.3 hs-source-dirs: src default-language: Haskell2010@@ -68,6 +73,8 @@ main-is: Spec.hs other-modules: Servant.MockSpec+ build-tool-depends:+ hspec-discover:hspec-discover build-depends: bytestring-conversion, base,
src/Servant/Mock.hs view
@@ -175,6 +175,14 @@ mock _ _ = emptyServer #endif +#if MIN_VERSION_servant(0,12,0)+instance HasMock api context => HasMock (Summary d :> api) context where+ mock _ context = mock (Proxy :: Proxy api) context++instance HasMock api context => HasMock (Description d :> api) context where+ mock _ context = mock (Proxy :: Proxy api) context+#endif+ instance (HasContextEntry context (NamedContext name subContext), HasMock rest subContext) => HasMock (WithNamedContext name subContext rest) context where
test/Servant/MockSpec.hs view
@@ -1,9 +1,13 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeOperators #-}+#if __GLASGOW_HASKELL__ == 708+{-# OPTIONS_GHC -fcontext-stack=31 #-}+#endif module Servant.MockSpec where