Hello community,

here is the log from the commit of package hpack for openSUSE:Factory checked 
in at 2017-06-21 13:56:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/hpack (Old)
 and      /work/SRC/openSUSE:Factory/.hpack.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "hpack"

Wed Jun 21 13:56:58 2017 rev:7 rq:504688 version:0.17.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/hpack/hpack.changes      2017-04-11 
09:48:52.493621348 +0200
+++ /work/SRC/openSUSE:Factory/.hpack.new/hpack.changes 2017-06-21 
13:57:00.788880846 +0200
@@ -1,0 +2,5 @@
+Mon Jun 12 09:41:38 UTC 2017 - [email protected]
+
+- Update to version 0.17.1.
+
+-------------------------------------------------------------------

Old:
----
  hpack-0.17.0.tar.gz

New:
----
  hpack-0.17.1.tar.gz

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

Other differences:
------------------
++++++ hpack.spec ++++++
--- /var/tmp/diff_new_pack.Bk4OUd/_old  2017-06-21 13:57:01.616764066 +0200
+++ /var/tmp/diff_new_pack.Bk4OUd/_new  2017-06-21 13:57:01.628762374 +0200
@@ -19,7 +19,7 @@
 %global pkg_name hpack
 %bcond_with tests
 Name:           %{pkg_name}
-Version:        0.17.0
+Version:        0.17.1
 Release:        0
 Summary:        An alternative format for Haskell packages
 License:        MIT

++++++ hpack-0.17.0.tar.gz -> hpack-0.17.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hpack-0.17.0/hpack.cabal new/hpack-0.17.1/hpack.cabal
--- old/hpack-0.17.0/hpack.cabal        2017-01-30 02:24:20.000000000 +0100
+++ new/hpack-0.17.1/hpack.cabal        2017-06-08 05:34:06.000000000 +0200
@@ -1,9 +1,9 @@
--- This file has been generated from package.yaml by hpack version 0.15.0.
+-- This file has been generated from package.yaml by hpack version 0.17.0.
 --
 -- see: https://github.com/sol/hpack
 
 name:           hpack
-version:        0.17.0
+version:        0.17.1
 synopsis:       An alternative format for Haskell packages
 description:    See README at <https://github.com/sol/hpack#readme>
 category:       Development
@@ -76,7 +76,7 @@
   main-is: Spec.hs
   hs-source-dirs:
       test
-    , src
+      src
   ghc-options: -Wall
   cpp-options: -DTEST
   build-depends:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hpack-0.17.0/src/Hpack/Config.hs 
new/hpack-0.17.1/src/Hpack/Config.hs
--- old/hpack-0.17.0/src/Hpack/Config.hs        2017-01-30 00:09:54.000000000 
+0100
+++ new/hpack-0.17.1/src/Hpack/Config.hs        2017-06-08 05:34:06.000000000 
+0200
@@ -792,7 +792,7 @@
   if exists
     then do
       src <- canonicalizePath (dir </> src_)
-      removeSetup src . toModules <$> getFilesRecursive src
+      removeSetup src . toModules <$> getModuleFilesRecursive src
     else return []
   where
     toModules :: [[FilePath]] -> [String]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hpack-0.17.0/src/Hpack/Util.hs 
new/hpack-0.17.1/src/Hpack/Util.hs
--- old/hpack-0.17.0/src/Hpack/Util.hs  2017-01-24 15:56:26.000000000 +0100
+++ new/hpack-0.17.1/src/Hpack/Util.hs  2017-06-08 05:34:06.000000000 +0200
@@ -8,7 +8,7 @@
 , LdOption
 , parseMain
 , toModule
-, getFilesRecursive
+, getModuleFilesRecursive
 , tryReadFile
 , expandGlobs
 , sort
@@ -84,13 +84,13 @@
     stripSuffix :: String -> String -> Maybe String
     stripSuffix suffix x = reverse <$> stripPrefix (reverse suffix) (reverse x)
 
-getFilesRecursive :: FilePath -> IO [[String]]
-getFilesRecursive baseDir = go []
+getModuleFilesRecursive :: FilePath -> IO [[String]]
+getModuleFilesRecursive baseDir = go []
   where
     go :: [FilePath] -> IO [[FilePath]]
     go dir = do
       c <- map ((dir ++) . return) . filter (`notElem` [".", ".."]) <$> 
getDirectoryContents (pathTo dir)
-      subdirsFiles  <- filterM (doesDirectoryExist . pathTo) c >>= mapM go
+      subdirsFiles  <- filterM (doesDirectoryExist . pathTo) c >>= mapM go . 
filter isModule
       files <- filterM (doesFileExist . pathTo) c
       return (files ++ concat subdirsFiles)
       where
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hpack-0.17.0/test/Hpack/UtilSpec.hs 
new/hpack-0.17.1/test/Hpack/UtilSpec.hs
--- old/hpack-0.17.0/test/Hpack/UtilSpec.hs     2017-01-09 22:10:01.000000000 
+0100
+++ new/hpack-0.17.1/test/Hpack/UtilSpec.hs     2017-06-08 05:34:06.000000000 
+0200
@@ -49,19 +49,28 @@
     it "rejects invalid module names" $ do
       toModule ["resources", "hello.hs"] `shouldBe` Nothing
 
-  describe "getFilesRecursive" $ do
-    it "gets all files from given directory and all its subdirectories" $ do
-      inTempDirectoryNamed "test" $ do
+  describe "getModuleFilesRecursive" $ do
+    it "gets all files from given directory" $ do
+      inTempDirectory $ do
         touch "foo/bar"
         touch "foo/baz"
-        touch "foo/foobar/baz"
-        actual <- getFilesRecursive "foo"
+        actual <- getModuleFilesRecursive "foo"
         actual `shouldMatchList` [
             ["bar"]
           , ["baz"]
-          , ["foobar", "baz"]
           ]
 
+    it "descends into subdirectories" $ do
+      inTempDirectory $ do
+        touch "foo/Bar/baz"
+        getModuleFilesRecursive "foo" `shouldReturn` [["Bar", "baz"]]
+
+    context "when a subdirectory is not a valid module name" $ do
+      it "does not descend" $ do
+        inTempDirectory $ do
+          touch "foo/bar/baz"
+          getModuleFilesRecursive "foo" `shouldReturn` empty
+
   describe "List" $ do
     let invalid = [aesonQQ|{
           name: "hpack",


Reply via email to