packages feed

hercules-ci-api-agent 0.4.1.1 → 0.4.1.2

raw patch · 4 files changed

+18/−8 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -5,6 +5,12 @@  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## 0.4.1.2 - 2022-03-09++### Added++ - Haskell `aeson` 2.0 support+ ## 0.4.1.1 - 2022-03-07  ### Fixed
hercules-ci-api-agent.cabal view
@@ -1,7 +1,7 @@ cabal-version: 1.12  name:           hercules-ci-api-agent-version:        0.4.1.1+version:        0.4.1.2 synopsis:       API definition for Hercules CI Agent to talk to hercules-ci.com or Hercules CI Enterprise category:       API, CI, Testing, DevOps, Nix homepage:       https://github.com/hercules-ci/hercules-ci-agent#readme
test/Hercules/API/Agent/LifeCycle/AgentInfoSpec.hs view
@@ -1,6 +1,6 @@ module Hercules.API.Agent.LifeCycle.AgentInfoSpec where -import Data.Aeson (eitherDecode, encode, (.=))+import Data.Aeson (eitherDecode, encode) import qualified Data.Aeson as A import qualified Data.ByteString.Lazy as BL import qualified Data.Map as M@@ -81,15 +81,18 @@       concurrentTasks = 19,       labels =         M.fromList-          [ "nix is cool" .= True,-            "revision" .= ("deadbeef" :: Text),+          [ "nix is cool" $= True,+            "revision" $= ("deadbeef" :: Text),             "an object"-              .= A.object-                [ "hi" .= (42 :: Int)+              $= A.object+                [ "hi" $= (42 :: Int)                 ],-            "drinks menu" .= ["goat milk", "mate", "matcha" :: Text]+            "drinks menu" $= ["goat milk", "mate", "matcha" :: Text]           ]     }++($=) :: A.ToJSON b => a -> b -> (a, A.Value)+a $= b = (a, A.toJSON b)  spec :: Spec spec = describe "AgentInfo" $ do
test/Hercules/Formats/SecretSpec.hs view
@@ -8,6 +8,7 @@ import Control.Applicative import Data.Aeson (eitherDecode) import qualified Data.Aeson as A+import qualified Data.Aeson.Key as AK import Data.Char import Data.Either (isLeft) import Data.Int@@ -66,7 +67,7 @@   frequency     [ (2, A.String <$> text),       (2, A.Array . V.fromList <$> vectorOf n (resize n' genValue)),-      (5, A.object <$> vectorOf n ((A..=) <$> text <*> (resize n' genValue))),+      (5, A.object <$> vectorOf n ((\s k -> AK.fromText s A..= k) <$> text <*> resize n' genValue)),       (1, A.Number . fromIntegral <$> (arbitrary :: Gen Int64)), -- no fractions :( but doesn't matter here       (1, A.Bool <$> arbitrary)     ]