packages feed

wai-middleware-throttle 0.2.0.0 → 0.2.0.1

raw patch · 4 files changed

+3/−71 lines, 4 filesdep −processdep −regex-compatdep ~basesetup-changedPVP ok

version bump matches the API change (PVP)

Dependencies removed: process, regex-compat

Dependency ranges changed: base

API changes (from Hackage documentation)

Files

Network/Wai/Middleware/Throttle.hs view
@@ -102,7 +102,7 @@         -- , throttleZone        = "" -- empty zone       , throttleRate        = 1  -- req / sec         -- , throttleCacheSize   = 10 -- 10M address cache-      , throttleBurst       = 1  -- 5 concurrent requests+      , throttleBurst       = 1  -- concurrent requests       , onThrottled         = onThrottled'       }   where
Setup.hs view
@@ -1,10 +1,2 @@ import Distribution.Simple-import Distribution.Simple.Program--main :: IO ()-main = defaultMainWithHooks simpleUserHooks-       {-         -- cabal-install is used during testing to run-         -- and verify haddock documentation.-         hookedPrograms = [ simpleProgram "cabal" ]-       }+main = defaultMain
− test/Haddock.hs
@@ -1,49 +0,0 @@--------------------------------------------------------------------------------- |--- Module      : Haddock--- Description : Haddock Test Coverage--- Copyright   : (c) 2015 Christopher Reichert--- License     : BSD3--- Maintainer  : Christopher Reichert <creichert07@gmail.com>--- Stability   : testing--- Portability : POSIX--module Main (main) where--import           Data.List      (genericLength)-import           Data.Maybe     (catMaybes)-import           System.Exit    (exitFailure, exitSuccess)-import           System.Process (readProcess)-import           Text.Regex     (matchRegex, mkRegex)---main :: IO ()-main = do-  output <- readProcess "cabal"-            [-              "haddock"-            , "-v"-            , "--hoogle"-            , "--html"-            , "--internal"-            ] ""--  if average (match output) >= expected-    then exitSuccess-    else putStr output >> exitFailure----- | Expected percentage of documentation to pass--- the test-expected :: Double-expected = 50.0---average :: (Fractional a, Real b) => [b] -> a-average xs = realToFrac (sum xs) / genericLength xs---match :: String -> [Int]-match = fmap read . concat . catMaybes . fmap (matchRegex pattern) . lines-  where-    pattern = mkRegex "^ *([0-9]*)% "
wai-middleware-throttle.cabal view
@@ -1,6 +1,6 @@  name:                wai-middleware-throttle-version:             0.2.0.0+version:             0.2.0.1 license:             BSD3 license-file:        LICENSE author:              Christopher Reichert@@ -55,17 +55,6 @@                      , HUnit                      , stm                      , transformers---test-suite haddock-  main-is:             test/Haddock.hs-  ghc-options:         -Wall -Werror -threaded-  build-tools:         haddock-  type:                exitcode-stdio-1.0-  default-language:    Haskell2010-  build-depends:       base-                     , process-                     , regex-compat   test-suite hlint