yesod-static-streamly 0.1.5.2 → 0.1.5.3
raw patch · 3 files changed
+41/−3 lines, 3 filesdep +QuickCheckdep +cryptonite-conduitdep +hspecPVP ok
version bump matches the API change (PVP)
Dependencies added: QuickCheck, cryptonite-conduit, hspec
API changes (from Hackage documentation)
Files
- CHANGELOG.md +4/−0
- test/Main.hs +28/−1
- yesod-static-streamly.cabal +9/−2
CHANGELOG.md view
@@ -80,3 +80,7 @@ ## 0.1.5.2 -- 2023-07-17 * Updated documentation for Yesod.Static.Streamly.Internal.++## 0.1.5.3 -- 2023-07-22++* Added initial test suite.
test/Main.hs view
@@ -1,4 +1,31 @@ module Main (main) where +import Yesod.Default.Util.Streamly+import Yesod.Static.Streamly+import Yesod.Static.Streamly.Internal++import Data.ByteString as BS+import Data.ByteString.Lazy as BSL+import qualified Data.ByteArray as ByteArray+import Test.Hspec+import Control.Exception (evaluate)+import Crypto.Hash+import Crypto.Hash.Conduit (hashFile)+import Yesod.Static+ main :: IO ()-main = putStrLn "Test suite not yet implemented."+main = hspec $ do+ describe "Yesod.Static.Streamly.Internal" $ do+ describe "hashFileStreamly" $ do+ it "Ensures that hashFileStreamly is equivalent to Crypto.Hash.Conduit's hashFile function." $ do+ hashfilestreamlyt <- hashFileStreamly "test/hashfilestreamlytest.txt" 100+ let hashfilestreamlytf = ((ByteArray.convert (hashfilestreamlyt :: Crypto.Hash.Digest MD5)) :: BS.ByteString)+ hashfilet <- hashFile "test/hashfilestreamlytest.txt"+ let hashfiletf = ((ByteArray.convert (hashfilet :: Crypto.Hash.Digest MD5)) :: BS.ByteString)+ hashfilestreamlytf `shouldBe` hashfiletf + describe "base64md5Streamly" $ do+ it "Ensures that base64md5Streamly is equivalent to Yesod.Static's base64md5 function." $ do+ base64md5bst <- BSL.readFile "test/hashfilestreamlytest.txt"+ let base64md5streamlyt = base64md5Streamly base64md5bst+ let base64md5t = base64md5 base64md5bst+ base64md5streamlyt `shouldBe` base64md5t
yesod-static-streamly.cabal view
@@ -20,7 +20,7 @@ -- PVP summary: +-+------- breaking API changes -- | | +----- non-breaking API additions -- | | | +--- code changes with no API change-version: 0.1.5.2+version: 0.1.5.3 -- A short (one-line) description of the package. synopsis: A streamly-based library providing performance-focused alternatives for functionality found in yesod-static.@@ -81,7 +81,7 @@ build-depends: base ^>=4.17.1.0, base64-bytestring >= 1.2.1 && < 1.3, bytestring >= 0.11.4 && < 0.12,- containers >= 0.6.7 && < 0.7, + containers >= 0.6.7 && < 0.7, cryptonite >= 0.30 && < 0.31, data-default >= 0.7.1 && < 0.8, directory >= 1.3.7 && < 1.4,@@ -133,4 +133,11 @@ -- Test dependencies. build-depends: base ^>=4.17.1.0,+ bytestring >= 0.11.4 && < 0.12,+ cryptonite >= 0.30 && < 0.31,+ cryptonite-conduit >= 0.2.2 && < 0.3,+ hspec >= 2.11.0 && < 2.12,+ memory >= 0.18.0 && < 0.19,+ QuickCheck >= 2.14.2 && < 2.15,+ yesod-static >= 1.6.1 && < 1.7, yesod-static-streamly