conduit-extra 1.2.3.1 → 1.2.3.2
raw patch · 4 files changed
+16/−3 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- ChangeLog.md +4/−0
- Data/Conduit/Binary.hs +1/−1
- conduit-extra.cabal +2/−2
- test/Data/Conduit/BinarySpec.hs +9/−0
ChangeLog.md view
@@ -1,3 +1,7 @@+## 1.2.3.2++* Fix withSinkFileBuilder [#344](https://github.com/snoyberg/conduit/pull/344)+ ## 1.2.3.1 * Fix typo in implementation of `withProcess_`
Data/Conduit/Binary.hs view
@@ -652,7 +652,7 @@ -> m a withSinkFileBuilder fp inner = withRunInIO $ \run ->- IO.withBinaryFile fp IO.ReadMode $ \h ->+ IO.withBinaryFile fp IO.WriteMode $ \h -> run $ inner $ CL.mapM_ (liftIO . BB.hPutBuilder h) -- | Like 'sinkFileCautious', but uses the @with@ pattern instead of
conduit-extra.cabal view
@@ -1,5 +1,5 @@ Name: conduit-extra-Version: 1.2.3.1+Version: 1.2.3.2 Synopsis: Batteries included conduit: adapters for common libraries. Description: The conduit package itself maintains relative small dependencies. The purpose of this package is to collect commonly used utility functions wrapping other library dependencies, without depending on heavier-weight dependencies. The basic idea is that this package should only depend on haskell-platform packages and conduit.@@ -41,7 +41,7 @@ cpp-options: -DALLOW_UNALIGNED_ACCESS Build-depends: base >= 4.5 && < 5- , conduit >= 1.1 && < 1.3+ , conduit >= 1.2.8 && < 1.3 , bytestring >= 0.10.2 , exceptions
test/Data/Conduit/BinarySpec.hs view
@@ -10,6 +10,7 @@ import Control.Monad.IO.Class import Control.Exception (IOException) import qualified Data.ByteString.Lazy as L+import qualified Blaze.ByteString.Builder.ByteString as Blaze import Test.Hspec import Test.Hspec.QuickCheck import qualified Data.IORef as I@@ -44,6 +45,14 @@ it "write" $ do runResourceT $ CB.sourceFile "conduit-extra.cabal" C.$$ CB.sinkFile "tmp"+ bs1 <- S.readFile "conduit-extra.cabal"+ bs2 <- S.readFile "tmp"+ bs2 `shouldBe` bs1+++ it "write builder (withSinkFileBuilder)" $ do+ runResourceT $ CB.withSinkFileBuilder "tmp" $ \sink ->+ CB.sourceFile "conduit-extra.cabal" C.=$= CL.map Blaze.fromByteString C.$$ sink bs1 <- S.readFile "conduit-extra.cabal" bs2 <- S.readFile "tmp" bs2 `shouldBe` bs1