packages feed

rattletrap 3.0.0 → 3.1.0

raw patch · 3 files changed

+22/−4 lines, 3 filesdep +http-clientdep +http-client-tlsPVP ok

version bump matches the API change (PVP)

Dependencies added: http-client, http-client-tls

API changes (from Hackage documentation)

+ Rattletrap.Main: readUrlOrFile :: FilePath -> IO ByteString

Files

library/Rattletrap/Main.hs view
@@ -5,6 +5,8 @@  import qualified Data.ByteString.Lazy as ByteString import qualified Data.Version as Version+import qualified Network.HTTP.Client as Client+import qualified Network.HTTP.Client.TLS as Client import qualified System.Environment as Environment  -- | Gets command-line arguments and passes them to 'mainWithArgs'.@@ -51,6 +53,14 @@ getIO files =   case files of     [] -> pure (ByteString.getContents, ByteString.putStr)-    [i] -> pure (ByteString.readFile i, ByteString.putStr)-    [i, o] -> pure (ByteString.readFile i, ByteString.writeFile o)+    [i] -> pure (readUrlOrFile i, ByteString.putStr)+    [i, o] -> pure (readUrlOrFile i, ByteString.writeFile o)     _ -> fail ("unknown files: " ++ show files)++readUrlOrFile :: FilePath -> IO ByteString.ByteString+readUrlOrFile i = case Client.parseUrlThrow i of+  Just request -> do+    manager <- Client.newTlsManager+    response <- Client.httpLbs request manager+    pure (Client.responseBody response)+  Nothing -> ByteString.readFile i
package.yaml view
@@ -1,5 +1,5 @@ name: rattletrap-version: 3.0.0+version: 3.1.0  category: Game description: Rattletrap parses and generates Rocket League replays.@@ -24,6 +24,8 @@   - bytestring >= 0.10.8 && < 0.11   - containers >= 0.5.7 && < 0.6   - data-binary-ieee754 >= 0.4.4 && < 0.5+  - http-client >= 0.5.7 && < 0.6+  - http-client-tls >= 0.3.5 && < 0.4   - template-haskell >= 2.11.0 && < 2.13   - text >= 1.2.2 && < 1.3   - vector >= 0.11.0 && < 0.13
rattletrap.cabal view
@@ -3,7 +3,7 @@ -- see: https://github.com/sol/hpack  name:           rattletrap-version:        3.0.0+version:        3.1.0 synopsis:       Parse and generate Rocket League replays. description:    Rattletrap parses and generates Rocket League replays. category:       Game@@ -99,6 +99,8 @@     , bytestring >= 0.10.8 && < 0.11     , containers >= 0.5.7 && < 0.6     , data-binary-ieee754 >= 0.4.4 && < 0.5+    , http-client >= 0.5.7 && < 0.6+    , http-client-tls >= 0.3.5 && < 0.4     , template-haskell >= 2.11.0 && < 2.13     , text >= 1.2.2 && < 1.3     , vector >= 0.11.0 && < 0.13@@ -199,6 +201,8 @@     , bytestring >= 0.10.8 && < 0.11     , containers >= 0.5.7 && < 0.6     , data-binary-ieee754 >= 0.4.4 && < 0.5+    , http-client >= 0.5.7 && < 0.6+    , http-client-tls >= 0.3.5 && < 0.4     , template-haskell >= 2.11.0 && < 2.13     , text >= 1.2.2 && < 1.3     , vector >= 0.11.0 && < 0.13@@ -220,6 +224,8 @@     , bytestring >= 0.10.8 && < 0.11     , containers >= 0.5.7 && < 0.6     , data-binary-ieee754 >= 0.4.4 && < 0.5+    , http-client >= 0.5.7 && < 0.6+    , http-client-tls >= 0.3.5 && < 0.4     , template-haskell >= 2.11.0 && < 2.13     , text >= 1.2.2 && < 1.3     , vector >= 0.11.0 && < 0.13