Solve extra merge conflicts

This commit is contained in:
Arian van Putten 2015-10-01 15:58:39 +02:00
parent 297f5743ec
commit 011f094c4a
5 changed files with 12 additions and 13 deletions

View file

@ -125,10 +125,11 @@ instance (KnownSymbol capture, ToText a, HasClient sublayout)
instance (AuthenticateRequest authdata, HasClient sublayout) => HasClient (AuthProtect authdata (usr :: *) policy :> sublayout) where
type Client (AuthProtect authdata usr policy :> sublayout) = authdata -> Client sublayout
clientWithRoute Proxy req baseurl val =
clientWithRoute Proxy req baseurl manager val =
clientWithRoute (Proxy :: Proxy sublayout)
(authReq val req)
baseurl
manager
-- | If you have a 'Delete' endpoint in your API, the client
-- side querying function that is created when calling 'client'

View file

@ -161,7 +161,6 @@ withFailServer action = withWaiDaemon (return failServer) action
spec :: IO ()
spec = withServer $ \ baseUrl -> do
<<<<<<< HEAD
manager <- C.newManager C.defaultManagerSettings
let getGet :: ExceptT ServantError IO Person
getDeleteEmpty :: ExceptT ServantError IO ()
@ -269,7 +268,7 @@ spec = withServer $ \ baseUrl -> do
Right val -> getHeaders val `shouldBe` [("X-Example1", "1729"), ("X-Example2", "eg2")]
it "Handles Authentication appropriatley" $ withServer $ \ _ -> do
(Arrow.left show <$> runExceptT (getPrivatePerson (BasicAuth "servant" "server"))) `shouldReturn` Right alice
(Control.Arrow.left show <$> runExceptT (getPrivatePerson (BasicAuth "servant" "server"))) `shouldReturn` Right alice
it "returns 401 when not properly authenticated" $ do
Left res <- runExceptT (getPrivatePerson (BasicAuth "xxx" "yyy"))

View file

@ -73,14 +73,14 @@ instance ToSample Greet where
instance ToSample Int where
toSamples _ = singleSample 1729
instance ToSample User User where
toSample _ = Just (User "I'm a user!")
instance ToSample User where
toSamples _ = singleSample (User "I'm a user!")
instance ToSample Cookie Cookie where
toSample _ = Just (Cookie "cookie")
instance ToSample Cookie where
toSamples _ = singleSample (Cookie "cookie")
instance ToSample SecretData SecretData where
toSample _ = Just (SecretData "shhhhh!")
instance ToSample SecretData where
toSamples _ = singleSample (SecretData "shhhhh!")
instance ToAuthInfo (AuthProtect Cookie User policy) where
toAuthInfo _ = AuthenticationInfo "In this sentence we outline how authentication works."

View file

@ -149,13 +149,12 @@ module Servant.Docs
, DocOptions(..) , defaultDocOptions, maxSamples
, -- * Classes you need to implement for your types
<<<<<<< HEAD
ToSample(..)
, toSample
, noSamples
, singleSample
, samples
ToAuthInfo(..)
, ToAuthInfo(..)
, sampleByteString
, sampleByteStrings
, ToParam(..)

View file

@ -754,8 +754,8 @@ instance
{-# OVERLAPPABLE #-}
#endif
( HasDocs sublayout
, ToSample auth auth
, ToSample usr usr
, ToSample auth
, ToSample usr
, ToAuthInfo (AuthProtect auth usr policy)
)
=> HasDocs (AuthProtect auth usr policy :> sublayout) where