packages feed

text-ldap 0.1.1.10 → 0.1.1.11

raw patch · 4 files changed

+12/−18 lines, 4 filesdep +memorydep −base64-bytestringPVP ok

version bump matches the API change (PVP)

Dependencies added: memory

Dependencies removed: base64-bytestring

API changes (from Hackage documentation)

Files

mains/parseTest.hs view
@@ -1,6 +1,6 @@  import System.Environment (getArgs)-import Control.Applicative+import Control.Applicative ((<$>)) import Text.LDAP.Parser import qualified Data.ByteString.Lazy.Char8 as LB 
src/Text/LDAP/Parser.hs view
@@ -1,7 +1,7 @@ {-# LANGUAGE OverloadedStrings #-} -- | -- Module      : Text.LDAP.Parser--- Copyright   : 2014 Kei Hibino+-- Copyright   : 2014-2018 Kei Hibino -- License     : BSD3 -- -- Maintainer  : ex8k.hibino@gmail.com@@ -36,7 +36,7 @@ import qualified Data.Attoparsec.ByteString.Char8 as AP import qualified Data.Attoparsec.ByteString as APW import Data.Attoparsec.ByteString.Lazy (parse, eitherResult)-import qualified Data.ByteString.Base64 as Base64+import Data.ByteArray.Encoding (Base (Base64), convertFromBase)  import Text.LDAP.Data   (AttrType (..), AttrValue (..), Attribute, Component, DN, LdifAttrValue (..),@@ -168,8 +168,10 @@ base64String =  pack <$> many (satisfyW8 (`inBounds` base64Bounds))  padDecodeB64 :: ByteString -> Either String ByteString-padDecodeB64 s = Base64.decode (s <> pad)  where+padDecodeB64 s = fromB64 (s <> pad)  where   pad = BS8.replicate ((- BS8.length s) `mod` 4) '='+  fromB64 "" = Right ""      -- avoid bug of older than memory-0.14.14+  fromB64 bs  = convertFromBase Base64 bs  eitherParser :: String -> Either String a -> LdapParser a eitherParser s = either (fail . ((s ++ ": ") ++)) pure
src/Text/LDAP/Printer.hs view
@@ -1,7 +1,7 @@ {-# LANGUAGE OverloadedStrings #-} -- | -- Module      : Text.LDAP.Printer--- Copyright   : 2014 Kei Hibino+-- Copyright   : 2014-2018 Kei Hibino -- License     : BSD3 -- -- Maintainer  : ex8k.hibino@gmail.com@@ -33,7 +33,7 @@ import Control.Applicative (pure, (<*)) import Control.Monad.Trans.Writer (Writer, tell, execWriter) import Text.Printf (printf)-import qualified Data.ByteString.Base64 as Base64+import Data.ByteArray.Encoding (Base (Base64), convertToBase) import Data.Attoparsec.ByteString (parseOnly, endOfInput)  import Text.LDAP.Data@@ -145,7 +145,7 @@ ldifToSafeAttrValue (AttrValue s) = do   case parseOnly (ldifSafeString <* endOfInput) $ s of     Right _    ->  LAttrValRaw s-    Left  _    ->  LAttrValBase64 $ Base64.encode s+    Left  _    ->  LAttrValBase64 $ convertToBase Base64 s  -- | Printer of LDIF attribute value with encode not safe string. --   Available printer combinator to pass 'ldifAttr' or 'openLdapEntry', etc ...
text-ldap.cabal view
@@ -1,5 +1,5 @@ name:                text-ldap-version:             0.1.1.10+version:             0.1.1.11 synopsis:            Parser and Printer for LDAP text data stream description:         This package contains Parser and Printer for                      LDAP text data stream like OpenLDAP backup LDIF.@@ -7,7 +7,7 @@ license-file:        LICENSE author:              Kei Hibino maintainer:          ex8k.hibino@gmail.com-copyright:           Copyright (c) 2014-2017 Kei Hibino+copyright:           Copyright (c) 2014-2018 Kei Hibino category:            Text build-type:          Simple cabal-version:       >=1.8@@ -32,7 +32,7 @@                        , transformers                        , attoparsec                        , dlist-                       , base64-bytestring+                       , memory   if impl(ghc < 8)     build-depends:       semigroups @@ -49,14 +49,6 @@   hs-source-dirs:      mains   ghc-options:         -Wall -rtsopts   -- ghc-prof-options:    -prof -fprof-auto---- executable ppTest---   main-is:             ppTest.hs---   build-depends:         base <5---                        , bytestring---                        , text-ldap---   hs-source-dirs:      mains---   ghc-options:         -Wall -rtsopts  Test-suite pp   build-depends:         base <5