commit ghc-servant-mock for openSUSE:Factory
Hello community, here is the log from the commit of package ghc-servant-mock for openSUSE:Factory checked in at 2017-08-31 20:59:21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-servant-mock (Old) and /work/SRC/openSUSE:Factory/.ghc-servant-mock.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "ghc-servant-mock" Thu Aug 31 20:59:21 2017 rev:2 rq:513488 version:0.8.2 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-servant-mock/ghc-servant-mock.changes 2017-05-10 20:51:55.646910124 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-servant-mock.new/ghc-servant-mock.changes 2017-08-31 20:59:22.718841277 +0200 @@ -1,0 +2,5 @@ +Thu Jul 27 14:08:00 UTC 2017 - psimons@suse.com + +- Update to version 0.8.2 revision 1. + +------------------------------------------------------------------- Old: ---- servant-mock-0.8.1.1.tar.gz New: ---- servant-mock-0.8.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-servant-mock.spec ++++++ --- /var/tmp/diff_new_pack.NxgmX5/_old 2017-08-31 20:59:23.734698547 +0200 +++ /var/tmp/diff_new_pack.NxgmX5/_new 2017-08-31 20:59:23.750696299 +0200 @@ -19,7 +19,7 @@ %global pkg_name servant-mock %bcond_with tests Name: ghc-%{pkg_name} -Version: 0.8.1.1 +Version: 0.8.2 Release: 0 Summary: Derive a mock server for free from your servant API types License: BSD-3-Clause ++++++ servant-mock-0.8.1.1.tar.gz -> servant-mock-0.8.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/servant-mock-0.8.1.1/CHANGELOG.md new/servant-mock-0.8.2/CHANGELOG.md --- old/servant-mock-0.8.1.1/CHANGELOG.md 2016-10-08 14:58:08.000000000 +0200 +++ new/servant-mock-0.8.2/CHANGELOG.md 2017-05-24 12:18:55.000000000 +0200 @@ -1,3 +1,15 @@ +0.8.2 +----- + +- Support for servant-0.11 + Add `HasMock EmptyAPI` instance + +0.8.1.2 +------- + +- Support for servant-0.10 +- Fix test with hspec-wai-0.8 + 0.8.1.1 ------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/servant-mock-0.8.1.1/servant-mock.cabal new/servant-mock-0.8.2/servant-mock.cabal --- old/servant-mock-0.8.1.1/servant-mock.cabal 2016-10-08 15:01:55.000000000 +0200 +++ new/servant-mock-0.8.2/servant-mock.cabal 2017-05-24 12:18:55.000000000 +0200 @@ -1,5 +1,5 @@ name: servant-mock -version: 0.8.1.1 +version: 0.8.2 synopsis: Derive a mock server for free from your servant API types description: Derive a mock server for free from your servant API types @@ -11,7 +11,7 @@ author: Servant Contributors maintainer: haskell-servant-maintainers@googlegroups.com copyright: 2015-2016 Servant Contributors -category: Web +category: Servant, Web build-type: Simple extra-source-files: README.md CHANGELOG.md include/*.h cabal-version: >=1.10 @@ -33,8 +33,8 @@ base >=4.7 && <5, bytestring >=0.10.4 && <0.11, http-types >=0.8 && <0.10, - servant >=0.8 && <0.10, - servant-server >=0.8 && <0.10, + servant >=0.8 && <0.12, + servant-server >=0.8 && <0.12, transformers >=0.3 && <0.6, QuickCheck >=2.7 && <2.10, wai >=3.0 && <3.3 @@ -51,7 +51,7 @@ aeson, base, servant-mock, - servant-server, + servant-server >= 0.10, QuickCheck, warp if flag(example) @@ -72,7 +72,7 @@ bytestring-conversion, base, hspec, - hspec-wai, + hspec-wai >=0.8 && <0.9, QuickCheck, servant, servant-server, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/servant-mock-0.8.1.1/src/Servant/Mock.hs new/servant-mock-0.8.2/src/Servant/Mock.hs --- old/servant-mock-0.8.1.1/src/Servant/Mock.hs 2016-10-08 14:58:08.000000000 +0200 +++ new/servant-mock-0.8.2/src/Servant/Mock.hs 2017-05-24 12:18:55.000000000 +0200 @@ -160,12 +160,21 @@ mock _ _ = mockArbitrary instance HasMock Raw context where +#if MIN_VERSION_servant(0,11,0) + mock _ _ = Tagged $ \_req respond -> do +#else mock _ _ = \_req respond -> do +#endif bdy <- genBody respond $ responseLBS status200 [] bdy where genBody = pack <$> generate (vector 100 :: Gen [Char]) +#if MIN_VERSION_servant(0,11,0) +instance HasMock EmptyAPI context where + mock _ _ = emptyServer +#endif + instance (HasContextEntry context (NamedContext name subContext), HasMock rest subContext) => HasMock (WithNamedContext name subContext rest) context where diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/servant-mock-0.8.1.1/test/Servant/MockSpec.hs new/servant-mock-0.8.2/test/Servant/MockSpec.hs --- old/servant-mock-0.8.1.1/test/Servant/MockSpec.hs 2016-10-08 14:58:08.000000000 +0200 +++ new/servant-mock-0.8.2/test/Servant/MockSpec.hs 2017-05-24 12:18:55.000000000 +0200 @@ -13,7 +13,7 @@ import Network.Wai import Servant.API import Test.Hspec hiding (pending) -import Test.Hspec.Wai +import Test.Hspec.Wai hiding (Body) import Test.QuickCheck import Servant @@ -64,7 +64,10 @@ with (return app) $ do it "serves arbitrary response bodies" $ do get "/" `shouldRespondWith` 200{ - matchBody = Just $ Aeson.encode ArbitraryBody + matchBody = MatchBody $ \ _ b -> + if b == Aeson.encode ArbitraryBody + then Nothing + else Just ("body not correct\n") } context "response headers" $ do @@ -77,8 +80,8 @@ with (toApp withHeader) $ do it "serves arbitrary response bodies" $ do get "/" `shouldRespondWith` 200{ - matchHeaders = return $ MatchHeader $ \ h -> - if h == [("Content-Type", "application/json"), ("foo", "ArbitraryHeader")] + matchHeaders = return $ MatchHeader $ \ h _ -> + if h == [("Content-Type", "application/json;charset=utf-8"), ("foo", "ArbitraryHeader")] then Nothing else Just ("headers not correct\n") } @@ -86,8 +89,8 @@ with (toApp withoutHeader) $ do it "works for no additional headers" $ do get "/" `shouldRespondWith` 200{ - matchHeaders = return $ MatchHeader $ \ h -> - if h == [("Content-Type", "application/json")] + matchHeaders = return $ MatchHeader $ \ h _ -> + if h == [("Content-Type", "application/json;charset=utf-8")] then Nothing else Just ("headers not correct\n") } ++++++ servant-mock.cabal ++++++ --- /var/tmp/diff_new_pack.NxgmX5/_old 2017-08-31 20:59:24.550583913 +0200 +++ /var/tmp/diff_new_pack.NxgmX5/_new 2017-08-31 20:59:24.570581103 +0200 @@ -1,82 +1,82 @@ -name: servant-mock -version: 0.8.1.1 -x-revision: 1 -synopsis: Derive a mock server for free from your servant API types -description: - Derive a mock server for free from your servant API types - . - See the @Servant.Mock@ module for the documentation and an example. -homepage: http://haskell-servant.readthedocs.org/ -license: BSD3 -license-file: LICENSE -author: Servant Contributors -maintainer: haskell-servant-maintainers@googlegroups.com -copyright: 2015-2016 Servant Contributors -category: Web -build-type: Simple -extra-source-files: README.md CHANGELOG.md include/*.h -cabal-version: >=1.10 -bug-reports: http://github.com/haskell-servant/servant-mock/issues - -source-repository head - type: git - location: http://github.com/haskell-servant/servant-mock.git - -flag example - description: Build the example too - default: True - manual: True - -library - exposed-modules: - Servant.Mock - build-depends: - base >=4.7 && <5, - bytestring >=0.10.4 && <0.11, - http-types >=0.8 && <0.10, - servant >=0.8 && <0.10, - servant-server >=0.8 && <0.10, - transformers >=0.3 && <0.6, - QuickCheck >=2.7 && <2.10, - wai >=3.0 && <3.3 - hs-source-dirs: src - default-language: Haskell2010 - include-dirs: include - ghc-options: -Wall - -executable mock-app - main-is: main.hs - hs-source-dirs: example - default-language: Haskell2010 - build-depends: - aeson, - base, - servant-mock, - servant-server, - QuickCheck, - warp - if flag(example) - buildable: True - else - buildable: False - ghc-options: -Wall - -test-suite spec - type: exitcode-stdio-1.0 - ghc-options: -Wall - default-language: Haskell2010 - hs-source-dirs: test - main-is: Spec.hs - other-modules: - Servant.MockSpec - build-depends: - bytestring-conversion, - base, - hspec, - hspec-wai <0.8, - QuickCheck, - servant, - servant-server, - servant-mock, - aeson, - wai +name: servant-mock +version: 0.8.2 +x-revision: 1 +synopsis: Derive a mock server for free from your servant API types +description: + Derive a mock server for free from your servant API types + . + See the @Servant.Mock@ module for the documentation and an example. +homepage: http://haskell-servant.readthedocs.org/ +license: BSD3 +license-file: LICENSE +author: Servant Contributors +maintainer: haskell-servant-maintainers@googlegroups.com +copyright: 2015-2016 Servant Contributors +category: Servant, Web +build-type: Simple +extra-source-files: README.md CHANGELOG.md include/*.h +cabal-version: >=1.10 +bug-reports: http://github.com/haskell-servant/servant-mock/issues + +source-repository head + type: git + location: http://github.com/haskell-servant/servant-mock.git + +flag example + description: Build the example too + default: True + manual: True + +library + exposed-modules: + Servant.Mock + 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, + transformers >=0.3 && <0.6, + QuickCheck >=2.7 && <2.11, + wai >=3.0 && <3.3 + hs-source-dirs: src + default-language: Haskell2010 + include-dirs: include + ghc-options: -Wall + +executable mock-app + main-is: main.hs + hs-source-dirs: example + default-language: Haskell2010 + build-depends: + aeson, + base, + servant-mock, + servant-server >= 0.10, + QuickCheck, + warp + if flag(example) + buildable: True + else + buildable: False + ghc-options: -Wall + +test-suite spec + type: exitcode-stdio-1.0 + ghc-options: -Wall + default-language: Haskell2010 + hs-source-dirs: test + main-is: Spec.hs + other-modules: + Servant.MockSpec + build-depends: + bytestring-conversion, + base, + hspec, + hspec-wai >=0.8 && <0.9, + QuickCheck, + servant, + servant-server, + servant-mock, + aeson, + wai
participants (1)
-
root@hilbert.suse.de