Hello community, here is the log from the commit of package ghc-hspec-contrib for openSUSE:Factory checked in at 2017-03-24 02:14:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-hspec-contrib (Old) and /work/SRC/openSUSE:Factory/.ghc-hspec-contrib.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-hspec-contrib" Fri Mar 24 02:14:56 2017 rev:2 rq:461637 version:0.4.0 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-hspec-contrib/ghc-hspec-contrib.changes 2016-11-16 13:32:18.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.ghc-hspec-contrib.new/ghc-hspec-contrib.changes 2017-03-24 02:14:57.472916116 +0100 @@ -2 +2 @@ -Sun Jul 10 17:07:49 UTC 2016 - [email protected] +Mon Feb 20 08:43:05 UTC 2017 - [email protected] @@ -4 +4 @@ -- Update to version 0.3.0 revision 0 with cabal2obs. +- Update to version 0.4.0 with cabal2obs. Old: ---- hspec-contrib-0.3.0.tar.gz New: ---- hspec-contrib-0.4.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-hspec-contrib.spec ++++++ --- /var/tmp/diff_new_pack.5TabAX/_old 2017-03-24 02:14:57.940849908 +0100 +++ /var/tmp/diff_new_pack.5TabAX/_new 2017-03-24 02:14:57.944849342 +0100 @@ -1,7 +1,7 @@ # # spec file for package ghc-hspec-contrib # -# 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,15 +19,14 @@ %global pkg_name hspec-contrib %bcond_with tests Name: ghc-%{pkg_name} -Version: 0.3.0 +Version: 0.4.0 Release: 0 Summary: Contributed functionality for Hspec License: MIT -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 BuildRequires: ghc-Cabal-devel -# Begin cabal-rpm deps: BuildRequires: ghc-HUnit-devel BuildRequires: ghc-hspec-core-devel BuildRequires: ghc-rpm-macros @@ -36,7 +35,6 @@ BuildRequires: ghc-QuickCheck-devel BuildRequires: ghc-hspec-devel %endif -# End cabal-rpm deps %description Contributed functionality for Hspec. @@ -55,20 +53,14 @@ %prep %setup -q -n %{pkg_name}-%{version} - %build %ghc_lib_build - %install %ghc_lib_install - %check -%if %{with tests} -%{cabal} test -%endif - +%cabal_test %post devel %ghc_pkg_recache ++++++ hspec-contrib-0.3.0.tar.gz -> hspec-contrib-0.4.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hspec-contrib-0.3.0/LICENSE new/hspec-contrib-0.4.0/LICENSE --- old/hspec-contrib-0.3.0/LICENSE 2015-07-31 02:14:54.000000000 +0200 +++ new/hspec-contrib-0.4.0/LICENSE 2017-02-13 02:44:23.000000000 +0100 @@ -1,4 +1,4 @@ -Copyright (c) 2011-2015 Simon Hengel <[email protected]> +Copyright (c) 2011-2017 Simon Hengel <[email protected]> Copyright (c) 2011-2012 Trystan Spangler <[email protected]> Copyright (c) 2011-2011 Greg Weber <[email protected]> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hspec-contrib-0.3.0/hspec-contrib.cabal new/hspec-contrib-0.4.0/hspec-contrib.cabal --- old/hspec-contrib-0.3.0/hspec-contrib.cabal 2015-07-31 02:14:54.000000000 +0200 +++ new/hspec-contrib-0.4.0/hspec-contrib.cabal 2017-02-13 02:44:23.000000000 +0100 @@ -1,8 +1,8 @@ name: hspec-contrib -version: 0.3.0 +version: 0.4.0 license: MIT license-file: LICENSE -copyright: (c) 2011-2015 Simon Hengel, +copyright: (c) 2011-2017 Simon Hengel, (c) 2014 Junji Hashimoto maintainer: Simon Hengel <[email protected]> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hspec-contrib-0.3.0/src/Test/Hspec/Contrib/Retry.hs new/hspec-contrib-0.4.0/src/Test/Hspec/Contrib/Retry.hs --- old/hspec-contrib-0.3.0/src/Test/Hspec/Contrib/Retry.hs 2015-07-31 02:14:54.000000000 +0200 +++ new/hspec-contrib-0.4.0/src/Test/Hspec/Contrib/Retry.hs 2017-02-13 02:44:23.000000000 +0100 @@ -9,12 +9,18 @@ instance Example a => Example (Retry a) where type Arg (Retry a) = Arg a - evaluateExample (Retry n example) a b c = do - v <- evaluateExample example a b c - case v of - Success -> return v - _ | n > 1 -> evaluateExample (Retry (pred n) example) a b c - _ -> return v + evaluateExample (Retry n example) a b c + | n > 1 = do + r <- safeEvaluateExample example a b c + case r of + Right result -> case result of + Success{} -> return result + Pending{} -> return result + Failure{} -> retry + Left _ -> retry + | otherwise = evaluateExample example a b c + where + retry = evaluateExample (Retry (pred n) example) a b c -- | Retry evaluating example that may be failed until success. retryWith :: Int diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hspec-contrib-0.3.0/test/Test/Hspec/Contrib/RetrySpec.hs new/hspec-contrib-0.4.0/test/Test/Hspec/Contrib/RetrySpec.hs --- old/hspec-contrib-0.3.0/test/Test/Hspec/Contrib/RetrySpec.hs 2015-07-31 02:14:54.000000000 +0200 +++ new/hspec-contrib-0.4.0/test/Test/Hspec/Contrib/RetrySpec.hs 2017-02-13 02:44:23.000000000 +0100 @@ -9,7 +9,7 @@ spec :: Spec spec = do - describe "retry test" $ do + describe "retryWith" $ do ref <- runIO $ newIORef (0::Int) it "retry 11 times, then check the value" $ do let incr :: IO Int
