commit ghc-servant-swagger for openSUSE:Factory
Hello community, here is the log from the commit of package ghc-servant-swagger for openSUSE:Factory checked in at 2017-08-31 20:59:30 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-servant-swagger (Old) and /work/SRC/openSUSE:Factory/.ghc-servant-swagger.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "ghc-servant-swagger" Thu Aug 31 20:59:30 2017 rev:2 rq:513492 version:1.1.3.1 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-servant-swagger/ghc-servant-swagger.changes 2017-05-10 20:47:42.302659077 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-servant-swagger.new/ghc-servant-swagger.changes 2017-08-31 20:59:31.537602218 +0200 @@ -1,0 +2,5 @@ +Thu Jul 27 14:07:55 UTC 2017 - psimons@suse.com + +- Update to version 1.1.3.1. + +------------------------------------------------------------------- Old: ---- servant-swagger-1.1.2.tar.gz servant-swagger.cabal New: ---- servant-swagger-1.1.3.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-servant-swagger.spec ++++++ --- /var/tmp/diff_new_pack.0mG8Pv/_old 2017-08-31 20:59:32.889412285 +0200 +++ /var/tmp/diff_new_pack.0mG8Pv/_new 2017-08-31 20:59:32.893411723 +0200 @@ -19,18 +19,18 @@ %global pkg_name servant-swagger %bcond_with tests Name: ghc-%{pkg_name} -Version: 1.1.2 +Version: 1.1.3.1 Release: 0 Summary: Generate Swagger specification for your servant API License: BSD-3-Clause 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 -Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/2.cabal#/%{pkg_name}.cabal BuildRequires: ghc-Cabal-devel BuildRequires: ghc-QuickCheck-devel BuildRequires: ghc-aeson-devel BuildRequires: ghc-bytestring-devel +BuildRequires: ghc-cabal-doctest-devel BuildRequires: ghc-hspec-devel BuildRequires: ghc-http-media-devel BuildRequires: ghc-insert-ordered-containers-devel @@ -66,7 +66,6 @@ %prep %setup -q -n %{pkg_name}-%{version} -cp -p %{SOURCE1} %{pkg_name}.cabal %build %ghc_lib_build ++++++ servant-swagger-1.1.2.tar.gz -> servant-swagger-1.1.3.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/servant-swagger-1.1.2/CHANGELOG.md new/servant-swagger-1.1.3.1/CHANGELOG.md --- old/servant-swagger-1.1.2/CHANGELOG.md 2016-09-13 08:58:34.000000000 +0200 +++ new/servant-swagger-1.1.3.1/CHANGELOG.md 2017-07-15 00:09:54.000000000 +0200 @@ -1,3 +1,21 @@ +1.1.3.1 +--- + +* Notes: + * GHC-8.2 compatible release + +1.1.3 +--- + +* Notes: + * `servant-0.11` compatible release + +1.1.2.1 +--- + +* Notes: + * `servant-0.10` compatible release + 1.1.2 --- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/servant-swagger-1.1.2/Setup.hs new/servant-swagger-1.1.3.1/Setup.hs --- old/servant-swagger-1.1.2/Setup.hs 1970-01-01 01:00:00.000000000 +0100 +++ new/servant-swagger-1.1.3.1/Setup.hs 2017-07-15 00:09:54.000000000 +0200 @@ -0,0 +1,33 @@ +{-# LANGUAGE CPP #-} +{-# OPTIONS_GHC -Wall #-} +module Main (main) where + +#ifndef MIN_VERSION_cabal_doctest +#define MIN_VERSION_cabal_doctest(x,y,z) 0 +#endif + +#if MIN_VERSION_cabal_doctest(1,0,0) + +import Distribution.Extra.Doctest ( defaultMainWithDoctests ) +main :: IO () +main = defaultMainWithDoctests "doctests" + +#else + +#ifdef MIN_VERSION_Cabal +-- If the macro is defined, we have new cabal-install, +-- but for some reason we don't have cabal-doctest in package-db +-- +-- Probably we are running cabal sdist, when otherwise using new-build +-- workflow +#warning You are configuring this package without cabal-doctest installed. \ + The doctests test-suite will not work as a result. \ + To fix this, install cabal-doctest before configuring. +#endif + +import Distribution.Simple + +main :: IO () +main = defaultMain + +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/servant-swagger-1.1.2/Setup.lhs new/servant-swagger-1.1.3.1/Setup.lhs --- old/servant-swagger-1.1.2/Setup.lhs 2016-09-13 08:58:34.000000000 +0200 +++ new/servant-swagger-1.1.3.1/Setup.lhs 1970-01-01 01:00:00.000000000 +0100 @@ -1,48 +0,0 @@ -#!/usr/bin/runhaskell -\begin{code} -{-# OPTIONS_GHC -Wall #-} -module Main (main) where - -import Data.List ( nub ) -import Data.Version ( showVersion ) -import Distribution.Package ( PackageName(PackageName), PackageId, InstalledPackageId, packageVersion, packageName ) -import Distribution.PackageDescription ( PackageDescription(), TestSuite(..) ) -import Distribution.Simple ( defaultMainWithHooks, UserHooks(..), simpleUserHooks ) -import Distribution.Simple.Utils ( rewriteFile, createDirectoryIfMissingVerbose ) -import Distribution.Simple.BuildPaths ( autogenModulesDir ) -import Distribution.Simple.Setup ( BuildFlags(buildVerbosity), fromFlag ) -import Distribution.Simple.LocalBuildInfo ( withLibLBI, withTestLBI, LocalBuildInfo(), ComponentLocalBuildInfo(componentPackageDeps) ) -import Distribution.Verbosity ( Verbosity ) -import System.FilePath ( (</>) ) - -main :: IO () -main = defaultMainWithHooks simpleUserHooks - { buildHook = \pkg lbi hooks flags -> do - generateBuildModule (fromFlag (buildVerbosity flags)) pkg lbi - buildHook simpleUserHooks pkg lbi hooks flags - } - -generateBuildModule :: Verbosity -> PackageDescription -> LocalBuildInfo -> IO () -generateBuildModule verbosity pkg lbi = do - let dir = autogenModulesDir lbi - createDirectoryIfMissingVerbose verbosity True dir - withLibLBI pkg lbi $ \_ libcfg -> do - withTestLBI pkg lbi $ \suite suitecfg -> do - rewriteFile (dir </> "Build_" ++ testName suite ++ ".hs") $ unlines - [ "module Build_" ++ testName suite ++ " where" - , "" - , "autogen_dir :: String" - , "autogen_dir = " ++ show dir - , "" - , "deps :: [String]" - , "deps = " ++ (show $ formatdeps (testDeps libcfg suitecfg)) - ] - where - formatdeps = map (formatone . snd) - formatone p = case packageName p of - PackageName n -> n ++ "-" ++ showVersion (packageVersion p) - -testDeps :: ComponentLocalBuildInfo -> ComponentLocalBuildInfo -> [(InstalledPackageId, PackageId)] -testDeps xs ys = nub $ componentPackageDeps xs ++ componentPackageDeps ys - -\end{code} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/servant-swagger-1.1.2/servant-swagger.cabal new/servant-swagger-1.1.3.1/servant-swagger.cabal --- old/servant-swagger-1.1.2/servant-swagger.cabal 2016-09-13 08:58:34.000000000 +0200 +++ new/servant-swagger-1.1.3.1/servant-swagger.cabal 2017-07-15 00:09:54.000000000 +0200 @@ -1,5 +1,5 @@ name: servant-swagger -version: 1.1.2 +version: 1.1.3.1 synopsis: Generate Swagger specification for your servant API. description: Please see README.md homepage: https://github.com/haskell-servant/servant-swagger @@ -12,6 +12,11 @@ category: Web build-type: Custom cabal-version: >=1.10 +tested-with: + GHC==7.8.4, + GHC==7.10.3, + GHC==8.0.2, + GHC==8.2.1 extra-source-files: README.md , CHANGELOG.md @@ -29,6 +34,12 @@ type: git location: https://github.com/haskell-servant/servant-swagger.git +custom-setup + setup-depends: + base >=4.7 && <4.11, + Cabal >= 1.18 && <2.1, + cabal-doctest >=1.0.2 && <1.1 + library ghc-options: -Wall exposed-modules: @@ -44,13 +55,13 @@ Servant.Swagger.Internal.TypeLevel.Every Servant.Swagger.Internal.TypeLevel.TMap hs-source-dirs: src - build-depends: aeson >=0.11.2.0 && <1.1 - , base >=4.7.0.0 && <4.10 + build-depends: aeson >=0.11.2.0 && <1.3 + , base >=4.7.0.0 && <4.11 , bytestring >=0.10.4.0 && <0.11 - , http-media >=0.6.3 && <0.7 + , http-media >=0.6.3 && <0.8 , insert-ordered-containers >=0.1.0.0 && <0.3 - , lens >=4.7.0.1 && <4.15 - , servant >=0.5 && <0.9 + , lens >=4.7.0.1 && <4.16 + , servant >=0.5 && <0.12 , swagger2 >=2.1 && <2.2 , text >=1.2.0.6 && <1.3 , unordered-containers >=0.2.5.1 && <0.3 @@ -64,11 +75,13 @@ build-depends: base, directory >= 1.0, - doctest >= 0.11 && <0.12, + doctest >= 0.11.1 && <0.12, + servant >= 0.10, + QuickCheck, filepath default-language: Haskell2010 hs-source-dirs: test - main-is: DocTest.hs + main-is: doctests.hs type: exitcode-stdio-1.0 test-suite spec @@ -82,7 +95,7 @@ , hspec , QuickCheck , lens - , servant + , servant >= 0.10 , servant-swagger , swagger2 , text diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/servant-swagger-1.1.2/src/Servant/Swagger/Internal.hs new/servant-swagger-1.1.3.1/src/Servant/Swagger/Internal.hs --- old/servant-swagger-1.1.2/src/Servant/Swagger/Internal.hs 2016-09-13 08:58:34.000000000 +0200 +++ new/servant-swagger-1.1.3.1/src/Servant/Swagger/Internal.hs 2017-07-15 00:09:54.000000000 +0200 @@ -71,6 +71,11 @@ instance HasSwagger Raw where toSwagger _ = mempty & paths . at "/" ?~ mempty +#if MIN_VERSION_servant(0,11,0) +instance HasSwagger EmptyAPI where + toSwagger _ = mempty +#endif + -- | All operations of sub API. -- This is similar to @'operationsOf'@ but ensures that operations -- indeed belong to the API at compile time. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/servant-swagger-1.1.2/src/Servant/Swagger.hs new/servant-swagger-1.1.3.1/src/Servant/Swagger.hs --- old/servant-swagger-1.1.2/src/Servant/Swagger.hs 2016-09-13 08:58:34.000000000 +0200 +++ new/servant-swagger-1.1.3.1/src/Servant/Swagger.hs 2017-07-15 00:09:54.000000000 +0200 @@ -98,7 +98,7 @@ -- In order to generate @'Swagger'@ specification for a servant API, just use @'toSwagger'@: -- -- >>> BSL8.putStrLn $ encode $ toSwagger (Proxy :: Proxy UserAPI) --- {"swagger":"2.0","info":{"version":"","title":""},"paths":{"/":{"get":{"produces":["application/json"],"responses":{"200":{"schema":{"items":{"$ref":"#/definitions/User"},"type":"array"},"description":""}}},"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"required":true,"schema":{"$ref":"#/definitions/User"},"in":"body","name":"body"}],"responses":{"400":{"description":"Invalid `body`"},"200":{"schema":{"$ref":"#/definitions/UserId"},"description":""}}}},"/{user_id}":{"get":{"produces":["application/json"],"parameters":[{"required":true,"in":"path","name":"user_id","type":"integer"}],"responses":{"404":{"description":"`user_id` not found"},"200":{"schema":{"$ref":"#/definitions/User"},"description":""}}}}},"definitions":{"User":{"required":["name","age"],"properties":{"name":{"type":"string"},"age":{"maximum":9223372036854775807,"minimum":-9223372036854775808,"type":"integer"}},"type":"object"},"UserId":{"type":"integer"}}} +-- {"swagger":"2.0","info":{"version":"","title":""},"paths":{"/":{"get":{"produces":["application/json;charset=utf-8"],"responses":{"200":{"schema":{"items":{"$ref":"#/definitions/User"},"type":"array"},"description":""}}},"post":{"consumes":["application/json;charset=utf-8"],"produces":["application/json;charset=utf-8"],"parameters":[{"required":true,"schema":{"$ref":"#/definitions/User"},"in":"body","name":"body"}],"responses":{"400":{"description":"Invalid `body`"},"200":{"schema":{"$ref":"#/definitions/UserId"},"description":""}}}},"/{user_id}":{"get":{"produces":["application/json;charset=utf-8"],"parameters":[{"required":true,"in":"path","name":"user_id","type":"integer"}],"responses":{"404":{"description":"`user_id` not found"},"200":{"schema":{"$ref":"#/definitions/User"},"description":""}}}}},"definitions":{"User":{"required":["name","age"],"properties":{"name":{"type":"string"},"age":{"maximum":9223372036854775807,"minimum":-9223372036854775808,"type":"integer"}},"type":"object"},"UserId":{"type":"integer"}}} -- -- By default @'toSwagger'@ will generate specification for all API routes, parameters, headers, responses and data schemas. -- @@ -119,7 +119,7 @@ -- & info.license ?~ "MIT" -- & host ?~ "example.com" -- :} --- {"swagger":"2.0","info":{"version":"1.0","title":"User API","license":{"name":"MIT"},"description":"This is an API for the Users service"},"host":"example.com","paths":{"/":{"get":{"produces":["application/json"],"responses":{"200":{"schema":{"items":{"$ref":"#/definitions/User"},"type":"array"},"description":""}}},"post":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"required":true,"schema":{"$ref":"#/definitions/User"},"in":"body","name":"body"}],"responses":{"400":{"description":"Invalid `body`"},"200":{"schema":{"$ref":"#/definitions/UserId"},"description":""}}}},"/{user_id}":{"get":{"produces":["application/json"],"parameters":[{"required":true,"in":"path","name":"user_id","type":"integer"}],"responses":{"404":{"description":"`user_id` not found"},"200":{"schema":{"$ref":"#/definitions/User"},"description":""}}}}},"definitions":{"User":{"required":["name","age"],"properties":{"name":{"type":"string"},"age":{"maximum":9223372036854775807,"minimum":-9223372036854775808,"type":"integer"}},"type":"object"},"UserId":{"type":"integer"}}} +-- {"swagger":"2.0","info":{"version":"1.0","title":"User API","license":{"name":"MIT"},"description":"This is an API for the Users service"},"host":"example.com","paths":{"/":{"get":{"produces":["application/json;charset=utf-8"],"responses":{"200":{"schema":{"items":{"$ref":"#/definitions/User"},"type":"array"},"description":""}}},"post":{"consumes":["application/json;charset=utf-8"],"produces":["application/json;charset=utf-8"],"parameters":[{"required":true,"schema":{"$ref":"#/definitions/User"},"in":"body","name":"body"}],"responses":{"400":{"description":"Invalid `body`"},"200":{"schema":{"$ref":"#/definitions/UserId"},"description":""}}}},"/{user_id}":{"get":{"produces":["application/json;charset=utf-8"],"parameters":[{"required":true,"in":"path","name":"user_id","type":"integer"}],"responses":{"404":{"description":"`user_id` not found"},"200":{"schema":{"$ref":"#/definitions/User"},"description":""}}}}},"definitions":{"User":{"required":["name","age"],"properties":{"name":{"type":"string"},"age":{"maximum":9223372036854775807,"minimum":-9223372036854775808,"type":"integer"}},"type":"object"},"UserId":{"type":"integer"}}} -- -- It is also useful to annotate or modify certain endpoints. -- @'subOperations'@ provides a convenient way to zoom into a part of an API. @@ -137,7 +137,7 @@ -- & applyTagsFor getOps ["get" & description ?~ "GET operations"] -- & applyTagsFor postOps ["post" & description ?~ "POST operations"] -- :} --- {"swagger":"2.0","info":{"version":"","title":""},"paths":{"/":{"get":{"tags":["get"],"produces":["application/json"],"responses":{"200":{"schema":{"items":{"$ref":"#/definitions/User"},"type":"array"},"description":""}}},"post":{"tags":["post"],"consumes":["application/json"],"produces":["application/json"],"parameters":[{"required":true,"schema":{"$ref":"#/definitions/User"},"in":"body","name":"body"}],"responses":{"400":{"description":"Invalid `body`"},"200":{"schema":{"$ref":"#/definitions/UserId"},"description":""}}}},"/{user_id}":{"get":{"tags":["get"],"produces":["application/json"],"parameters":[{"required":true,"in":"path","name":"user_id","type":"integer"}],"responses":{"404":{"description":"`user_id` not found"},"200":{"schema":{"$ref":"#/definitions/User"},"description":""}}}}},"definitions":{"User":{"required":["name","age"],"properties":{"name":{"type":"string"},"age":{"maximum":9223372036854775807,"minimum":-9223372036854775808,"type":"integer"}},"type":"object"},"UserId":{"type":"integer"}},"tags":[{"name":"get","description":"GET operations"},{"name":"post","description":"POST operations"}]} +-- {"swagger":"2.0","info":{"version":"","title":""},"paths":{"/":{"get":{"tags":["get"],"produces":["application/json;charset=utf-8"],"responses":{"200":{"schema":{"items":{"$ref":"#/definitions/User"},"type":"array"},"description":""}}},"post":{"tags":["post"],"consumes":["application/json;charset=utf-8"],"produces":["application/json;charset=utf-8"],"parameters":[{"required":true,"schema":{"$ref":"#/definitions/User"},"in":"body","name":"body"}],"responses":{"400":{"description":"Invalid `body`"},"200":{"schema":{"$ref":"#/definitions/UserId"},"description":""}}}},"/{user_id}":{"get":{"tags":["get"],"produces":["application/json;charset=utf-8"],"parameters":[{"required":true,"in":"path","name":"user_id","type":"integer"}],"responses":{"404":{"description":"`user_id` not found"},"200":{"schema":{"$ref":"#/definitions/User"},"description":""}}}}},"definitions":{"User":{"required":["name","age"],"properties":{"name":{"type":"string"},"age":{"maximum":9223372036854775807,"minimum":-9223372036854775808,"type":"integer"}},"type":"object"},"UserId":{"type":"integer"}},"tags":[{"name":"get","description":"GET operations"},{"name":"post","description":"POST operations"}]} -- -- This applies @\"get\"@ tag to the @GET@ endpoints and @\"post\"@ tag to the @POST@ endpoint of the User API. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/servant-swagger-1.1.2/test/DocTest.hs new/servant-swagger-1.1.3.1/test/DocTest.hs --- old/servant-swagger-1.1.2/test/DocTest.hs 2016-09-13 08:58:34.000000000 +0200 +++ new/servant-swagger-1.1.3.1/test/DocTest.hs 1970-01-01 01:00:00.000000000 +0100 @@ -1,30 +0,0 @@ -module Main where - -import Build_doctests (autogen_dir, deps) -import Control.Applicative -import Control.Monad -import Data.List -import System.Directory -import System.FilePath -import Test.DocTest - -main :: IO () -main = getSources >>= \sources -> doctest $ - "-isrc" - : ("-i" ++ autogen_dir) - : "-optP-include" - : ("-optP" ++ autogen_dir ++ "/cabal_macros.h") - : "-hide-all-packages" - : map ("-package="++) deps ++ sources - -getSources :: IO [FilePath] -getSources = filter (isSuffixOf ".hs") <$> go "src" - where - go dir = do - (dirs, files) <- getFilesAndDirectories dir - (files ++) . concat <$> mapM go dirs - -getFilesAndDirectories :: FilePath -> IO ([FilePath], [FilePath]) -getFilesAndDirectories dir = do - c <- map (dir </>) . filter (`notElem` ["..", "."]) <$> getDirectoryContents dir - (,) <$> filterM doesDirectoryExist c <*> filterM doesFileExist c diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/servant-swagger-1.1.2/test/Servant/SwaggerSpec.hs new/servant-swagger-1.1.3.1/test/Servant/SwaggerSpec.hs --- old/servant-swagger-1.1.2/test/Servant/SwaggerSpec.hs 2016-09-13 08:58:34.000000000 +0200 +++ new/servant-swagger-1.1.3.1/test/Servant/SwaggerSpec.hs 2017-07-15 00:09:54.000000000 +0200 @@ -102,7 +102,7 @@ }, "404": { "description": "`id` not found" } }, - "produces": [ "application/json" ], + "produces": [ "application/json;charset=utf-8" ], "parameters": [ { @@ -259,7 +259,7 @@ } }, "produces":[ - "application/json" + "application/json;charset=utf-8" ], "tags":[ "users" @@ -280,7 +280,7 @@ } }, "produces":[ - "application/json" + "application/json;charset=utf-8" ], "tags":[ "packages" @@ -301,7 +301,7 @@ } }, "produces":[ - "application/json" + "application/json;charset=utf-8" ], "parameters":[ { @@ -363,7 +363,7 @@ "description":"" } }, - "produces":[ "application/json" ] + "produces":[ "application/json;charset=utf-8" ] }, "get":{ "responses":{ @@ -374,7 +374,7 @@ "description":"" } }, - "produces":[ "application/json" ], + "produces":[ "application/json;charset=utf-8" ], "tags":[ "get" ] } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/servant-swagger-1.1.2/test/doctests.hs new/servant-swagger-1.1.3.1/test/doctests.hs --- old/servant-swagger-1.1.2/test/doctests.hs 1970-01-01 01:00:00.000000000 +0100 +++ new/servant-swagger-1.1.3.1/test/doctests.hs 2017-07-15 00:09:54.000000000 +0200 @@ -0,0 +1,12 @@ +module Main where + +import Build_doctests (flags, pkgs, module_sources) +import Data.Foldable (traverse_) +import Test.DocTest + +main :: IO () +main = do + traverse_ putStrLn args + doctest args + where + args = flags ++ pkgs ++ module_sources
participants (1)
-
root@hilbert.suse.de