packages feed

aws 0.11 → 0.11.1

raw patch · 8 files changed

+48/−13 lines, 8 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

Aws/Core.hs view
@@ -130,20 +130,23 @@ import           System.Directory import           System.Environment import           System.FilePath          ((</>))+#if MIN_VERSION_time(1,5,0)+import           Data.Time.Format+#else import           System.Locale+#endif import qualified Text.XML                 as XML import qualified Text.XML.Cursor          as Cu import           Text.XML.Cursor          hiding (force, forceM) ------------------------------------------------------------------------------- - -- | Types that can be logged (textually). class Loggable a where     toLogText :: a -> T.Text  -- | A response with metadata. Can also contain an error response, or -- an internal error, via 'Attempt'.--- +-- -- Response forms a Writer-like monad. data Response m a = Response { responseMetadata :: m                              , responseResult :: Either E.SomeException a }@@ -222,10 +225,10 @@   -- | Associates a request type and a response type in a bi-directional way.--- +-- -- This allows the type-checker to infer the response type when given -- the request type and vice versa.--- +-- -- Note that the actual request generation and response parsing -- resides in 'SignQuery' and 'ResponseConsumer' respectively. class (SignQuery r, ResponseConsumer r a, Loggable (ResponseMetadata a))@@ -458,29 +461,33 @@       , HTTP.host = sqHost       , HTTP.port = sqPort       , HTTP.path = sqPath-      , HTTP.queryString = HTTP.renderQuery False sqQuery+      , HTTP.queryString =+          if sqMethod == PostQuery+            then ""+            else HTTP.renderQuery False sqQuery+       , HTTP.requestHeaders = catMaybes [ checkDate (\d -> ("Date", fmtRfc822Time d)) sqDate                                         , fmap (\c -> ("Content-Type", c)) contentType                                         , fmap (\md5 -> ("Content-MD5", Base64.encode $ toBytes md5)) sqContentMd5                                         , fmap (\auth -> ("Authorization", auth)) mauth]                               ++ sqAmzHeaders                               ++ sqOtherHeaders-      , HTTP.requestBody = +      , HTTP.requestBody =          -- An explicityly defined body parameter should overwrite everything else.         case sqBody of           Just x -> x-          Nothing -> +          Nothing ->             -- a POST query should convert its query string into the body             case sqMethod of-              PostQuery -> HTTP.RequestBodyLBS . Blaze.toLazyByteString $ +              PostQuery -> HTTP.RequestBodyLBS . Blaze.toLazyByteString $                            HTTP.renderQueryBuilder False sqQuery               _         -> HTTP.RequestBodyBuilder 0 mempty        , HTTP.decompress = HTTP.alwaysDecompress       , HTTP.checkStatus = \_ _ _ -> Nothing       }-    where +    where       checkDate f mb = maybe (f <$> mb) (const Nothing) $ lookup "date" sqOtherHeaders       -- An explicitly defined content-type should override everything else.       contentType = sqContentType `mplus` defContentType@@ -587,7 +594,7 @@ -- See <http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html>: you must create the -- canonical request as explained by Step 1 and this function takes care of Steps 2 and 3. authorizationV4 :: SignatureData-                -> AuthorizationHash +                -> AuthorizationHash                 -> B.ByteString -- ^ region, e.g. us-east-1                 -> B.ByteString -- ^ service, e.g. dynamodb                 -> B.ByteString -- ^ SignedHeaders, e.g. content-type;host;x-amz-date;x-amz-target@@ -671,7 +678,7 @@ -- | @queryList f prefix xs@ constructs a query list from a list of -- elements @xs@, using a common prefix @prefix@, and a transformer -- function @f@.--- +-- -- A dot (@.@) is interspersed between prefix and generated key. -- -- Example:
Aws/Iam/Core.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts      #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RecordWildCards       #-}@@ -32,7 +33,11 @@ import           Data.Typeable import qualified Network.HTTP.Conduit           as HTTP import qualified Network.HTTP.Types             as HTTP+#if MIN_VERSION_time(1,5,0)+import           Data.Time.Format+#else import           System.Locale+#endif import           Text.XML.Cursor                (($//)) import qualified Text.XML.Cursor                as Cu 
Aws/S3/Commands/CopyObject.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} module Aws.S3.Commands.CopyObject where @@ -14,7 +15,11 @@ import           Data.Time import qualified Network.HTTP.Conduit as HTTP import           Text.XML.Cursor (($/), (&|))+#if MIN_VERSION_time(1,5,0)+import           Data.Time.Format+#else import           System.Locale+#endif  data CopyMetadataDirective = CopyMetadata | ReplaceMetadata [(T.Text,T.Text)]   deriving (Show)
Aws/S3/Commands/GetService.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} module Aws.S3.Commands.GetService where @@ -5,7 +6,11 @@ import           Aws.S3.Core import           Data.Maybe import           Data.Time.Format+#if MIN_VERSION_time(1,5,0)+import           Data.Time.Format+#else import           System.Locale+#endif import           Text.XML.Cursor  (($/), ($//), (&|)) import qualified Data.Text        as T import qualified Text.XML.Cursor  as Cu
Aws/S3/Core.hs view
@@ -17,7 +17,11 @@ import           Control.Applicative            ((<|>)) import           Data.Time import           Data.Typeable+#if MIN_VERSION_time(1,5,0)+import           Data.Time.Format+#else import           System.Locale+#endif import           Text.XML.Cursor                (($/), (&|)) import qualified Blaze.ByteString.Builder       as Blaze import qualified Blaze.ByteString.Builder.Char8 as Blaze8
Aws/Sqs/Core.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} module Aws.Sqs.Core where  import           Aws.Core@@ -23,7 +24,11 @@ import           Data.Typeable import qualified Network.HTTP.Conduit           as HTTP import qualified Network.HTTP.Types             as HTTP+#if MIN_VERSION_time(1,5,0)+import           Data.Time.Format+#else import           System.Locale+#endif import qualified Text.XML                       as XML import           Text.XML.Cursor                (($/)) import qualified Text.XML.Cursor                as Cu
README.org view
@@ -90,6 +90,10 @@  ** 0.11 series +- 0.11.1+  - Support time 1.5+  - Fix duplicate sending of query when using PostQuery+ - 0.11   - New functions for running AWS transactions   - Performance optimizations for DynamoDB and S3 MultiPartUpload
aws.cabal view
@@ -1,5 +1,5 @@ Name:                aws-Version:             0.11+Version:             0.11.1 Synopsis:            Amazon Web Services (AWS) for Haskell Description:         Bindings for Amazon Web Services (AWS), with the aim of supporting all AWS services. To see a high level overview of the library, see the README at <https://github.com/aristidb/aws/blob/master/README.org>. Homepage:            http://github.com/aristidb/aws@@ -20,7 +20,7 @@ Source-repository this   type: git   location: https://github.com/aristidb/aws.git-  tag: 0.11+  tag: 0.11.1  Source-repository head   type: git