packages feed

keuringsdienst 1.0.2.2 → 1.2.0.0

raw patch · 6 files changed

+69/−40 lines, 6 filesdep ~aesondep ~containersdep ~textPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: aeson, containers, text

API changes (from Hackage documentation)

Files

keuringsdienst.cabal view
@@ -1,12 +1,15 @@ cabal-version: 1.12 name: keuringsdienst-version: 1.0.2.2+version: 1.2.0.0 maintainer:     Josep Bigorra <jjbigorra@gmail.com> build-type:     Simple license:        LGPL-3 license-file: COPYING-synopsis: Data validation in Haskell that is composable, made easy and clean.              -description:    See README at https://codeberg.org/jjba23/keuringsdienst+synopsis: Data validation in Haskell: composable, easy and clean.              +description:+  Validation rules should be expressive and serve as documentation of your data.+  Based on Semigroup and Monoid operations, this makes validation rules that are easy to write, read, compose and maintain.+  See README at https://codeberg.org/jjba23/keuringsdienst. homepage: https://codeberg.org/jjba23/keuringsdienst           library@@ -54,9 +57,9 @@   ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wpartial-fields -Wredundant-constraints   build-depends:     base < 5-    , aeson-    , containers-    , text+    , aeson < 3+    , containers < 1+    , text < 3   default-language: GHC2021  test-suite keuringsdienst-spec@@ -107,9 +110,9 @@   ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wpartial-fields -Wredundant-constraints   build-depends:       base < 5-    , aeson-    , containers-    , text+    , aeson < 3+    , containers < 1+    , text < 3     , HUnit     , keuringsdienst   default-language: GHC2021
src/Keuringsdienst.hs view
@@ -1,16 +1,18 @@ {--  Copyright © 2023 Josep Bigorra+  Copyright © Josep Bigorra <jjbigorra@gmail.com>    This file is part of Keuringsdienst.-  Keuringsdienst is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation,-    either version 3 of the License, or (at your option) any later version.+  Keuringsdienst is free software: you can redistribute it and/or modify it+    under the terms of the GNU Lesser General Public License as published+    by the Free Software Foundation, either version 3 of the License,+    or (at your option) any later version.    Keuringsdienst is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;     without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -  See the GNU General Public License for more details.-  You should have received a copy of the GNU General Public License along with Keuringsdienst.-  If not, see <https://www.gnu.org/licenses/>.+  See the GNU Lesser General Public License for more details.+  You should have received a copy of the GNU Lesser General Public License+    along with Keuringsdienst. If not, see <https://www.gnu.org/licenses/>. -} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveAnyClass #-}
src/Keuringsdienst/Helpers.hs view
@@ -1,16 +1,18 @@ {--  Copyright © 2023 Josep Bigorra+  Copyright © Josep Bigorra <jjbigorra@gmail.com>    This file is part of Keuringsdienst.-  Keuringsdienst is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation,-    either version 3 of the License, or (at your option) any later version.+  Keuringsdienst is free software: you can redistribute it and/or modify it+    under the terms of the GNU Lesser General Public License as published+    by the Free Software Foundation, either version 3 of the License,+    or (at your option) any later version.    Keuringsdienst is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;     without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -  See the GNU General Public License for more details.-  You should have received a copy of the GNU General Public License along with Keuringsdienst.-  If not, see <https://www.gnu.org/licenses/>.+  See the GNU Lesser General Public License for more details.+  You should have received a copy of the GNU Lesser General Public License+    along with Keuringsdienst. If not, see <https://www.gnu.org/licenses/>. -} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-}@@ -36,8 +38,10 @@   ) where -import Data.Map as Map-import Data.Text as T+import Data.Map qualified as Map+import Data.Map (Map)+import Data.Text qualified as T+import Data.Text (Text) import Keuringsdienst as K  -- | Validate that a value is equal to another.@@ -47,7 +51,7 @@     then Success     else       Failure-        [pack $ "Expected " <> show actual <> " to equal " <> show value]+        [T.pack $ "Expected " <> show actual <> " to equal " <> show value]  -- | Validate that a value is different to another. isNotEqualTo :: (Show a, Eq a) => a -> ValidationRule a@@ -56,7 +60,7 @@     then Success     else       Failure-        [pack $ "Expected " <> show actual <> " to not equal " <> show value]+        [T.pack $ "Expected " <> show actual <> " to not equal " <> show value]  -- | Validate that a value is greater than another. isGreaterThan :: (Show a, Ord a) => a -> ValidationRule a@@ -65,7 +69,7 @@     then Success     else       Failure-        [ pack (show actual <> " was expected to be greater than " <> show ruleValue)+        [ T.pack (show actual <> " was expected to be greater than " <> show ruleValue)         ]  -- | Validate that a value is lesser than another.@@ -75,7 +79,7 @@     then Success     else       Failure-        [ pack (show actual <> " was expected to be lesser than " <> show ruleValue)+        [ T.pack (show actual <> " was expected to be lesser than " <> show ruleValue)         ]  -- | Validate that a value is a non empty @Text@.
test/Keuringsdienst/HelpersSpec.hs view
@@ -1,18 +1,19 @@ {--  Copyright © 2023 Josep Bigorra+  Copyright © Josep Bigorra <jjbigorra@gmail.com>    This file is part of Keuringsdienst.-  Keuringsdienst is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation,-    either version 3 of the License, or (at your option) any later version.+  Keuringsdienst is free software: you can redistribute it and/or modify it+    under the terms of the GNU Lesser General Public License as published+    by the Free Software Foundation, either version 3 of the License,+    or (at your option) any later version.    Keuringsdienst is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;     without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -  See the GNU General Public License for more details.-  You should have received a copy of the GNU General Public License along with Keuringsdienst.-  If not, see <https://www.gnu.org/licenses/>.+  See the GNU Lesser General Public License for more details.+  You should have received a copy of the GNU Lesser General Public License+    along with Keuringsdienst. If not, see <https://www.gnu.org/licenses/>. -}- module Keuringsdienst.HelpersSpec where  import Data.Text as T
test/KeuringsdienstSpec.hs view
@@ -1,16 +1,18 @@ {--  Copyright © 2023 Josep Bigorra+  Copyright © Josep Bigorra <jjbigorra@gmail.com>    This file is part of Keuringsdienst.-  Keuringsdienst is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation,-    either version 3 of the License, or (at your option) any later version.+  Keuringsdienst is free software: you can redistribute it and/or modify it+    under the terms of the GNU Lesser General Public License as published+    by the Free Software Foundation, either version 3 of the License,+    or (at your option) any later version.    Keuringsdienst is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;     without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -  See the GNU General Public License for more details.-  You should have received a copy of the GNU General Public License along with Keuringsdienst.-  If not, see <https://www.gnu.org/licenses/>.+  See the GNU Lesser General Public License for more details.+  You should have received a copy of the GNU Lesser General Public License+    along with Keuringsdienst. If not, see <https://www.gnu.org/licenses/>. -}  module KeuringsdienstSpec where
test/Spec.hs view
@@ -1,3 +1,20 @@+{-+  Copyright © Josep Bigorra <jjbigorra@gmail.com>++  This file is part of Keuringsdienst.+  Keuringsdienst is free software: you can redistribute it and/or modify it+    under the terms of the GNU Lesser General Public License as published+    by the Free Software Foundation, either version 3 of the License,+    or (at your option) any later version.++  Keuringsdienst is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;+    without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.++  See the GNU Lesser General Public License for more details.+  You should have received a copy of the GNU Lesser General Public License+    along with Keuringsdienst. If not, see <https://www.gnu.org/licenses/>.+-}+ module Main (main) where  import Keuringsdienst.HelpersSpec