cabal-version:      3.0
name:               web-cookiejar
version:            0.1.3.0
synopsis:           Parsing/printing of persistent web cookies
description:
  A library that provides parsing and printing functions that read and write web
  cookies stored in the Netscape/Mozilla cookie jar file format; also the format
  used by curl.

  See the [README](https://github.com/adetokunbo/web-cookiejar?tab=readme-ov-file#web-cookiejar)
  for a simple usage example

license:            BSD-3-Clause
license-file:       LICENSE
author:             Tim Emiola
maintainer:         adetokunbo@emio.la
category:           Web
homepage:           https://github.com/adetokunbo/web-cookiejar#readme
bug-reports:
  https://github.com/adetokunbo/web-cookiejar/issues
tested-with:        GHC ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.6 || ==9.8.2 || ==9.10.1
build-type:         Simple
extra-source-files:
  ChangeLog.md

source-repository head
  type:     git
  location: https://github.com/adetokunbo/web-cookiejar.git

library
  exposed-modules:  Web.Cookie.Jar
  hs-source-dirs:   src
  build-depends:
    , attoparsec           >=0.14.4 && <0.15
    , base                 >=4.10 && <5
    , bytestring           >=0.10.8 && <0.11 || >=0.11.3 && <0.13
    , directory            >=1.3 && <1.4
    , http-client          >=0.5 && <0.8
    , time                 >=1.8 && <1.15

  default-language: Haskell2010
  ghc-options:      -Wall -Wincomplete-uni-patterns -Wpartial-fields -fwarn-tabs

test-suite test
  type:             exitcode-stdio-1.0
  main-is:          Spec.hs
  hs-source-dirs:   test
  other-modules:    Cookie.JarSpec
  default-language: Haskell2010
  ghc-options:      -threaded -rtsopts -with-rtsopts=-N -Wall -fwarn-tabs
  build-depends:
    , base
    , bytestring
    , hspec                >=2.7.0 && <2.12.0
    , http-client
    , QuickCheck           >= 2.13 && < 2.18
    , temporary            >= 1.2 && < 1.4
    , time
    , web-cookiejar

Flag enable-server-test
  description: Build server-test
  default:     False

test-suite server-test 
  if flag(enable-server-test)
    buildable: True
  else
    buildable: False
  type:             exitcode-stdio-1.0
  main-is:          Spec.hs
  hs-source-dirs:   server-test
  other-modules:    Cookie.WaiSpec
  default-language: Haskell2010
  ghc-options:      -threaded -rtsopts -with-rtsopts=-N -Wall -fwarn-tabs
  build-depends:
    , base
    , bytestring
    , cookie               >=0.4 && < 0.8
    , hspec                >=2.7.0 && <2.12.0
    , http-client
    , http-types           >=0.12.1 && <0.13
    , mtl                  >=2.2 && <2.3 || >=2.3.1 && <2.4
    , QuickCheck           >= 2.13 && < 2.18
    , string-conv          >=0.1 && <0.3
    , temporary            >= 1.2 && < 1.4
    , time
    , wai                  >=3.2 && < 3.6
    , warp-tls             >=3.4 && < 3.8
    , warp                 >=3.4 && < 3.8
    , web-cookiejar