Hello community,

here is the log from the commit of package ghc-mustache for openSUSE:Factory 
checked in at 2019-12-27 13:55:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-mustache (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-mustache.new.6675 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-mustache"

Fri Dec 27 13:55:27 2019 rev:10 rq:759454 version:2.3.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-mustache/ghc-mustache.changes        
2018-10-25 08:27:40.679765129 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-mustache.new.6675/ghc-mustache.changes      
2019-12-27 13:55:35.620722816 +0100
@@ -1,0 +2,12 @@
+Thu Dec 19 09:58:24 UTC 2019 - [email protected]
+
+- Update mustache to version 2.3.1.
+  Upstream has not updated the file "CHANGELOG.md" since the last
+  release.
+
+-------------------------------------------------------------------
+Fri Nov  8 16:14:16 UTC 2019 - Peter Simons <[email protected]>
+
+- Drop obsolete group attributes.
+
+-------------------------------------------------------------------

Old:
----
  mustache-2.3.0.tar.gz

New:
----
  mustache-2.3.1.tar.gz

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

Other differences:
------------------
++++++ ghc-mustache.spec ++++++
--- /var/tmp/diff_new_pack.8M57NC/_old  2019-12-27 13:55:36.164723079 +0100
+++ /var/tmp/diff_new_pack.8M57NC/_new  2019-12-27 13:55:36.168723081 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-mustache
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 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,11 +19,10 @@
 %global pkg_name mustache
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        2.3.0
+Version:        2.3.1
 Release:        0
 Summary:        A mustache template parser library
 License:        BSD-3-Clause
-Group:          Development/Libraries/Haskell
 URL:            https://hackage.haskell.org/package/%{pkg_name}
 Source0:        
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
 BuildRequires:  chrpath
@@ -66,7 +65,6 @@
 
 %package devel
 Summary:        Haskell %{pkg_name} library development files
-Group:          Development/Libraries/Haskell
 Requires:       %{name} = %{version}-%{release}
 Requires:       ghc-compiler = %{ghc_version}
 Requires(post): ghc-compiler = %{ghc_version}

++++++ mustache-2.3.0.tar.gz -> mustache-2.3.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mustache-2.3.0/mustache.cabal 
new/mustache-2.3.1/mustache.cabal
--- old/mustache-2.3.0/mustache.cabal   2017-11-25 10:14:24.000000000 +0100
+++ new/mustache-2.3.1/mustache.cabal   2019-12-17 13:00:08.000000000 +0100
@@ -1,9 +1,13 @@
--- This file has been generated from package.yaml by hpack version 0.17.1.
+cabal-version: 1.12
+
+-- This file has been generated from package.yaml by hpack version 0.31.2.
 --
 -- see: https://github.com/sol/hpack
+--
+-- hash: 8ffde004ee64f5b057ed66f76bbc72cbb71cdc81dcebe9e822563fdb11a8b338
 
 name:           mustache
-version:        2.3.0
+version:        2.3.1
 synopsis:       A mustache template parser library.
 description:    Allows parsing and rendering template files with mustache 
markup. See the
                 mustache <http://mustache.github.io/mustache.5.html language 
reference>.
@@ -16,20 +20,17 @@
 bug-reports:    https://github.com/JustusAdam/mustache/issues
 author:         Justus Adam
 maintainer:     [email protected]
-copyright:      (c) 2015,
-                2016 Justus Adam
+copyright:      (c) 2015 - 2019 Justus Adam
 license:        BSD3
 license-file:   LICENSE
 tested-with:    GHC>=7.8 && <=7.10.2
 build-type:     Simple
-cabal-version:  >= 1.10
-
 extra-source-files:
-    CHANGELOG.md
     README.md
-    test/unit/examples/partials/test-partial.txt.mustache
+    CHANGELOG.md
     test/unit/examples/test-template-partials.txt.mustache
     test/unit/examples/test-template.txt.mustache
+    test/unit/examples/partials/test-partial.txt.mustache
 
 source-repository head
   type: git
@@ -42,21 +43,21 @@
   other-extensions: NamedFieldPuns OverloadedStrings LambdaCase TupleSections 
TemplateHaskell QuasiQuotes
   ghc-options: -Wall
   build-depends:
-      base >=4.7 && <5
-    , text
-    , aeson
+      aeson
+    , base >=4.7 && <5
     , bytestring
+    , containers
+    , directory
+    , either
     , filepath
-    , parsec
     , mtl >=2.2.1
-    , either
-    , unordered-containers
-    , vector
-    , directory
+    , parsec
     , scientific
-    , containers
     , template-haskell
+    , text
     , th-lift
+    , unordered-containers
+    , vector
   exposed-modules:
       Text.Mustache
       Text.Mustache.Types
@@ -71,58 +72,64 @@
 
 executable haskell-mustache
   main-is: Main.hs
+  other-modules:
+      Paths_mustache
   hs-source-dirs:
       app
   ghc-options: -threaded -Wall
   build-depends:
-      base >=4.7 && <5
-    , text
-    , aeson
+      aeson
+    , base >=4.7 && <5
     , bytestring
+    , cmdargs
     , filepath
     , mustache
+    , text
     , yaml
-    , cmdargs
   default-language: Haskell2010
 
 test-suite language-specifications
   type: exitcode-stdio-1.0
   main-is: Language.hs
+  other-modules:
+      Paths_mustache
   hs-source-dirs:
       test/integration
   build-depends:
-      base >=4.7 && <5
-    , text
-    , aeson
+      aeson
+    , base >=4.7 && <5
+    , base-unicode-symbols
     , bytestring
     , filepath
     , hspec
+    , lens
     , mustache
+    , tar
+    , text
     , unordered-containers
-    , yaml
-    , base-unicode-symbols
     , wreq
+    , yaml
     , zlib
-    , tar
-    , lens
   default-language: Haskell2010
 
 test-suite unit-tests
   type: exitcode-stdio-1.0
   main-is: Spec.hs
+  other-modules:
+      Paths_mustache
   hs-source-dirs:
       test/unit
   build-depends:
-      base >=4.7 && <5
-    , text
-    , aeson
+      aeson
+    , base >=4.7 && <5
     , bytestring
+    , directory
     , filepath
     , hspec
     , mustache
-    , unordered-containers
-    , yaml
     , process
     , temporary
-    , directory
+    , text
+    , unordered-containers
+    , yaml
   default-language: Haskell2010
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mustache-2.3.0/src/Text/Mustache/Compile.hs 
new/mustache-2.3.1/src/Text/Mustache/Compile.hs
--- old/mustache-2.3.0/src/Text/Mustache/Compile.hs     2017-11-24 
12:07:54.000000000 +0100
+++ new/mustache-2.3.1/src/Text/Mustache/Compile.hs     2019-12-17 
12:57:11.000000000 +0100
@@ -92,7 +92,7 @@
             (getPartials mSTree)
 
 
--- | Flatten a list of Templates into a single 'TemplateChache'
+-- | Flatten a list of Templates into a single 'TemplateCache'
 cacheFromList :: [Template] -> TemplateCache
 cacheFromList = flattenPartials . fromList . fmap (name &&& id)
 
@@ -185,10 +185,10 @@
 -- Compile a mustache 'Template' at compile time. Usage:
 --
 -- > {-# LANGUAGE TemplateHaskell #-}
--- > import Text.Mustache.Compile (embedTemplate)
+-- > import Text.Mustache.Compile (embedSingleTemplate)
 -- >
 -- > foo :: Template
--- > foo = $(embedTemplate "dir/file.mustache")
+-- > foo = $(embedSingleTemplate "dir/file.mustache")
 --
 -- Partials are not supported in embedSingleTemplate
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mustache-2.3.0/src/Text/Mustache/Internal/Types.hs 
new/mustache-2.3.1/src/Text/Mustache/Internal/Types.hs
--- old/mustache-2.3.0/src/Text/Mustache/Internal/Types.hs      2017-11-08 
12:54:18.000000000 +0100
+++ new/mustache-2.3.1/src/Text/Mustache/Internal/Types.hs      2019-12-17 
12:57:11.000000000 +0100
@@ -1,5 +1,6 @@
 {-# OPTIONS_GHC -fno-warn-orphans  #-}
 {-# LANGUAGE FlexibleContexts           #-}
+{-# LANGUAGE CPP                        #-}
 {-# LANGUAGE FlexibleInstances          #-}
 {-# LANGUAGE GeneralizedNewtypeDeriving #-}
 {-# LANGUAGE MultiParamTypeClasses      #-}
@@ -347,8 +348,11 @@
 instance Lift TemplateCache where
   lift m = [| HM.fromList $(lift $ HM.toList m) |]
 
+--Data.Text 1.2.4.0 introduces its own Lift Text instance
+#if !MIN_VERSION_text(1,2,4)
 instance Lift Text where
   lift = lift . unpack
+#endif
 
 deriveLift ''DataIdentifier
 deriveLift ''Node
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mustache-2.3.0/src/Text/Mustache/Render.hs 
new/mustache-2.3.1/src/Text/Mustache/Render.hs
--- old/mustache-2.3.0/src/Text/Mustache/Render.hs      2017-11-08 
12:54:18.000000000 +0100
+++ new/mustache-2.3.1/src/Text/Mustache/Render.hs      2019-12-17 
12:57:11.000000000 +0100
@@ -217,6 +217,9 @@
 toString :: Value -> SubM Text
 toString (String t) = return t
 toString (Number n) = return $ either (pack . show) (pack . show) 
(floatingOrInteger n :: Either Double Integer)
+toString (Lambda l) = do
+  ((), res) <- catchSubstitute $ substituteAST =<< l []
+  return res
 toString e          = do
   tellError $ DirectlyRenderedValue e
   return $ pack $ show e
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mustache-2.3.0/test/unit/Spec.hs 
new/mustache-2.3.1/test/unit/Spec.hs
--- old/mustache-2.3.0/test/unit/Spec.hs        2017-11-08 12:54:18.000000000 
+0100
+++ new/mustache-2.3.1/test/unit/Spec.hs        2019-12-17 12:57:11.000000000 
+0100
@@ -191,7 +191,6 @@
         (object ["lambda" ~> (overText T.toUpper)])
       `shouldBe` "T"
 
-
     it "substitutes a lambda by applying lambda to the nested substitution 
results" $
       substitute
         (toTemplate [Section (NamedData ["lambda"]) [TextBlock "t", Variable 
escaped (NamedData ["inner"])]])
@@ -200,6 +199,11 @@
                 ])
       `shouldBe` "TVAR"
 
+    it "substitutes a lambda used directly as if applied to empty block" $
+      substitute
+        (toTemplate [Variable escaped (NamedData ["lambda"])])
+        (object ["lambda" ~> (Lambda $ \[] -> return [TextBlock "T"])])
+      `shouldBe` "T"
 
     it "substitutes a nested section" $
       substitute


Reply via email to