statsd-client 0.1.0.1 → 0.1.0.2
raw patch · 2 files changed
+9/−2 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- src/Network/Statsd.hs +8/−1
- statsd-client.cabal +1/−1
src/Network/Statsd.hs view
@@ -53,7 +53,7 @@ fromURI :: URI -> IO (Maybe StatsdClient) fromURI uri = case uriAuthority uri of Nothing -> return Nothing- Just auth -> let hostname = uriRegName auth+ Just auth -> let hostname = uriRegName' auth port = fromMaybe 8126 $ (actualPort . uriPort) auth prefix = replace '/' '.' (uriPath uri) key = let userInfo = uriUserInfo auth@@ -76,6 +76,13 @@ actualPort :: String -> Maybe Int actualPort (':':xs) = (Just . read) xs actualPort _ = Nothing++ uriRegName' :: URIAuth -> String+ uriRegName' auth = let hostname = uriRegName auth+ stripped = if isIPv6address hostname+ then (takeWhile (/=']') . dropWhile (=='[')) hostname+ else hostname+ in stripped client :: Hostname -> Port -> Stat -> Maybe Key -> IO (Maybe StatsdClient) client host port namespace key = do
statsd-client.cabal view
@@ -1,5 +1,5 @@ name: statsd-client-version: 0.1.0.1+version: 0.1.0.2 cabal-version: >=1.10 build-type: Simple license: MIT