on master help sign in
Merge remote-tracking branch 'upstream/master'
commit0f484c49be07f0729d89d562f02a40109872737a authorMekeor Melire <mekeor@ymail.com> dateSat 11 Aug 2012, 01:31 (14 years ago) parent998db08a0f5193
4 files changed+14−14
hakyll.cabal+3−3 src/Hakyll/Core/Store.hs−3 tests/Hakyll/Web/Template/Tests.hs+9−8 web/examples.markdown+2
hakyll.cabal+3−3
@@ -1,5 +1,5 @@
11Name: hakyll
2−Version: 3.4.0.0
2+Version: 3.4.1.0
33
44Synopsis: A static website compiler library
55Description:
@@ -74,7 +74,7 @@ Library
7474 cryptohash >= 0.7 && < 0.8,
7575 directory >= 1.0 && < 1.2,
7676 filepath >= 1.0 && < 1.4,
77− hamlet >= 1.0 && < 1.1,
77+ hamlet >= 1.0 && < 1.2,
7878 mtl >= 1 && < 2.2,
7979 old-locale >= 1.0 && < 1.1,
8080 old-time >= 1.0 && < 1.2,
@@ -182,7 +182,7 @@ Test-suite hakyll-tests
182182 cryptohash >= 0.7 && < 0.8,
183183 directory >= 1.0 && < 1.2,
184184 filepath >= 1.0 && < 1.4,
185− hamlet >= 1.0 && < 1.1,
185+ hamlet >= 1.0 && < 1.2,
186186 mtl >= 1 && < 2.2,
187187 old-locale >= 1.0 && < 1.1,
188188 old-time >= 1.0 && < 1.2,
src/Hakyll/Core/Store.hs−3
@@ -10,12 +10,9 @@ module Hakyll.Core.Store
1010 ) where
1111
1212import Control.Applicative ((<$>))
13−import Control.Concurrent.MVar (MVar, newMVar, readMVar, modifyMVar_)
1413import System.FilePath ((</>))
1514import System.Directory (doesFileExist)
1615import Data.Maybe (fromMaybe)
17−import Data.Map (Map)
18−import qualified Data.Map as M
1916
2017import Data.Binary (Binary, encodeFile, decodeFile)
2118import Data.Typeable (Typeable, TypeRep, cast, typeOf)
tests/Hakyll/Web/Template/Tests.hs+9−8
@@ -17,17 +17,18 @@ tests :: [Test]
1717tests = fromAssertions "applyTemplate"
1818 -- Hakyll templates
1919 [ applyTemplateAssertion readTemplate applyTemplate
20− "bar" "$foo$" [("foo", "bar")]
20+ ("bar" @=?) "$foo$" [("foo", "bar")]
2121
2222 , applyTemplateAssertion readTemplate applyTemplate
23− "$ barqux" "$$ $foo$$bar$" [("foo", "bar"), ("bar", "qux")]
23+ ("$ barqux" @=?) "$$ $foo$$bar$" [("foo", "bar"), ("bar", "qux")]
2424
2525 , applyTemplateAssertion readTemplate applyTemplate
26− "$foo$" "$foo$" []
26+ ("$foo$" @=?) "$foo$" []
2727
2828 -- Hamlet templates
2929 , applyTemplateAssertion readHamletTemplate applyTemplate
30− "<head><title>notice</title></head><body>A paragraph</body>"
30+ (("<head><title>notice</title></head><body>A paragraph</body>" @=?) .
31+ filter (/= '\n'))
3132 "<head>\n\
3233 \ <title>#{title}\n\
3334 \<body>\n\
@@ -39,16 +40,16 @@ tests = fromAssertions "applyTemplate"
3940 missing "bar" = "qux"
4041 missing x = reverse x
4142 in applyTemplateAssertion readTemplate (applyTemplateWith missing)
42− "bar foo ver" "$foo$ $bar$ $rev$" [("bar", "foo")]
43+ ("bar foo ver" @=?) "$foo$ $bar$ $rev$" [("bar", "foo")]
4344 ]
4445
4546-- | Utility function to create quick template tests
4647--
4748applyTemplateAssertion :: (String -> Template)
4849 -> (Template -> Page String -> Page String)
49− -> String
50+ -> (String -> Assertion)
5051 -> String
5152 -> [(String, String)]
5253 -> Assertion
53−applyTemplateAssertion parser apply expected template page =
54− expected @=? pageBody (apply (parser template) (fromMap $ M.fromList page))
54+applyTemplateAssertion parser apply correct template page =
55+ correct $ pageBody (apply (parser template) (fromMap $ M.fromList page))
web/examples.markdown+2
@@ -54,3 +54,5 @@ this list. This list has no particular ordering.
5454 [source](https://github.com/CharlesStain/alfredodinapoli.com)
5555- <http://www.rohanjain.in/>,
5656 [source](https://github.com/crodjer/rohanjain.in)
57+- <http://datahackermd.com>,
58+ [source](http://github.com/akshayjshah/datahackermd)