Hello community,

here is the log from the commit of package ghc-wai-middleware-static for 
openSUSE:Factory checked in at 2016-11-11 14:35:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-wai-middleware-static (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-wai-middleware-static.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-wai-middleware-static"

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/ghc-wai-middleware-static/ghc-wai-middleware-static.changes
      2016-11-10 13:17:20.000000000 +0100
+++ 
/work/SRC/openSUSE:Factory/.ghc-wai-middleware-static.new/ghc-wai-middleware-static.changes
 2016-11-11 14:35:15.000000000 +0100
@@ -1,0 +2,5 @@
+Mon Oct 17 15:37:58 UTC 2016 - psim...@suse.com
+
+- Update to version 0.8.1 with cabal2obs.
+
+-------------------------------------------------------------------

Old:
----
  3.cabal
  wai-middleware-static-0.8.0.tar.gz

New:
----
  wai-middleware-static-0.8.1.tar.gz

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

Other differences:
------------------
++++++ ghc-wai-middleware-static.spec ++++++
--- /var/tmp/diff_new_pack.dcrdfA/_old  2016-11-11 14:35:16.000000000 +0100
+++ /var/tmp/diff_new_pack.dcrdfA/_new  2016-11-11 14:35:16.000000000 +0100
@@ -17,34 +17,36 @@
 
 
 %global pkg_name wai-middleware-static
+%bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        0.8.0
+Version:        0.8.1
 Release:        0
 Summary:        WAI middleware that serves requests to static files
 License:        BSD-3-Clause
-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
-Source1:        
https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/3.cabal
 BuildRequires:  ghc-Cabal-devel
-# Begin cabal-rpm deps:
-BuildRequires:  ghc-base16-bytestring-devel
 BuildRequires:  ghc-bytestring-devel
 BuildRequires:  ghc-containers-devel
-BuildRequires:  ghc-cryptohash-devel
+BuildRequires:  ghc-cryptonite-devel
 BuildRequires:  ghc-directory-devel
 BuildRequires:  ghc-expiring-cache-map-devel
 BuildRequires:  ghc-filepath-devel
 BuildRequires:  ghc-http-types-devel
+BuildRequires:  ghc-memory-devel
 BuildRequires:  ghc-mime-types-devel
 BuildRequires:  ghc-mtl-devel
 BuildRequires:  ghc-old-locale-devel
 BuildRequires:  ghc-rpm-macros
+BuildRequires:  ghc-semigroups-devel
 BuildRequires:  ghc-text-devel
 BuildRequires:  ghc-time-devel
 BuildRequires:  ghc-wai-devel
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-# End cabal-rpm deps
+%if %{with tests}
+BuildRequires:  ghc-hpc-coveralls-devel
+%endif
 
 %description
 WAI middleware that intercepts requests to static files and serves them if they
@@ -66,16 +68,15 @@
 
 %prep
 %setup -q -n %{pkg_name}-%{version}
-cp -p %{SOURCE1} %{pkg_name}.cabal
-
 
 %build
 %ghc_lib_build
 
-
 %install
 %ghc_lib_install
 
+%check
+%cabal_test
 
 %post devel
 %ghc_pkg_recache
@@ -89,6 +90,6 @@
 
 %files devel -f %{name}-devel.files
 %defattr(-,root,root,-)
-%doc changelog.md
+%doc README.md changelog.md
 
 %changelog

++++++ wai-middleware-static-0.8.0.tar.gz -> wai-middleware-static-0.8.1.tar.gz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/wai-middleware-static-0.8.0/Network/Wai/Middleware/Static.hs 
new/wai-middleware-static-0.8.1/Network/Wai/Middleware/Static.hs
--- old/wai-middleware-static-0.8.0/Network/Wai/Middleware/Static.hs    
2015-09-15 00:21:31.000000000 +0200
+++ new/wai-middleware-static-0.8.1/Network/Wai/Middleware/Static.hs    
2016-10-10 15:29:15.000000000 +0200
@@ -27,8 +27,9 @@
 import Control.Monad.Trans (liftIO)
 import Data.List
 #if !(MIN_VERSION_base(4,8,0))
-import Data.Monoid
+import Data.Monoid (Monoid(..))
 #endif
+import Data.Semigroup (Semigroup(..))
 import Data.Time
 import Data.Time.Clock.POSIX
 import Network.HTTP.Types (status200, status304)
@@ -39,9 +40,10 @@
 #if !(MIN_VERSION_time(1,5,0))
 import System.Locale
 #endif
-import qualified Crypto.Hash.SHA1 as SHA1
+import Crypto.Hash.Algorithms
+import Crypto.Hash
+import Data.ByteArray.Encoding
 import qualified Data.ByteString as BS
-import qualified Data.ByteString.Base16 as B16
 import qualified Data.ByteString.Char8 as BSC
 import qualified Data.ByteString.Lazy as BSL
 import qualified Data.Text as T
@@ -65,11 +67,16 @@
    | CustomCaching (FileMeta -> RequestHeaders)
 
 -- | Note:
+--   '(<>)' == @>->@ (policy sequencing)
+instance Semigroup Policy where
+    p1 <> p2 = policy (maybe Nothing (tryPolicy p2) . tryPolicy p1)
+
+-- | Note:
 --   'mempty' == @policy Just@ (the always accepting policy)
 --   'mappend' == @>->@ (policy sequencing)
 instance Monoid Policy where
-    mempty = policy Just
-    mappend p1 p2 = policy (maybe Nothing (tryPolicy p2) . tryPolicy p1)
+    mempty  = policy Just
+    mappend = (<>)
 
 -- | Lift a function into a 'Policy'
 policy :: (String -> Maybe String) -> Policy
@@ -82,7 +89,7 @@
 -- | Sequence two policies. They are run from left to right. (Note: this is 
`mappend`)
 infixr 5 >->
 (>->) :: Policy -> Policy -> Policy
-(>->) = mappend
+(>->) = (<>)
 
 -- | Choose between two policies. If the first fails, run the second.
 infixr 4 <|>
@@ -257,7 +264,7 @@
        return $ FileMeta
                 { fm_lastModified =
                       BSC.pack $ formatTime defaultTimeLocale "%a, %d-%b-%Y %X 
%Z" mtime
-                , fm_etag = B16.encode (SHA1.hashlazy ct)
+                , fm_etag = convertToBase Base16 (hashlazy ct :: Digest SHA1)
                 , fm_fileName = fp
                 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-middleware-static-0.8.0/README.md 
new/wai-middleware-static-0.8.1/README.md
--- old/wai-middleware-static-0.8.0/README.md   1970-01-01 01:00:00.000000000 
+0100
+++ new/wai-middleware-static-0.8.1/README.md   2016-10-10 15:29:15.000000000 
+0200
@@ -0,0 +1,3 @@
+# wai-middleware-static [![Build 
Status](https://travis-ci.org/scotty-web/wai-middleware-static.svg)](https://travis-ci.org/scotty-web/wai-middleware-static)[![Coverage
 
Status](https://coveralls.io/repos/scotty-web/wai-middleware-static/badge.png?branch=master)](https://coveralls.io/r/scotty-web/wai-middleware-static?branch=master)
+
+WAI middleware that intercepts requests to static files and serves them if 
they exist.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-middleware-static-0.8.0/changelog.md 
new/wai-middleware-static-0.8.1/changelog.md
--- old/wai-middleware-static-0.8.0/changelog.md        2015-09-15 
00:21:31.000000000 +0200
+++ new/wai-middleware-static-0.8.1/changelog.md        2016-10-10 
15:29:15.000000000 +0200
@@ -1,3 +1,8 @@
+## 0.8.1
+* Add `Semigroup Policy` instance
+* Replace dependencies on `base16-bytestring` and `cryptohash` with the more
+  modern `memory` and `cryptonite` packages, respectively [myfreeweb]
+
 ## 0.8.0
 * The `mime-types` library is now used to lookup MIME types from extensions.
   As a result, some extensions now map to different MIME types. They are:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wai-middleware-static-0.8.0/test/Main.hs 
new/wai-middleware-static-0.8.1/test/Main.hs
--- old/wai-middleware-static-0.8.0/test/Main.hs        1970-01-01 
01:00:00.000000000 +0100
+++ new/wai-middleware-static-0.8.1/test/Main.hs        2016-10-10 
15:29:15.000000000 +0200
@@ -0,0 +1,4 @@
+module Main (main) where
+
+main :: IO ()
+main = return ()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/wai-middleware-static-0.8.0/wai-middleware-static.cabal 
new/wai-middleware-static-0.8.1/wai-middleware-static.cabal
--- old/wai-middleware-static-0.8.0/wai-middleware-static.cabal 2015-09-15 
00:21:31.000000000 +0200
+++ new/wai-middleware-static-0.8.1/wai-middleware-static.cabal 2016-10-10 
15:29:15.000000000 +0200
@@ -1,5 +1,5 @@
 Name:                wai-middleware-static
-Version:             0.8.0
+Version:             0.8.1
 Synopsis:            WAI middleware that serves requests to static files.
 Homepage:            https://github.com/scotty-web/wai-middleware-static
 Bug-reports:         https://github.com/scotty-web/wai-middleware-static/issues
@@ -18,30 +18,41 @@
   .
   [WAI] <http://hackage.haskell.org/package/wai>
 
-Extra-source-files:    changelog.md
+Extra-source-files:    changelog.md, README.md
 
 Library
   Exposed-modules:     Network.Wai.Middleware.Static
   default-language:    Haskell2010
   Build-depends:
                        base               >= 4.6.0.1  && < 5,
-                       base16-bytestring  >= 0.1      && < 0.2,
                        bytestring         >= 0.10.0.2 && < 0.11,
                        containers         >= 0.5.0.0  && < 0.6,
-                       cryptohash         >= 0.11     && < 0.12,
+                       cryptonite         >= 0.10     && < 1.0,
+                       memory             >= 0.10     && < 1.0,
                        directory          >= 1.2.0.1  && < 1.3,
                        expiring-cache-map >= 0.0.5    && < 0.1,
                        filepath           >= 1.3.0.1  && < 1.5,
-                       http-types         >= 0.8.2    && < 0.9,
+                       http-types         >= 0.8.2    && < 0.10,
                        mime-types         >= 0.1.0.3  && < 0.2,
                        mtl                >= 2.1.2    && < 2.3,
                        old-locale         >= 1.0      && < 1.1,
+                       semigroups         >= 0.18     && < 1,
                        text               >= 0.11.3.1 && < 1.3,
-                       time               >= 1.4      && < 1.6,
-                       wai                >= 3.0.0    && < 3.1
+                       time               >= 1.4      && < 1.7,
+                       wai                >= 3.0.0    && < 3.3
 
   GHC-options: -Wall -fno-warn-orphans
 
+test-suite hpc-coveralls-stub
+  main-is:             Main.hs
+  type:                exitcode-stdio-1.0
+  default-language:    Haskell2010
+  hs-source-dirs:      test
+  build-depends:       base,
+                       hpc-coveralls,
+                       wai-middleware-static
+  ghc-options:         -Wall
+
 source-repository head
   type:     git
   location: git://github.com/scotty-web/wai-middleware-static.git


Reply via email to