Hello community,

here is the log from the commit of package ghc-yesod-static for 
openSUSE:Factory checked in at 2017-04-11 09:44:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-yesod-static (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-yesod-static.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-yesod-static"

Tue Apr 11 09:44:15 2017 rev:6 rq:485180 version:1.5.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-yesod-static/ghc-yesod-static.changes        
2016-12-10 18:27:07.795256564 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-yesod-static.new/ghc-yesod-static.changes   
2017-04-11 09:44:18.472330488 +0200
@@ -1,0 +2,5 @@
+Tue Mar  7 11:19:24 UTC 2017 - psim...@suse.com
+
+- Update to version 1.5.2 with cabal2obs.
+
+-------------------------------------------------------------------

Old:
----
  yesod-static-1.5.1.1.tar.gz

New:
----
  yesod-static-1.5.2.tar.gz

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

Other differences:
------------------
++++++ ghc-yesod-static.spec ++++++
--- /var/tmp/diff_new_pack.Sw5yFB/_old  2017-04-11 09:44:19.688158737 +0200
+++ /var/tmp/diff_new_pack.Sw5yFB/_new  2017-04-11 09:44:19.692158172 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-yesod-static
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
 %global pkg_name yesod-static
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        1.5.1.1
+Version:        1.5.2
 Release:        0
 Summary:        Static file serving subsite for Yesod Web Framework
 License:        MIT

++++++ yesod-static-1.5.1.1.tar.gz -> yesod-static-1.5.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yesod-static-1.5.1.1/ChangeLog.md 
new/yesod-static-1.5.2/ChangeLog.md
--- old/yesod-static-1.5.1.1/ChangeLog.md       2016-11-06 11:08:16.000000000 
+0100
+++ new/yesod-static-1.5.2/ChangeLog.md 2017-02-08 10:18:54.000000000 +0100
@@ -1,3 +1,8 @@
+## 1.5.2
+
+* Fix test case for CRLF line endings
+* Fix warnings
+
 ## 1.5.1.1
 
 * Fix test suite compilation
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yesod-static-1.5.1.1/Yesod/EmbeddedStatic/Generators.hs 
new/yesod-static-1.5.2/Yesod/EmbeddedStatic/Generators.hs
--- old/yesod-static-1.5.1.1/Yesod/EmbeddedStatic/Generators.hs 2016-11-06 
11:08:16.000000000 +0100
+++ new/yesod-static-1.5.2/Yesod/EmbeddedStatic/Generators.hs   2017-02-05 
13:38:01.000000000 +0100
@@ -30,10 +30,9 @@
   -- $example
 ) where
 
-import Control.Applicative ((<$>), (<*>))
+import Control.Applicative as A ((<$>), (<*>))
 import Control.Exception (try, SomeException)
 import Control.Monad (forM, when)
-import Control.Monad.Trans.Resource (runResourceT)
 import Data.Char (isDigit, isLower)
 import Data.Conduit (($$))
 import Data.Default (def)
@@ -209,9 +208,9 @@
                 }
     (Just hin, Just hout, _, ph) <- Proc.createProcess p
     (compressed, (), code) <- runConcurrently $ (,,)
-        <$> Concurrently (sourceHandle hout $$ C.consume)
-        <*> Concurrently (BL.hPut hin ct >> hClose hin)
-        <*> Concurrently (Proc.waitForProcess ph)
+        A.<$> Concurrently (sourceHandle hout $$ C.consume)
+        A.<*> Concurrently (BL.hPut hin ct >> hClose hin)
+        A.<*> Concurrently (Proc.waitForProcess ph)
     if code == ExitSuccess
         then do
             putStrLn $ "Compressed successfully with " ++ f
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yesod-static-1.5.1.1/Yesod/EmbeddedStatic/Internal.hs 
new/yesod-static-1.5.2/Yesod/EmbeddedStatic/Internal.hs
--- old/yesod-static-1.5.1.1/Yesod/EmbeddedStatic/Internal.hs   2016-11-06 
11:08:16.000000000 +0100
+++ new/yesod-static-1.5.2/Yesod/EmbeddedStatic/Internal.hs     2017-02-05 
13:38:01.000000000 +0100
@@ -16,7 +16,7 @@
     , widgetSettings
 ) where
 
-import Control.Applicative ((<$>))
+import Control.Applicative as A ((<$>))
 import Data.IORef
 import Language.Haskell.TH
 import Network.HTTP.Types (Status(..), status404, status200, status304)
@@ -28,7 +28,6 @@
           ( HandlerT
           , ParseRoute(..)
           , RenderRoute(..)
-          , Yesod(..)
           , getYesod
           , liftIO
           )
@@ -140,13 +139,12 @@
                           -> HandlerT site IO (Maybe (Either T.Text (Route 
site, [(T.Text, T.Text)])))
 
 -- | Helper for embedStaticContent and embedLicensedStaticContent.
