packages feed

gitit 0.12.3 → 0.12.3.1

raw patch · 3 files changed

+21/−10 lines, 3 filesdep −uridep ~hoauth2PVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependencies removed: uri

Dependency ranges changed: hoauth2

API changes (from Hackage documentation)

- Network.Gitit.Compat.Except: catchError :: MonadError e m => m a -> e -> m a -> m a
+ Network.Gitit.Compat.Except: catchError :: MonadError e m => m a -> (e -> m a) -> m a
- Network.Gitit.Compat.Except: class Monad m => MonadError e (m :: * -> *) | m -> e
+ Network.Gitit.Compat.Except: class Monad m => MonadError e (m :: Type -> Type) | m -> e
- Network.Gitit.Compat.Except: data ExceptT e (m :: * -> *) a
+ Network.Gitit.Compat.Except: data ExceptT e (m :: Type -> Type) a
- Network.Gitit.Compat.Except: runExceptT :: () => ExceptT e m a -> m Either e a
+ Network.Gitit.Compat.Except: runExceptT :: () => ExceptT e m a -> m (Either e a)
- Network.Gitit.Interface: Config :: FilePath -> FileStoreType -> PageType -> String -> MathMethod -> Bool -> Bool -> Handler -> Handler -> AuthenticationLevel -> Handler -> FilePath -> Int -> FilePath -> FilePath -> Priority -> FilePath -> [String] -> Bool -> Integer -> Integer -> String -> Int -> Bool -> String -> [String] -> [String] -> String -> String -> Maybe (String, [String]) -> Bool -> String -> String -> String -> String -> Bool -> Bool -> FilePath -> Map String String -> String -> String -> Text -> Bool -> String -> Bool -> String -> Integer -> Integer -> Bool -> Maybe FilePath -> Bool -> Int -> GithubConfig -> Config
+ Network.Gitit.Interface: Config :: FilePath -> FileStoreType -> PageType -> String -> MathMethod -> Bool -> Bool -> (Handler -> Handler) -> AuthenticationLevel -> Handler -> FilePath -> Int -> FilePath -> FilePath -> Priority -> FilePath -> [String] -> Bool -> Integer -> Integer -> String -> Int -> Bool -> String -> [String] -> [String] -> String -> String -> Maybe (String, [String]) -> Bool -> String -> String -> String -> String -> Bool -> Bool -> FilePath -> Map String String -> String -> String -> Text -> Bool -> String -> Bool -> String -> Integer -> Integer -> Bool -> Maybe FilePath -> Bool -> Int -> GithubConfig -> Config
- Network.Gitit.Types: Command :: (Maybe String) -> Command
+ Network.Gitit.Types: Command :: Maybe String -> Command
- Network.Gitit.Types: Config :: FilePath -> FileStoreType -> PageType -> String -> MathMethod -> Bool -> Bool -> Handler -> Handler -> AuthenticationLevel -> Handler -> FilePath -> Int -> FilePath -> FilePath -> Priority -> FilePath -> [String] -> Bool -> Integer -> Integer -> String -> Int -> Bool -> String -> [String] -> [String] -> String -> String -> Maybe (String, [String]) -> Bool -> String -> String -> String -> String -> Bool -> Bool -> FilePath -> Map String String -> String -> String -> Text -> Bool -> String -> Bool -> String -> Integer -> Integer -> Bool -> Maybe FilePath -> Bool -> Int -> GithubConfig -> Config
+ Network.Gitit.Types: Config :: FilePath -> FileStoreType -> PageType -> String -> MathMethod -> Bool -> Bool -> (Handler -> Handler) -> AuthenticationLevel -> Handler -> FilePath -> Int -> FilePath -> FilePath -> Priority -> FilePath -> [String] -> Bool -> Integer -> Integer -> String -> Int -> Bool -> String -> [String] -> [String] -> String -> String -> Maybe (String, [String]) -> Bool -> String -> String -> String -> String -> Bool -> Bool -> FilePath -> Map String String -> String -> String -> Text -> Bool -> String -> Bool -> String -> Integer -> Integer -> Bool -> Maybe FilePath -> Bool -> Int -> GithubConfig -> Config
- Network.Gitit.Types: GititState :: Sessions SessionData -> Map String User -> FilePath -> PageLayout -> Html -> Handler -> [Plugin] -> GititState
+ Network.Gitit.Types: GititState :: Sessions SessionData -> Map String User -> FilePath -> (PageLayout -> Html -> Handler) -> [Plugin] -> GititState

Files

CHANGES view
@@ -1,3 +1,11 @@+Version 0.12.3.1 released 31 Dec 2018++  * Improve compatibility with GHC 8.6 (Phil Ruffwind, #625).++    + Replaced uses of uri (out of date package) with uri-bytestring, which+      gitit already uses in other places.+    + Bumped hoauth2 version bounds to support 1.8.*.+ Version 0.12.3 released 09 Oct 2018    * Change hk-pyg.css to highlighting.css with new CSS for pandoc 2
gitit.cabal view
@@ -1,5 +1,5 @@ name:                gitit-version:             0.12.3+version:             0.12.3.1 Cabal-version:       >= 1.8 build-type:          Simple synopsis:            Wiki using happstack, git or darcs, and pandoc.@@ -167,10 +167,9 @@                      tagsoup >= 0.13 && < 0.15,                      blaze-html >= 0.4 && < 0.10,                      json >= 0.4 && < 0.10,-                     uri >= 0.1 && < 0.2,                      uri-bytestring >= 0.2.3.3 && <= 0.4,                      split,-                     hoauth2 >= 1.3.0 && < 1.8,+                     hoauth2 >= 1.3.0 && < 1.9,                      xml-conduit >= 1.5 && < 1.9,                      http-conduit >= 2.1.6 && < 2.4,                      http-client-tls >= 0.2.2 && < 0.4,
src/Network/Gitit/ContentTransformer.hs view
@@ -102,13 +102,14 @@ #else import Text.Blaze.Renderer.String as Blaze ( renderHtml ) #endif+import URI.ByteString (Query(Query), URIRef(uriPath), laxURIParserOptions,+                       parseURI, uriQuery) import qualified Data.Text as T import qualified Data.ByteString as S (concat)-import qualified Data.ByteString.Char8 as SC (unpack)+import qualified Data.ByteString.Char8 as SC (pack, unpack) import qualified Data.ByteString.Lazy as L (toChunks, fromChunks) import qualified Data.FileStore as FS import qualified Text.Pandoc as Pandoc-import Text.URI (parseURI, URI(..), uriQueryItems)  -- -- ContentTransformer runners@@ -459,11 +460,14 @@         base' <- getWikiBase         request <- askRq         return $ do-            uri <- getHeader "referer" request >>= parseURI . SC.unpack-            let params = uriQueryItems uri-            redirect' <- lookup "redirect" params-            guard $ redirect' == "yes"-            path' <- stripPrefix (base' ++ "/") (uriPath uri)+            referer <- getHeader "referer" request+            uri <- case parseURI laxURIParserOptions referer of+                Left _ -> Nothing+                Right uri -> Just uri+            let Query params = uriQuery uri+            redirect' <- lookup (SC.pack "redirect") params+            guard $ redirect' == SC.pack "yes"+            path' <- stripPrefix (base' ++ "/") (SC.unpack (uriPath uri))             let path'' = if null path' then frontPage cfg else urlDecode path'             guard $ isPage path''             return path''