on master help sign in
Various dependency bumps

- Bump binary to 0.9 - Bump pandoc to 2.1 - Bump pandoc-citeproc to 0.13 - Bump http-types to 0.11 - Bump QuickCheck to 2.11 - Bump tasty to 1.0 - Bump tasty-hunit to 0.10 - Remove system-filepath dependency

commit37bf3fe9555406eeb12485c20aa99c25065e0760 authorJasper Van der Jeugt <jaspervdj@gmail.com> dateMon 15 Jan 2018, 18:01 (9 years ago) parenta88a91d
8 files changed+57−52
hakyll.cabal+18−22 lib/Hakyll/Web/Pandoc/Biblio.hs+4−1 stack.yaml+10−4 tests/Hakyll/Core/Provider/Tests.hs+2−2 tests/Hakyll/Core/Rules/Tests.hs+2−2 tests/Hakyll/Core/Store/Tests.hs+7−7 tests/Hakyll/Core/UnixFilter/Tests.hs+8−8 tests/Hakyll/Web/Html/Tests.hs+6−6
hakyll.cabal+18−22
@@ -160,7 +160,7 @@ Library
160160
161161 Build-Depends:
162162 base >= 4.8 && < 5,
163− binary >= 0.5 && < 0.9,
163+ binary >= 0.5 && < 0.10,
164164 blaze-html >= 0.5 && < 0.10,
165165 blaze-markup >= 0.5.1 && < 0.9,
166166 bytestring >= 0.9 && < 0.11,
@@ -174,8 +174,8 @@ Library
174174 mtl >= 1 && < 2.3,
175175 network >= 2.6 && < 2.7,
176176 network-uri >= 2.6 && < 2.7,
177− pandoc >= 2.0.5 && < 2.1,
178− pandoc-citeproc >= 0.12.1.1 && < 0.13,
177+ pandoc >= 2.0.5 && < 2.2,
178+ pandoc-citeproc >= 0.13 && < 0.14,
179179 parsec >= 3.0 && < 3.2,
180180 process >= 1.6 && < 1.7,
181181 random >= 1.0 && < 1.2,
@@ -198,9 +198,8 @@ Library
198198 wai >= 3.2 && < 3.3,
199199 warp >= 3.2 && < 3.3,
200200 wai-app-static >= 3.1 && < 3.2,
201− http-types >= 0.9 && < 0.10,
202− fsnotify >= 0.2 && < 0.3,
203− system-filepath >= 0.4.6 && <= 0.5
201+ http-types >= 0.9 && < 0.12,
202+ fsnotify >= 0.2 && < 0.3
204203 Cpp-options:
205204 -DPREVIEW_SERVER
206205 Other-modules:
@@ -209,8 +208,7 @@ Library
209208
210209 If flag(watchServer)
211210 Build-depends:
212− fsnotify >= 0.2 && < 0.3,
213− system-filepath >= 0.4.6 && <= 0.5
211+ fsnotify >= 0.2 && < 0.3
214212 Cpp-options:
215213 -DWATCH_SERVER
216214 Other-modules:
@@ -219,7 +217,7 @@ Library
219217 If flag(checkExternal)
220218 Build-depends:
221219 http-conduit >= 2.2 && < 2.3,
222− http-types >= 0.7 && < 0.10
220+ http-types >= 0.7 && < 0.12
223221 Cpp-options:
224222 -DCHECK_EXTERNAL
225223
@@ -251,13 +249,13 @@ Test-suite hakyll-tests
251249
252250 Build-Depends:
253251 hakyll,
254− QuickCheck >= 2.8 && < 2.11,
255− tasty >= 0.11 && < 0.12,
256− tasty-hunit >= 0.9 && < 0.10,
252+ QuickCheck >= 2.8 && < 2.12,
253+ tasty >= 0.11 && < 1.1,
254+ tasty-hunit >= 0.9 && < 0.11,
257255 tasty-quickcheck >= 0.8 && < 0.10,
258256 -- Copy pasted from hakyll dependencies:
259257 base >= 4.8 && < 5,
260− binary >= 0.5 && < 0.9,
258+ binary >= 0.5 && < 0.10,
261259 blaze-html >= 0.5 && < 0.10,
262260 blaze-markup >= 0.5.1 && < 0.9,
263261 bytestring >= 0.9 && < 0.11,
@@ -271,8 +269,8 @@ Test-suite hakyll-tests
271269 mtl >= 1 && < 2.3,
272270 network >= 2.6 && < 2.7,
273271 network-uri >= 2.6 && < 2.7,
274− pandoc >= 2.0.5 && < 2.1,
275− pandoc-citeproc >= 0.12.1.1 && < 0.13,
272+ pandoc >= 2.0.5 && < 2.2,
273+ pandoc-citeproc >= 0.13 && < 0.14,
276274 parsec >= 3.0 && < 3.2,
277275 process >= 1.6 && < 1.7,
278276 random >= 1.0 && < 1.2,
@@ -294,23 +292,21 @@ Test-suite hakyll-tests
294292 wai >= 3.2 && < 3.3,
295293 warp >= 3.2 && < 3.3,
296294 wai-app-static >= 3.1 && < 3.2,
297− http-types >= 0.9 && < 0.10,
298− fsnotify >= 0.2 && < 0.3,
299− system-filepath >= 0.4.6 && <= 0.5
295+ http-types >= 0.9 && < 0.12,
296+ fsnotify >= 0.2 && < 0.3
300297 Cpp-options:
301298 -DPREVIEW_SERVER
302299
303300 If flag(watchServer)
304301 Build-depends:
305− fsnotify >= 0.2 && < 0.3,
306− system-filepath >= 0.4.6 && <= 0.5
302+ fsnotify >= 0.2 && < 0.3
307303 Cpp-options:
308304 -DWATCH_SERVER
309305
310306 If flag(checkExternal)
311307 Build-depends:
312308 http-conduit >= 2.2 && < 2.3,
313− http-types >= 0.7 && < 0.10
309+ http-types >= 0.7 && < 0.12
314310 Cpp-options:
315311 -DCHECK_EXTERNAL
316312
@@ -345,4 +341,4 @@ Executable hakyll-website
345341 base >= 4 && < 5,
346342 directory >= 1.0 && < 1.4,
347343 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
8484biblioCompiler :: Compiler (Item Biblio)
8585biblioCompiler = do
8686 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
8891
8992
9093--------------------------------------------------------------------------------
stack.yaml+10−4
@@ -1,4 +1,4 @@
1−resolver: nightly-2017-12-14
1+resolver: nightly-2018-01-15
22extra-package-dbs: []
33
44flags:
@@ -11,10 +11,16 @@ flags:
1111packages:
1212 - '.'
1313
14+allow-newer: True
15+
1416extra-deps:
15− - hslua-module-text-0.1.2
16− - skylighting-0.5
17− - pandoc-citeproc-0.12.2.2
17+ - 'binary-0.9.0.0'
18+ - 'http-types-0.11'
19+ - 'pandoc-2.1'
20+ - 'pandoc-citeproc-0.13'
21+ - 'QuickCheck-2.11.3'
22+ - 'tasty-1.0.0.1'
23+ - 'tasty-hunit-0.10.0.1'
1824
1925nix:
2026 enable: false
tests/Hakyll/Core/Provider/Tests.hs+2−2
@@ -9,7 +9,7 @@ module Hakyll.Core.Provider.Tests
99import Hakyll.Core.Metadata
1010import Hakyll.Core.Provider
1111import Test.Tasty (TestTree, testGroup)
12−import Test.Tasty.HUnit (Assertion, assert, testCase, (@=?))
12+import Test.Tasty.HUnit (Assertion, testCase, (@=?))
1313import TestSuite.Util
1414
1515
@@ -25,7 +25,7 @@ case01 :: Assertion
2525case01 = do
2626 store <- newTestStore
2727 provider <- newTestProvider store
28− assert $ resourceExists provider "example.md"
28+ True @=? resourceExists provider "example.md"
2929
3030 metadata <- resourceMetadata provider "example.md"
3131 Just "An example" @=? lookupString "title" metadata
tests/Hakyll/Core/Rules/Tests.hs+2−2
@@ -20,7 +20,7 @@ import Hakyll.Core.Rules.Internal
2020import Hakyll.Web.Pandoc
2121import System.FilePath ((</>))
2222import Test.Tasty (TestTree, testGroup)
23−import Test.Tasty.HUnit (Assertion, assert, (@=?))
23+import Test.Tasty.HUnit (Assertion, (@=?))
2424import TestSuite.Util
2525
2626
@@ -50,7 +50,7 @@ case01 = do
5050 checkRoute "example.mv1" (sv "mv1" "example.md")
5151 checkRoute "example.mv2" (sv "mv2" "example.md")
5252 checkRoute "food/example.md" (sv "metadataMatch" "example.md")
53− readIORef ioref >>= assert
53+ readIORef ioref >>= (True @=?)
5454 cleanTestEnv
5555 where
5656 sv g = setVersion (Just g)
tests/Hakyll/Core/Store/Tests.hs+7−7
@@ -63,11 +63,11 @@ wrongType = do
6363 -- Store a string and try to fetch an int
6464 Store.set store ["foo", "bar"] ("qux" :: String)
6565 value <- Store.get store ["foo", "bar"] :: IO (Store.Result Int)
66− H.assert $ case value of
67− Store.WrongType e t ->
68− e == typeOf (undefined :: Int) &&
69− t == typeOf (undefined :: String)
70− _ -> False
66+ case value of
67+ Store.WrongType e t -> do
68+ typeOf (undefined :: Int) H.@=? e
69+ typeOf (undefined :: String) H.@=? t
70+ _ -> H.assertFailure "Expecting WrongType"
7171 cleanTestEnv
7272
7373
@@ -78,6 +78,6 @@ isMembertest = do
7878 Store.set store ["foo", "bar"] ("qux" :: String)
7979 good <- Store.isMember store ["foo", "bar"]
8080 bad <- Store.isMember store ["foo", "baz"]
81− H.assert good
82− H.assert (not bad)
81+ True H.@=? good
82+ False H.@=? bad
8383 cleanTestEnv
tests/Hakyll/Core/UnixFilter/Tests.hs+8−8
@@ -39,7 +39,7 @@ unixFilterRev = do
3939 provider <- newTestProvider store
4040 output <- testCompilerDone store provider testMarkdown compiler
4141 expected <- testCompilerDone store provider testMarkdown getResourceString
42− H.assert $ rev (itemBody expected) == lines (itemBody output)
42+ rev (itemBody expected) H.@=? lines (itemBody output)
4343 cleanTestEnv
4444 where
4545 compiler = getResourceString >>= withItemBody (unixFilter "rev" [])
@@ -52,9 +52,9 @@ unixFilterFalse = do
5252 store <- newTestStore
5353 provider <- newTestProvider store
5454 result <- testCompiler store provider testMarkdown compiler
55− H.assert $ case result of
56− CompilerError es -> any ("exit code" `isInfixOf`) es
57− _ -> False
55+ case result of
56+ CompilerError es -> True H.@=? any ("exit code" `isInfixOf`) es
57+ _ -> H.assertFailure "Expecting CompilerError"
5858 cleanTestEnv
5959 where
6060 compiler = getResourceString >>= withItemBody (unixFilter "false" [])
@@ -66,9 +66,9 @@ unixFilterError = do
6666 store <- newTestStore
6767 provider <- newTestProvider store
6868 result <- testCompiler store provider testMarkdown compiler
69− H.assert $ case result of
70− CompilerError es -> any ("invalid option" `isInfixOf`) es
71− _ -> False
69+ case result of
70+ CompilerError es -> True H.@=? any ("invalid option" `isInfixOf`) es
71+ _ -> H.assertFailure "Expecting CompilerError"
7272 cleanTestEnv
7373 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
77--------------------------------------------------------------------------------
88import Data.Char (toUpper)
99import Test.Tasty (TestTree, testGroup)
10−import Test.Tasty.HUnit (assert, (@=?))
10+import Test.Tasty.HUnit ((@=?))
1111
1212
1313--------------------------------------------------------------------------------
@@ -64,11 +64,11 @@ tests = testGroup "Hakyll.Web.Html.Tests" $ concat
6464 ]
6565
6666 , fromAssertions "isExternal"
67− [ assert (isExternal "http://reddit.com")
68− , assert (isExternal "https://mail.google.com")
69− , assert (isExternal "//ajax.googleapis.com")
70− , assert (not (isExternal "../header.png"))
71− , assert (not (isExternal "/foo/index.html"))
67+ [ True @=? isExternal "http://reddit.com"
68+ , True @=? isExternal "https://mail.google.com"
69+ , True @=? isExternal "//ajax.googleapis.com"
70+ , False @=? isExternal "../header.png"
71+ , False @=? isExternal "/foo/index.html"
7272 ]
7373
7474 , fromAssertions "stripTags"