-staticContentHelper :: Yesod site
-                    => (site -> EmbeddedStatic)
+staticContentHelper :: (site -> EmbeddedStatic)
                     -> (Route EmbeddedStatic -> Route site)
                     -> (BL.ByteString -> Either a BL.ByteString)
                     -> AddStaticContent site
 staticContentHelper getStatic staticR minify ext _ ct = do
-    wIORef <- widgetFiles . getStatic <$> getYesod
+    wIORef <- widgetFiles . getStatic A.<$> getYesod
     let hash = T.pack $ base64md5 ct
         hash' = Just $ T.encodeUtf8 hash
         filename = T.concat [hash, ".", ext]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yesod-static-1.5.1.1/Yesod/EmbeddedStatic.hs 
new/yesod-static-1.5.2/Yesod/EmbeddedStatic.hs
--- old/yesod-static-1.5.1.1/Yesod/EmbeddedStatic.hs    2016-11-06 
11:08:16.000000000 +0100
+++ new/yesod-static-1.5.2/Yesod/EmbeddedStatic.hs      2017-02-05 
13:38:01.000000000 +0100
@@ -49,7 +49,7 @@
   , module Yesod.EmbeddedStatic.Generators
 ) where
 
-import Control.Applicative ((<$>))
+import Control.Applicative as A ((<$>))
 import Data.IORef
 import Data.Maybe (catMaybes)
 import Language.Haskell.TH
@@ -59,7 +59,6 @@
 import System.IO.Unsafe (unsafePerformIO)
 import Yesod.Core
           ( HandlerT
-          , Yesod(..)
           , YesodSubDispatch(..)
           )
 import Yesod.Core.Types
@@ -82,7 +81,7 @@
 embeddedResourceR :: [T.Text] -> [(T.Text, T.Text)] -> Route EmbeddedStatic
 embeddedResourceR = EmbeddedResourceR
 
-instance Yesod master => YesodSubDispatch EmbeddedStatic (HandlerT master IO) 
where
+instance YesodSubDispatch EmbeddedStatic (HandlerT master IO) where
     yesodSubDispatch YesodSubRunnerEnv {..} req = resp
         where
             master = yreSite ysreParentEnv
@@ -136,7 +135,7 @@
                  -> [Generator] -- ^ the generators (see 
"Yesod.EmbeddedStatic.Generators")
                  -> Q [Dec]
 mkEmbeddedStatic dev esName gen = do
-    entries <- concat <$> sequence gen
+    entries <- concat A.<$> sequence gen
     computed <- runIO $ mapM (if dev then devEmbed else prodEmbed) entries
 
     let settings = Static.mkSettings $ return $ map cStEntry computed
@@ -176,8 +175,7 @@
 -- >     addStaticContent = embedStaticContent getStatic StaticR mini
 -- >         where mini = if development then Right else minifym
 -- >     ...
-embedStaticContent :: Yesod site
-                   => (site -> EmbeddedStatic)   -- ^ How to retrieve the 
embedded static subsite from your site
+embedStaticContent :: (site -> EmbeddedStatic)   -- ^ How to retrieve the 
embedded static subsite from your site
                    -> (Route EmbeddedStatic -> Route site) -- ^ how to convert 
an embedded static route
                    -> (BL.ByteString -> Either a BL.ByteString) -- ^ 
javascript minifier
                    -> AddStaticContent site
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yesod-static-1.5.1.1/Yesod/Static.hs 
new/yesod-static-1.5.2/Yesod/Static.hs
--- old/yesod-static-1.5.1.1/Yesod/Static.hs    2016-11-06 11:08:16.000000000 
+0100
+++ new/yesod-static-1.5.2/Yesod/Static.hs      2017-02-05 13:38:01.000000000 
+0100
@@ -96,9 +96,8 @@
 import Data.Conduit.Binary (sourceFile)
 import qualified Data.Conduit.Text as CT
 import Data.Functor.Identity (runIdentity)
-import System.FilePath ((</>), (<.>), FilePath, takeDirectory)
+import System.FilePath ((</>), (<.>), takeDirectory)
 import qualified System.FilePath as F
-import System.Directory (createDirectoryIfMissing)
 import qualified Data.Text.Lazy as TL
 import qualified Data.Text.Lazy.Encoding as TLE
 import Data.Default
@@ -349,7 +348,6 @@
                         | isLower (head name') -> name'
                         | otherwise -> '_' : name'
         f' <- [|map pack $(TH.lift f)|]
-        pack' <- [|pack|]
         qs <- if makeHash
                     then do hash <- qRunIO $ base64md5File $ pathFromRawPieces 
fp f
                             [|[(pack "etag", pack $(TH.lift hash))]|]
@@ -505,9 +503,6 @@
         , csCombinedFolder = "combined"
         }
 
