ws 0.0.5 → 0.0.6
raw patch · 2 files changed
+20/−10 lines, 2 filesdep ~attoparsec-uriPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: attoparsec-uri
API changes (from Hackage documentation)
Files
- app/Main.hs +13/−3
- ws.cabal +7/−7
app/Main.hs view
@@ -14,7 +14,7 @@ import qualified Data.Vector as V import qualified Data.Strict.Maybe as Strict import Data.Strict.Tuple (Pair (..))-import Data.URI (URI (..), parseURI)+import Data.URI (URI (..), parseURI, DirOrFile (Dir)) import Data.URI.Auth (URIAuth (..), printURIAuth) import Data.Attoparsec.Text (parseOnly) @@ -76,13 +76,19 @@ { uriScheme , uriAuthority = URIAuth { uriAuthUser+ , uriAuthPassword , uriAuthHost , uriAuthPort } , uriPath , uriQuery } ->- let host = T.unpack $ printURIAuth URIAuth {uriAuthUser,uriAuthHost,uriAuthPort = Strict.Nothing}+ let host = T.unpack $ printURIAuth URIAuth+ { uriAuthUser+ , uriAuthPassword+ , uriAuthHost+ , uriAuthPort = Strict.Nothing+ } port = case uriAuthPort of Strict.Nothing | uriScheme == Strict.Just "wss" -> 433@@ -91,9 +97,13 @@ path' = case uriPath of Strict.Nothing -> Strict.Nothing- Strict.Just uriPath'+ Strict.Just (uriPath', dirOrFile) -> Strict.Just $ T.unpack $ "/" <> T.intercalate "/" (V.toList uriPath') <>+ ( case dirOrFile of+ Dir -> "/"+ _ -> ""+ ) <> ( if V.null uriQuery then "" else "?" <> T.intercalate "&" ((\(k :!: mv) -> k <> Strict.maybe "" ("=" <>) mv) <$> V.toList uriQuery)
ws.cabal view
@@ -1,24 +1,24 @@--- This file has been generated from package.yaml by hpack version 0.21.2.+cabal-version: 1.12++-- This file has been generated from package.yaml by hpack version 0.35.2. -- -- see: https://github.com/sol/hpack ----- hash: 1e0b3978e09bab9b1ca1ae88ade2d3c827cf4b771cc6e914a438477eace47d3d+-- hash: 5a8a66875e13ead9d5c15c041f9bea2953e4c6d7497b5bff2d46ea28fa9af53e name: ws-version: 0.0.5+version: 0.0.6 synopsis: A simple CLI utility for interacting with a websocket description: Please see the README on Github at <https://git.localcooking.com/tooling/ws#readme> category: Web homepage: https://github.com/athanclark/ws#readme bug-reports: https://github.com/athanclark/ws/issues author: Athan Clark-maintainer: athan.clark@localcooking.com+maintainer: athan.clark@gmail.com copyright: 2018 Athan Clark license: BSD3 license-file: LICENSE build-type: Simple-cabal-version: >= 1.10- extra-source-files: README.md @@ -37,7 +37,7 @@ ghc-options: -Wall build-depends: async- , attoparsec-uri >=0.0.6+ , attoparsec-uri >=0.0.9 , base >=4.7 && <5 , bytestring , exceptions