Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package hspec-discover for openSUSE:Factory checked in at 2021-06-01 10:38:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/hspec-discover (Old) and /work/SRC/openSUSE:Factory/.hspec-discover.new.1898 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "hspec-discover" Tue Jun 1 10:38:59 2021 rev:18 rq:896204 version:2.8.2 Changes: -------- --- /work/SRC/openSUSE:Factory/hspec-discover/hspec-discover.changes 2021-04-24 23:10:12.995485036 +0200 +++ /work/SRC/openSUSE:Factory/.hspec-discover.new.1898/hspec-discover.changes 2021-06-01 10:40:36.805134993 +0200 @@ -1,0 +2,18 @@ +Sat May 15 15:56:04 UTC 2021 - [email protected] + +- Update hspec-discover to version 2.8.2. + Upstream does not provide a change log file. + +------------------------------------------------------------------- +Wed May 12 17:27:35 UTC 2021 - [email protected] + +- Update hspec-discover to version 2.8.1. + Upstream does not provide a change log file. + +------------------------------------------------------------------- +Tue May 11 18:34:39 UTC 2021 - [email protected] + +- Update hspec-discover to version 2.8.0. + Upstream does not provide a change log file. + +------------------------------------------------------------------- Old: ---- hspec-discover-2.7.10.tar.gz New: ---- hspec-discover-2.8.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ hspec-discover.spec ++++++ --- /var/tmp/diff_new_pack.on9wa7/_old 2021-06-01 10:40:37.181135633 +0200 +++ /var/tmp/diff_new_pack.on9wa7/_new 2021-06-01 10:40:37.185135640 +0200 @@ -19,7 +19,7 @@ %global pkg_name hspec-discover %bcond_with tests Name: %{pkg_name} -Version: 2.7.10 +Version: 2.8.2 Release: 0 Summary: Automatically discover and run Hspec tests License: MIT ++++++ hspec-discover-2.7.10.tar.gz -> hspec-discover-2.8.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hspec-discover-2.7.10/hspec-discover.cabal new/hspec-discover-2.8.2/hspec-discover.cabal --- old/hspec-discover-2.7.10/hspec-discover.cabal 2001-09-09 03:46:40.000000000 +0200 +++ new/hspec-discover-2.8.2/hspec-discover.cabal 2001-09-09 03:46:40.000000000 +0200 @@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: hspec-discover -version: 2.7.10 +version: 2.8.2 license: MIT license-file: LICENSE copyright: (c) 2012-2021 Simon Hengel diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hspec-discover-2.7.10/src/Test/Hspec/Discover/Run.hs new/hspec-discover-2.8.2/src/Test/Hspec/Discover/Run.hs --- old/hspec-discover-2.7.10/src/Test/Hspec/Discover/Run.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/hspec-discover-2.8.2/src/Test/Hspec/Discover/Run.hs 2001-09-09 03:46:40.000000000 +0200 @@ -36,8 +36,7 @@ fromString = showString data Spec = Spec { - specFile :: FilePath -, specModule :: String + specModule :: String } deriving (Eq, Show) run :: [String] -> IO () @@ -49,7 +48,9 @@ hPutStrLn stderr err exitFailure Right conf -> do - when (configNested conf) (hPutStrLn stderr "hspec-discover: WARNING - The `--nested' option is deprecated and will be removed in a future release!") + when (configNested conf) (hPutStrLn stderr "hspec-discover: WARNING - The `--nested' option is deprecated and will be removed in a future release!") + when (configNoMain conf) (hPutStrLn stderr "hspec-discover: WARNING - The `--no-main' option is deprecated and will be removed in a future release!") + when (isJust $ configFormatter conf) (hPutStrLn stderr "hspec-discover: WARNING - The `--formatter' option is deprecated and will be removed in a future release!") specs <- findSpecs src writeFile dst (mkSpecModule src conf specs) _ -> do @@ -59,6 +60,7 @@ mkSpecModule :: FilePath -> Config -> [Spec] -> String mkSpecModule src conf nodes = ( "{-# LINE 1 " . shows src . " #-}\n" + . showString "{-# LANGUAGE NoImplicitPrelude #-}\n" . showString "{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-}\n" . showString ("module " ++ moduleName src conf ++" where\n") . importList nodes @@ -115,18 +117,18 @@ -- | Convert a spec to code. formatSpec :: Spec -> ShowS -formatSpec (Spec file name) = "postProcessSpec " . shows file . " (describe " . shows name . " " . showString name . "Spec.spec)" +formatSpec (Spec name) = "describe " . shows name . " " . showString name . "Spec.spec" findSpecs :: FilePath -> IO [Spec] findSpecs src = do let (dir, file) = splitFileName src - mapMaybe (fileToSpec dir) . filter (/= file) <$> getFilesRecursive dir + mapMaybe fileToSpec . filter (/= file) <$> getFilesRecursive dir -fileToSpec :: FilePath -> FilePath -> Maybe Spec -fileToSpec dir file = case reverse $ splitDirectories file of +fileToSpec :: FilePath -> Maybe Spec +fileToSpec file = case reverse $ splitDirectories file of x:xs -> case stripSuffix "Spec.hs" x <|> stripSuffix "Spec.lhs" x of Just name | isValidModuleName name && all isValidModuleName xs -> - Just . Spec (dir </> file) $ (intercalate "." . reverse) (name : xs) + Just . Spec $ (intercalate "." . reverse) (name : xs) _ -> Nothing _ -> Nothing where diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hspec-discover-2.7.10/test/Test/Hspec/Discover/RunSpec.hs new/hspec-discover-2.8.2/test/Test/Hspec/Discover/RunSpec.hs --- old/hspec-discover-2.7.10/test/Test/Hspec/Discover/RunSpec.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/hspec-discover-2.8.2/test/Test/Hspec/Discover/RunSpec.hs 2001-09-09 03:46:40.000000000 +0200 @@ -8,7 +8,7 @@ import Data.List (sort) import Test.Hspec.Discover.Run hiding (Spec) -import qualified Test.Hspec.Discover.Run +import qualified Test.Hspec.Discover.Run as Run main :: IO () main = hspec spec @@ -28,6 +28,7 @@ run ["test-data/nested-spec/Spec.hs", "", f] readFile f `shouldReturn` unlines [ "{-# LINE 1 \"test-data/nested-spec/Spec.hs\" #-}" + , "{-# LANGUAGE NoImplicitPrelude #-}" , "{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-}" , "module Main where" , "import qualified Foo.Bar.BazSpec" @@ -38,9 +39,9 @@ , "main = hspec spec" , "spec :: Spec" , "spec = " ++ unwords [ - "postProcessSpec \"test-data/nested-spec/Foo/Bar/BazSpec.hs\" (describe \"Foo.Bar.Baz\" Foo.Bar.BazSpec.spec)" - , ">> postProcessSpec \"test-data/nested-spec/Foo/BarSpec.hs\" (describe \"Foo.Bar\" Foo.BarSpec.spec)" - , ">> postProcessSpec \"test-data/nested-spec/FooSpec.hs\" (describe \"Foo\" FooSpec.spec)" + "describe \"Foo.Bar.Baz\" Foo.Bar.BazSpec.spec" + , ">> describe \"Foo.Bar\" Foo.BarSpec.spec" + , ">> describe \"Foo\" FooSpec.spec" ] ] @@ -48,6 +49,7 @@ run ["test-data/empty-dir/Spec.hs", "", f] readFile f `shouldReturn` unlines [ "{-# LINE 1 \"test-data/empty-dir/Spec.hs\" #-}" + , "{-# LANGUAGE NoImplicitPrelude #-}" , "{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-}" , "module Main where" , "import Test.Hspec.Discover" @@ -72,37 +74,35 @@ describe "fileToSpec" $ do it "converts path to spec name" $ do - fileToSpec "" "FooSpec.hs" `shouldBe` Just (spec_ "FooSpec.hs" "Foo") + fileToSpec "FooSpec.hs" `shouldBe` Just (Run.Spec "Foo") it "rejects spec with empty name" $ do - fileToSpec "" "Spec.hs" `shouldBe` Nothing + fileToSpec "Spec.hs" `shouldBe` Nothing it "works for lhs files" $ do - fileToSpec "" "FooSpec.lhs" `shouldBe` Just (spec_ "FooSpec.lhs" "Foo") + fileToSpec "FooSpec.lhs" `shouldBe` Just (Run.Spec "Foo") it "returns Nothing for invalid spec name" $ do - fileToSpec "" "foo" `shouldBe` Nothing + fileToSpec "foo" `shouldBe` Nothing context "when spec does not have a valid module name" $ do it "returns Nothing" $ do - fileToSpec "" "flycheck_Spec.hs" `shouldBe` Nothing + fileToSpec "flycheck_Spec.hs" `shouldBe` Nothing context "when any component of a hierarchical module name is not valid"$ do it "returns Nothing" $ do - fileToSpec "" ("Valid" </> "invalid" </>"MiddleNamesSpec.hs") `shouldBe` Nothing + fileToSpec ("Valid" </> "invalid" </>"MiddleNamesSpec.hs") `shouldBe` Nothing context "when path has directory component" $ do it "converts path to spec name" $ do - let file = "Foo" </> "Bar" </> "BazSpec.hs" - fileToSpec "" file `shouldBe` Just (spec_ file "Foo.Bar.Baz") + fileToSpec ("Foo" </> "Bar" </> "BazSpec.hs") `shouldBe` Just (Run.Spec "Foo.Bar.Baz") it "rejects spec with empty name" $ do - fileToSpec "" ("Foo" </> "Bar" </> "Spec.hs") `shouldBe` Nothing + fileToSpec ("Foo" </> "Bar" </> "Spec.hs") `shouldBe` Nothing describe "findSpecs" $ do it "finds specs" $ do - let dir = "test-data/nested-spec" - findSpecs (dir </> "Spec.hs") `shouldReturn` [spec_ (dir </> "Foo/Bar/BazSpec.hs") "Foo.Bar.Baz", spec_ (dir </> "Foo/BarSpec.hs") "Foo.Bar", spec_ (dir </> "FooSpec.hs") "Foo"] + findSpecs ("test-data" </> "nested-spec" </> "Spec.hs") `shouldReturn` [Run.Spec "Foo.Bar.Baz", Run.Spec "Foo.Bar", Run.Spec "Foo"] describe "driverWithFormatter" $ do it "generates a test driver that uses a custom formatter" $ do @@ -118,9 +118,7 @@ describe "importList" $ do it "generates imports for a list of specs" $ do - importList [spec_ "FooSpec.hs" "Foo", spec_ "BarSpec.hs" "Bar"] "" `shouldBe` unlines [ + importList [Run.Spec "Foo", Run.Spec "Bar"] "" `shouldBe` unlines [ "import qualified FooSpec" , "import qualified BarSpec" ] - where - spec_ = Test.Hspec.Discover.Run.Spec diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hspec-discover-2.7.10/version.yaml new/hspec-discover-2.8.2/version.yaml --- old/hspec-discover-2.7.10/version.yaml 2001-09-09 03:46:40.000000000 +0200 +++ new/hspec-discover-2.8.2/version.yaml 2001-09-09 03:46:40.000000000 +0200 @@ -1 +1 @@ -&version 2.7.10 +&version 2.8.2
