on master help sign in
Various dependency bumps
37bf3feJasper Van der Jeugt
hakyll.cabal+18−22
@@ -160,7 +160,7 @@ Library
160
160
161 Build-Depends:
161 Build-Depends:
162 base >= 4.8 && < 5,
162 base >= 4.8 && < 5,
163− binary >= 0.5 && < 0.9,
163+ binary >= 0.5 && < 0.10,
164 blaze-html >= 0.5 && < 0.10,
164 blaze-html >= 0.5 && < 0.10,
165 blaze-markup >= 0.5.1 && < 0.9,
165 blaze-markup >= 0.5.1 && < 0.9,
166 bytestring >= 0.9 && < 0.11,
166 bytestring >= 0.9 && < 0.11,
@@ -174,8 +174,8 @@ Library
174 mtl >= 1 && < 2.3,
174 mtl >= 1 && < 2.3,
175 network >= 2.6 && < 2.7,
175 network >= 2.6 && < 2.7,
176 network-uri >= 2.6 && < 2.7,
176 network-uri >= 2.6 && < 2.7,
177− pandoc >= 2.0.5 && < 2.1,
177+ pandoc >= 2.0.5 && < 2.2,
178− pandoc-citeproc >= 0.12.1.1 && < 0.13,
178+ pandoc-citeproc >= 0.13 && < 0.14,
179 parsec >= 3.0 && < 3.2,
179 parsec >= 3.0 && < 3.2,
180 process >= 1.6 && < 1.7,
180 process >= 1.6 && < 1.7,
181 random >= 1.0 && < 1.2,
181 random >= 1.0 && < 1.2,
@@ -198,9 +198,8 @@ Library
198 wai >= 3.2 && < 3.3,
198 wai >= 3.2 && < 3.3,
199 warp >= 3.2 && < 3.3,
199 warp >= 3.2 && < 3.3,
200 wai-app-static >= 3.1 && < 3.2,
200 wai-app-static >= 3.1 && < 3.2,
201− http-types >= 0.9 && < 0.10,
201+ http-types >= 0.9 && < 0.12,
202− fsnotify >= 0.2 && < 0.3,
202+ fsnotify >= 0.2 && < 0.3
203− system-filepath >= 0.4.6 && <= 0.5
204 Cpp-options:
203 Cpp-options:
205 -DPREVIEW_SERVER
204 -DPREVIEW_SERVER
206 Other-modules:
205 Other-modules:
@@ -209,8 +208,7 @@ Library
209
208
210 If flag(watchServer)
209 If flag(watchServer)
211 Build-depends:
210 Build-depends:
212− fsnotify >= 0.2 && < 0.3,
211+ fsnotify >= 0.2 && < 0.3
213− system-filepath >= 0.4.6 && <= 0.5
214 Cpp-options:
212 Cpp-options:
215 -DWATCH_SERVER
213 -DWATCH_SERVER
216 Other-modules:
214 Other-modules:
@@ -219,7 +217,7 @@ Library
219 If flag(checkExternal)
217 If flag(checkExternal)
220 Build-depends:
218 Build-depends:
221 http-conduit >= 2.2 && < 2.3,
219 http-conduit >= 2.2 && < 2.3,
222− http-types >= 0.7 && < 0.10
220+ http-types >= 0.7 && < 0.12
223 Cpp-options:
221 Cpp-options:
224 -DCHECK_EXTERNAL
222 -DCHECK_EXTERNAL
225
223
@@ -251,13 +249,13 @@ Test-suite hakyll-tests
251
249
252 Build-Depends:
250 Build-Depends:
253 hakyll,
251 hakyll,
254− QuickCheck >= 2.8 && < 2.11,
252+ QuickCheck >= 2.8 && < 2.12,
255− tasty >= 0.11 && < 0.12,
253+ tasty >= 0.11 && < 1.1,
256− tasty-hunit >= 0.9 && < 0.10,
254+ tasty-hunit >= 0.9 && < 0.11,
257 tasty-quickcheck >= 0.8 && < 0.10,
255 tasty-quickcheck >= 0.8 && < 0.10,
258 -- Copy pasted from hakyll dependencies:
256 -- Copy pasted from hakyll dependencies:
259 base >= 4.8 && < 5,
257 base >= 4.8 && < 5,
260− binary >= 0.5 && < 0.9,
258+ binary >= 0.5 && < 0.10,
261 blaze-html >= 0.5 && < 0.10,
259 blaze-html >= 0.5 && < 0.10,
262 blaze-markup >= 0.5.1 && < 0.9,
260 blaze-markup >= 0.5.1 && < 0.9,
263 bytestring >= 0.9 && < 0.11,
261 bytestring >= 0.9 && < 0.11,
@@ -271,8 +269,8 @@ Test-suite hakyll-tests
271 mtl >= 1 && < 2.3,
269 mtl >= 1 && < 2.3,
272 network >= 2.6 && < 2.7,
270 network >= 2.6 && < 2.7,
273 network-uri >= 2.6 && < 2.7,
271 network-uri >= 2.6 && < 2.7,
274− pandoc >= 2.0.5 && < 2.1,
272+ pandoc >= 2.0.5 && < 2.2,
275− pandoc-citeproc >= 0.12.1.1 && < 0.13,
273+ pandoc-citeproc >= 0.13 && < 0.14,
276 parsec >= 3.0 && < 3.2,
274 parsec >= 3.0 && < 3.2,
277 process >= 1.6 && < 1.7,
275 process >= 1.6 && < 1.7,
278 random >= 1.0 && < 1.2,
276 random >= 1.0 && < 1.2,
@@ -294,23 +292,21 @@ Test-suite hakyll-tests
294 wai >= 3.2 && < 3.3,
292 wai >= 3.2 && < 3.3,
295 warp >= 3.2 && < 3.3,
293 warp >= 3.2 && < 3.3,
296 wai-app-static >= 3.1 && < 3.2,
294 wai-app-static >= 3.1 && < 3.2,
297− http-types >= 0.9 && < 0.10,
295+ http-types >= 0.9 && < 0.12,
298− fsnotify >= 0.2 && < 0.3,
296+ fsnotify >= 0.2 && < 0.3
299− system-filepath >= 0.4.6 && <= 0.5
300 Cpp-options:
297 Cpp-options:
301 -DPREVIEW_SERVER
298 -DPREVIEW_SERVER
302
299
303 If flag(watchServer)
300 If flag(watchServer)
304 Build-depends:
301 Build-depends:
305− fsnotify >= 0.2 && < 0.3,
302+ fsnotify >= 0.2 && < 0.3
306− system-filepath >= 0.4.6 && <= 0.5
307 Cpp-options:
303 Cpp-options:
308 -DWATCH_SERVER
304 -DWATCH_SERVER
309
305
310 If flag(checkExternal)
306 If flag(checkExternal)
311 Build-depends:
307 Build-depends:
312 http-conduit >= 2.2 && < 2.3,
308 http-conduit >= 2.2 && < 2.3,
313− http-types >= 0.7 && < 0.10
309+ http-types >= 0.7 && < 0.12
314 Cpp-options:
310 Cpp-options:
315 -DCHECK_EXTERNAL
311 -DCHECK_EXTERNAL
316
312
@@ -345,4 +341,4 @@ Executable hakyll-website
345 base >= 4 && < 5,
341 base >= 4 && < 5,
346 directory >= 1.0 && < 1.4,
342 directory >= 1.0 && < 1.4,
347 filepath >= 1.0 && < 1.5,
343 filepath >= 1.0 && < 1.5,
348− pandoc >= 2.0.5 && < 2.1
344+ pandoc >= 2.0.5 && < 2.2
lib/Hakyll/Web/Pandoc/Biblio.hs+4−1
@@ -84,7 +84,10 @@ instance Writable Biblio where
84biblioCompiler :: Compiler (Item Biblio)
84biblioCompiler :: Compiler (Item Biblio)
85biblioCompiler = do
85biblioCompiler = do
86 filePath <- toFilePath <$> getUnderlying
86 filePath <- toFilePath <$> getUnderlying
87− makeItem =<< unsafeCompiler (Biblio <$> CSL.readBiblioFile filePath)
87+ makeItem =<< unsafeCompiler (Biblio <$> CSL.readBiblioFile idpred filePath)
88+ where
89+ -- This is a filter on citations. We include all citations.
90+ idpred = const True
88
91
89
92
90--------------------------------------------------------------------------------
93--------------------------------------------------------------------------------
stack.yaml+10−4
@@ -1,4 +1,4 @@
1−resolver: nightly-2017-12-14
1+resolver: nightly-2018-01-15
2extra-package-dbs: []
2extra-package-dbs: []
3
3
4flags:
4flags:
@@ -11,10 +11,16 @@ flags:
11packages:
11packages:
12 - '.'
12 - '.'
13
13
14+allow-newer: True
15+
14extra-deps:
16extra-deps:
15− - hslua-module-text-0.1.2
17+ - 'binary-0.9.0.0'
16− - skylighting-0.5
18+ - 'http-types-0.11'
19+ - 'pandoc-2.1'
17− - pandoc-citeproc-0.12.2.2
20+ - 'pandoc-citeproc-0.13'
21+ - 'QuickCheck-2.11.3'
22+ - 'tasty-1.0.0.1'
23+ - 'tasty-hunit-0.10.0.1'
18
24
19nix:
25nix:
20 enable: false
26 enable: false
tests/Hakyll/Core/Provider/Tests.hs+2−2
@@ -9,7 +9,7 @@ module Hakyll.Core.Provider.Tests
9import Hakyll.Core.Metadata
9import Hakyll.Core.Metadata
10import Hakyll.Core.Provider
10import Hakyll.Core.Provider
11import Test.Tasty (TestTree, testGroup)
11import Test.Tasty (TestTree, testGroup)
12−import Test.Tasty.HUnit (Assertion, assert, testCase, (@=?))
12+import Test.Tasty.HUnit (Assertion, testCase, (@=?))
13import TestSuite.Util
13import TestSuite.Util
14
14
15
15
@@ -25,7 +25,7 @@ case01 :: Assertion
25case01 = do
25case01 = do
26 store <- newTestStore
26 store <- newTestStore
27 provider <- newTestProvider store
27 provider <- newTestProvider store
28− assert $ resourceExists provider "example.md"
28+ True @=? resourceExists provider "example.md"
29
29
30 metadata <- resourceMetadata provider "example.md"
30 metadata <- resourceMetadata provider "example.md"
31 Just "An example" @=? lookupString "title" metadata
31 Just "An example" @=? lookupString "title" metadata
tests/Hakyll/Core/Rules/Tests.hs+2−2
@@ -20,7 +20,7 @@ import Hakyll.Core.Rules.Internal
20import Hakyll.Web.Pandoc
20import Hakyll.Web.Pandoc
21import System.FilePath ((</>))
21import System.FilePath ((</>))
22import Test.Tasty (TestTree, testGroup)
22import Test.Tasty (TestTree, testGroup)
23−import Test.Tasty.HUnit (Assertion, assert, (@=?))
23+import Test.Tasty.HUnit (Assertion, (@=?))
24import TestSuite.Util
24import TestSuite.Util
25
25
26
26
@@ -50,7 +50,7 @@ case01 = do
50 checkRoute "example.mv1" (sv "mv1" "example.md")
50 checkRoute "example.mv1" (sv "mv1" "example.md")
51 checkRoute "example.mv2" (sv "mv2" "example.md")
51 checkRoute "example.mv2" (sv "mv2" "example.md")
52 checkRoute "food/example.md" (sv "metadataMatch" "example.md")
52 checkRoute "food/example.md" (sv "metadataMatch" "example.md")
53− readIORef ioref >>= assert
53+ readIORef ioref >>= (True @=?)
54 cleanTestEnv
54 cleanTestEnv
55 where
55 where
56 sv g = setVersion (Just g)
56 sv g = setVersion (Just g)
tests/Hakyll/Core/Store/Tests.hs+7−7
@@ -63,11 +63,11 @@ wrongType = do
63 -- Store a string and try to fetch an int
63 -- Store a string and try to fetch an int
64 Store.set store ["foo", "bar"] ("qux" :: String)
64 Store.set store ["foo", "bar"] ("qux" :: String)
65 value <- Store.get store ["foo", "bar"] :: IO (Store.Result Int)
65 value <- Store.get store ["foo", "bar"] :: IO (Store.Result Int)
66− H.assert $ case value of
66+ case value of
67− Store.WrongType e t ->
67+ Store.WrongType e t -> do
68− e == typeOf (undefined :: Int) &&
68+ typeOf (undefined :: Int) H.@=? e
69− t == typeOf (undefined :: String)
69+ typeOf (undefined :: String) H.@=? t
70− _ -> False
70+ _ -> H.assertFailure "Expecting WrongType"
71 cleanTestEnv
71 cleanTestEnv
72
72
73
73
@@ -78,6 +78,6 @@ isMembertest = do
78 Store.set store ["foo", "bar"] ("qux" :: String)
78 Store.set store ["foo", "bar"] ("qux" :: String)
79 good <- Store.isMember store ["foo", "bar"]
79 good <- Store.isMember store ["foo", "bar"]
80 bad <- Store.isMember store ["foo", "baz"]
80 bad <- Store.isMember store ["foo", "baz"]
81− H.assert good
81+ True H.@=? good
82− H.assert (not bad)
82+ False H.@=? bad
83 cleanTestEnv
83 cleanTestEnv
tests/Hakyll/Core/UnixFilter/Tests.hs+8−8
@@ -39,7 +39,7 @@ unixFilterRev = do
39 provider <- newTestProvider store
39 provider <- newTestProvider store
40 output <- testCompilerDone store provider testMarkdown compiler
40 output <- testCompilerDone store provider testMarkdown compiler
41 expected <- testCompilerDone store provider testMarkdown getResourceString
41 expected <- testCompilerDone store provider testMarkdown getResourceString
42− H.assert $ rev (itemBody expected) == lines (itemBody output)
42+ rev (itemBody expected) H.@=? lines (itemBody output)
43 cleanTestEnv
43 cleanTestEnv
44 where
44 where
45 compiler = getResourceString >>= withItemBody (unixFilter "rev" [])
45 compiler = getResourceString >>= withItemBody (unixFilter "rev" [])
@@ -52,9 +52,9 @@ unixFilterFalse = do
52 store <- newTestStore
52 store <- newTestStore
53 provider <- newTestProvider store
53 provider <- newTestProvider store
54 result <- testCompiler store provider testMarkdown compiler
54 result <- testCompiler store provider testMarkdown compiler
55− H.assert $ case result of
55+ case result of
56− CompilerError es -> any ("exit code" `isInfixOf`) es
56+ CompilerError es -> True H.@=? any ("exit code" `isInfixOf`) es
57− _ -> False
57+ _ -> H.assertFailure "Expecting CompilerError"
58 cleanTestEnv
58 cleanTestEnv
59 where
59 where
60 compiler = getResourceString >>= withItemBody (unixFilter "false" [])
60 compiler = getResourceString >>= withItemBody (unixFilter "false" [])
@@ -66,9 +66,9 @@ unixFilterError = do
66 store <- newTestStore
66 store <- newTestStore
67 provider <- newTestProvider store
67 provider <- newTestProvider store
68 result <- testCompiler store provider testMarkdown compiler
68 result <- testCompiler store provider testMarkdown compiler
69− H.assert $ case result of
69+ case result of
70− CompilerError es -> any ("invalid option" `isInfixOf`) es
70+ CompilerError es -> True H.@=? any ("invalid option" `isInfixOf`) es
71− _ -> False
71+ _ -> H.assertFailure "Expecting CompilerError"
72 cleanTestEnv
72 cleanTestEnv
73 where
73 where
74− compiler = getResourceString >>= withItemBody (unixFilter "head" ["-#"])
74+ compiler = getResourceString >>= withItemBody (unixFilter "head" ["-#"])
tests/Hakyll/Web/Html/Tests.hs+6−6
@@ -7,7 +7,7 @@ module Hakyll.Web.Html.Tests
7--------------------------------------------------------------------------------
7--------------------------------------------------------------------------------
8import Data.Char (toUpper)
8import Data.Char (toUpper)
9import Test.Tasty (TestTree, testGroup)
9import Test.Tasty (TestTree, testGroup)
10−import Test.Tasty.HUnit (assert, (@=?))
10+import Test.Tasty.HUnit ((@=?))
11
11
12
12
13--------------------------------------------------------------------------------
13--------------------------------------------------------------------------------
@@ -64,11 +64,11 @@ tests = testGroup "Hakyll.Web.Html.Tests" $ concat
64 ]
64 ]
65
65
66 , fromAssertions "isExternal"
66 , fromAssertions "isExternal"
67− [ assert (isExternal "http://reddit.com")
67+ [ True @=? isExternal "http://reddit.com"
68− , assert (isExternal "https://mail.google.com")
68+ , True @=? isExternal "https://mail.google.com"
69− , assert (isExternal "//ajax.googleapis.com")
69+ , True @=? isExternal "//ajax.googleapis.com"
70− , assert (not (isExternal "../header.png"))
70+ , False @=? isExternal "../header.png"
71− , assert (not (isExternal "/foo/index.html"))
71+ , False @=? isExternal "/foo/index.html"
72 ]
72 ]
73
73
74 , fromAssertions "stripTags"
74 , fromAssertions "stripTags"