packages feed

docker 0.6.0.3 → 0.6.0.4

raw patch · 3 files changed

+19/−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.3+version:             0.6.0.4 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
@@ -944,7 +944,10 @@ instance ToJSON Bind where     toJSON (Bind src dest mode) = toJSON $ case mode of                         Nothing -> T.concat[src, ":", dest]-                        Just m ->  T.concat[src, ":", dest, ":", (T.pack $ show m)]+                        Just m ->  T.concat[src, ":", dest, ":", str]+                            where str = case m of+                                    ReadOnly -> "ro"+                                    ReadWrite -> "rw"  data Link = Link Text (Maybe Text) deriving (Eq, Show) 
tests/tests.hs view
@@ -193,6 +193,19 @@       HM.empty     sampleVolumes = [Volume "/tmp", Volume "/opt"] +testBindsJson :: TestTree+testBindsJson = testGroup "Testing Binds JSON" [testSample1, testSample2, testSample3]+  where+    testSample1 =+      testCase "Testing Bind without VolumePermission" $+        JSON.String "/foo:/bar" @=? JSON.toJSON (Bind "/foo" "/bar" Nothing)+    testSample2 =+      testCase "Testing Bind with ReadOnly" $+        JSON.String "/foo:/bar:ro" @=? JSON.toJSON (Bind "/foo" "/bar" (Just ReadOnly))+    testSample3 =+      testCase "Testing Bind with WriteOnly" $+        JSON.String "/foo:/bar:rw" @=? JSON.toJSON (Bind "/foo" "/bar" (Just ReadWrite))+ testEntrypointJson :: TestTree testEntrypointJson = testGroup "Testing ContainerConfig JSON" [testSample1, testSample2, testSample3, testSample4, testSample5]   where@@ -257,6 +270,7 @@     "JSON Tests"     [ testExposedPortsJson     , testVolumesJson+    , testBindsJson     , testLabelsJson     , testLogDriverOptionsJson     , testEntrypointJson