-errorIntro :: [FilePath] -> [Char] -> [Char]
-errorIntro fps s = "Error minifying " ++ show fps ++ ": " ++ s
-
 liftRoutes :: [Route Static] -> Q Exp
 liftRoutes =
     fmap ListE . mapM go
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yesod-static-1.5.1.1/test/FileGeneratorTests.hs 
new/yesod-static-1.5.2/test/FileGeneratorTests.hs
--- old/yesod-static-1.5.1.1/test/FileGeneratorTests.hs 2016-11-06 
11:08:16.000000000 +0100
+++ new/yesod-static-1.5.2/test/FileGeneratorTests.hs   2017-02-07 
16:18:21.000000000 +0100
@@ -78,7 +78,8 @@
     describe "Compress" $ do
         it "compress tool function" $ do
             out <- compressTool "runhaskell" [] "main = putStrLn \"Hello 
World\""
-            assertEqual "" "Hello World\n" out
+            -- 13 == CR, to make this test work on Windows
+            BL.filter (/= 13) out `shouldBe` "Hello World\n"
 
         it "tryCompressTools" $ do
             out <- flip tryCompressTools "abcdef" 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yesod-static-1.5.1.1/test/GeneratorTestUtil.hs 
new/yesod-static-1.5.2/test/GeneratorTestUtil.hs
--- old/yesod-static-1.5.1.1/test/GeneratorTestUtil.hs  2016-11-06 
11:08:16.000000000 +0100
+++ new/yesod-static-1.5.2/test/GeneratorTestUtil.hs    2017-02-05 
13:38:01.000000000 +0100
@@ -5,8 +5,8 @@
 import Control.Monad (when)
 import Data.List (sortBy)
 import Language.Haskell.TH
-import Test.HUnit hiding (Location)
-import Yesod.EmbeddedStatic.Types
+import Test.HUnit
+import Yesod.EmbeddedStatic.Types as Y
 import qualified Data.ByteString.Lazy as BL
 
 -- We test the generators by executing them at compile time
@@ -20,8 +20,8 @@
                    | GenSuccessWithDevel (IO BL.ByteString)
 
 -- | Creates a GenTestResult at compile time by testing the entry.
-testEntry :: Maybe String -> Location -> IO BL.ByteString -> Entry -> ExpQ
-testEntry name _ _ e | ebHaskellName e /= (mkName <$> name) =
+testEntry :: Maybe String -> Y.Location -> IO BL.ByteString -> Entry -> ExpQ
+testEntry name _ _ e | ebHaskellName e /= (mkName Control.Applicative.<$> 
name) =
     [| GenError ("haskell name " ++ $(litE $ stringL $ show $ ebHaskellName e)
                                  ++ " /= "
                                  ++ $(litE $ stringL $ show name)) |]
@@ -34,12 +34,12 @@
         then [| GenSuccessWithDevel $(ebDevelReload e) |]
         else [| GenError "production content" |]
 
-testOneEntry :: Maybe String -> Location -> IO BL.ByteString -> [Entry] -> ExpQ
+testOneEntry :: Maybe String -> Y.Location -> IO BL.ByteString -> [Entry] -> 
ExpQ
 testOneEntry name loc ct [e] = testEntry name loc ct e
 testOneEntry _ _ _ _ = [| GenError "not exactly one entry" |]
 
 -- | Tests a list of entries
-testEntries :: [(Maybe String, Location, IO BL.ByteString)] -> [Entry] -> ExpQ
+testEntries :: [(Maybe String, Y.Location, IO BL.ByteString)] -> [Entry] -> 
ExpQ
 testEntries a b | length a /= length b = [| [GenError "lengths differ"] |]
 testEntries a b = listE $ zipWith f a' b'
     where
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yesod-static-1.5.1.1/yesod-static.cabal 
new/yesod-static-1.5.2/yesod-static.cabal
--- old/yesod-static-1.5.1.1/yesod-static.cabal 2016-11-06 11:08:16.000000000 
+0100
+++ new/yesod-static-1.5.2/yesod-static.cabal   2017-02-08 10:18:58.000000000 
+0100
@@ -1,5 +1,5 @@
 name:            yesod-static
-version:         1.5.1.1
+version:         1.5.2
 license:         MIT
 license-file:    LICENSE
 author:          Michael Snoyman <mich...@snoyman.com>
@@ -78,6 +78,17 @@
     main-is: tests.hs
     type: exitcode-stdio-1.0
     cpp-options:   -DTEST_EXPORT
+    other-modules:   EmbedDevelTest
+                     EmbedProductionTest
+                     EmbedTestGenerator
+                     FileGeneratorTests
+                     GeneratorTestUtil
+                     Yesod.EmbeddedStatic
+                     Yesod.EmbeddedStatic.Generators
+                     Yesod.EmbeddedStatic.Internal
+                     Yesod.EmbeddedStatic.Types
+                     Yesod.Static
+                     YesodStaticTest
     build-depends:   base
                    , hspec >= 1.3
                    , yesod-test >= 1.4


Reply via email to