packages feed

jespresso 1.0.1 → 1.0.1.1

raw patch · 2 files changed

+13/−11 lines, 2 filesdep +network-uridep ~networkdep ~tasty-goldenPVP ok

version bump matches the API change (PVP)

Dependencies added: network-uri

Dependency ranges changed: network, tasty-golden

API changes (from Hackage documentation)

Files

jespresso.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                jespresso-version:             1.0.1+version:             1.0.1.1 synopsis:            Extract all JavaScript from an HTML page and consolidate it in one script. description:         Allows extraction and consolidation of JavaScript code in an HTML page so that it behaves like the original. Consolidation is a process of transforming an HTML page into an equivalent, but containing JavaScript code only in one inlined script tag. Note that the package versions follow Semantic Versioning model (semver.org). license:             BSD3@@ -14,7 +14,7 @@ copyright:           (c) 2012-2015 Stevens Institute of Technology category:            Web stability:           Experimental-tested-with:         GHC==7.6.3+tested-with:         GHC==7.8.4 build-type:          Simple cabal-version:       >=1.10 extra-source-files:  test-data/cases/*.html, test-data/expects/*.html@@ -26,7 +26,7 @@ Source-repository this    type: git    location: git://github.com/achudnov/jespresso.git-   tag: 1.0.1+   tag: 1.0.1.1  library   build-depends: base >= 4.2.0 && < 5@@ -38,7 +38,8 @@                , random >= 1 && < 2                , bytestring >= 0.9 && < 0.11                , http-encodings >= 0.9.1 && < 1.0-               , network >= 2.4 && < 2.5+               , network == 2.6.*+               , network-uri == 2.6.*                , data-default-class >= 0.0.1 && < 0.1                , data-default-instances-base >= 0.0.1 && < 0.1   exposed-modules:    Text.Html.Consolidate@@ -52,7 +53,8 @@                       , jespresso                       , cmdargs >= 0.9 && < 0.11                       , HTTP >= 4000.2.0 && < 5000-                      , network >= 2.4 && < 2.5+                      , network+                      , network-uri   default-language:  Haskell2010  Test-Suite unittest@@ -62,7 +64,7 @@   Build-Depends:  base >= 4 && < 5                 , jespresso                 , tasty >= 0.4 && < 0.11-                , tasty-golden == 2.*+                , tasty-golden == 2.3.*                 , directory >= 1.2 && < 1.3                 , filepath >= 1.1 && < 1.4                 , hxt >= 9.2.0 && < 10
test/UnitTest.hs view
@@ -37,15 +37,15 @@       state  = initialState ns       normalizedA :: String -> TArr XmlTree XmlTree       normalizedA s = single $ parseHTML s Nothing >>> consolidateArr-      runX :: forall r s. (String -> TArr XmlTree XmlTree) -> FilePath -> ValueGetter r String-      runX a f = liftIO $ do+      runX :: forall r s. (String -> TArr XmlTree XmlTree) -> FilePath -> IO String+      runX a f = do           s <- readFile f           let arr :: TArr XmlTree String               arr = (a s) >>> writeDocumentToString [withOutputHTML, withOutputEncoding utf8]           liftM head $ runXIOState state $ arr-      expectedValueAction :: forall r. ValueGetter r String-      expectedValueAction = liftIO $ readFile expectFileName-      testValueAction     = runX normalizedA  caseFileName+      expectedValueAction :: IO String+      expectedValueAction = readFile expectFileName+      testValueAction     = runX normalizedA caseFileName   in goldenTest testFileName expectedValueAction testValueAction verifyOutput (const $ return ())  verifyOutput :: String -> String -> IO (Maybe String)