packages feed

docker 0.6.0.4 → 0.6.0.5

raw patch · 3 files changed

+11/−2 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

docker.cabal view
@@ -1,5 +1,5 @@ name:                docker-version:             0.6.0.4+version:             0.6.0.5 synopsis:            An API client for docker written in Haskell description:         See API documentation below. homepage:            https://github.com/denibertovic/docker-hs
src/Docker/Client/Types.hs view
@@ -107,6 +107,7 @@ import           Data.Aeson.Types    (defaultOptions, fieldLabelModifier) import           Data.Char           (isAlphaNum, toUpper) import qualified Data.HashMap.Strict as HM+import           Data.Maybe          (fromMaybe) import           Data.Monoid         ((<>)) import           Data.Scientific     (floatingOrInteger) import           Data.Text           (Text)@@ -1159,7 +1160,7 @@                     port <- parseIntegerText port'                     portType <- parseJSON $ JSON.String portType'                     acc <- accM-                    hps <- parseJSON v+                    hps <- fromMaybe [] <$> parseJSON v                     return $ (PortBinding port portType hps):acc                 _ -> fail "Could not parse PortBindings"     parseJSON (JSON.Null) = return []
tests/tests.hs view
@@ -206,6 +206,13 @@       testCase "Testing Bind with WriteOnly" $         JSON.String "/foo:/bar:rw" @=? JSON.toJSON (Bind "/foo" "/bar" (Just ReadWrite)) +testPortBindingJSON :: TestTree+testPortBindingJSON = testGroup "Testing PortBinding JSON" [testSample1]+  where+    testSample1 =+      testCase "Test decoding null hostPorts" $ assert $ (JSON.decode "{ \"22/tcp\": null }" :: Maybe [PortBinding]) == Just [PortBinding 22 TCP []]++ testEntrypointJson :: TestTree testEntrypointJson = testGroup "Testing ContainerConfig JSON" [testSample1, testSample2, testSample3, testSample4, testSample5]   where@@ -273,6 +280,7 @@     , testBindsJson     , testLabelsJson     , testLogDriverOptionsJson+    , testPortBindingJSON     , testEntrypointJson     , testEnvVarJson     , testNetworkingConfigJson