gitit 0.12.1.1 → 0.12.2
raw patch · 20 files changed
+46/−35 lines, 20 filesdep ~aesondep ~http-client-tlsdep ~http-conduitPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: aeson, http-client-tls, http-conduit, pandoc, pandoc-types, tagsoup
API changes (from Hackage documentation)
- Network.Gitit.Authentication.Github: instance Data.Aeson.Types.Class.FromJSON Network.Gitit.Authentication.Github.GithubUser
- Network.Gitit.Authentication.Github: instance Data.Aeson.Types.Class.FromJSON Network.Gitit.Authentication.Github.GithubUserMail
+ Network.Gitit.Authentication.Github: instance Data.Aeson.Types.FromJSON.FromJSON Network.Gitit.Authentication.Github.GithubUser
+ Network.Gitit.Authentication.Github: instance Data.Aeson.Types.FromJSON.FromJSON Network.Gitit.Authentication.Github.GithubUserMail
Files
- CHANGES +4/−0
- README.markdown +2/−4
- data/markup.DocBook +2/−2
- data/markup.Markdown +2/−2
- data/markup.Org +2/−2
- data/markup.Textile +1/−1
- data/markupHelp/HTML +1/−1
- data/markupHelp/LaTeX +1/−1
- data/markupHelp/LaTeX+LHS +1/−1
- data/markupHelp/Markdown +2/−2
- data/markupHelp/Markdown+LHS +2/−2
- data/markupHelp/Org +1/−1
- data/markupHelp/RST +1/−1
- data/markupHelp/RST+LHS +1/−1
- data/templates/content.st +1/−1
- gitit.cabal +8/−8
- src/Network/Gitit/Config.hs +3/−0
- src/Network/Gitit/Handlers.hs +1/−1
- src/Network/Gitit/Page.hs +4/−3
- src/Network/Gitit/State.hs +6/−1
CHANGES view
@@ -1,3 +1,7 @@+Version 0.12.2 released 09 Nov 2016++ * Allow pandoc 1.18, tagsoup 0.14, aeson, 1.x.+ Version 0.12.1.1 released 22 Mar 2016 * Allow pandoc 1.17 (Phil Ruffwind).
README.markdown view
@@ -31,12 +31,10 @@ * a library, "Network.Gitit", that makes it simple to include a gitit wiki in any happstack application -You can see a running demo at <http://gitit.johnmacfarlane.net>.- [git]: http://git.or.cz [darcs]: http://darcs.net [mercurial]: http://mercurial.selenic.com/-[pandoc]: http://johnmacfarlane.net/pandoc+[pandoc]: http://pandoc.org [Happstack]: http://happstack.com [highlighting-kate]: http://johnmacfarlane.net/highlighting-kate/ [texmath]: http://github.com/jgm/texmath/tree/master@@ -193,7 +191,7 @@ pandoc -v -[delimited code blocks]: http://johnmacfarlane.net/pandoc/README.html#delimited-code-blocks+[delimited code blocks]: http://pandoc.org/README.html#delimited-code-blocks Configuring and customizing gitit =================================
data/markup.DocBook view
@@ -2,7 +2,7 @@ <title>Markdown</title> <para> This wiki's pages are written in- <ulink url="http://johnmacfarlane.net/pandoc">pandoc</ulink>'s+ <ulink url="http://pandoc.org">pandoc</ulink>'s extended form of <ulink url="http://daringfireball.net/projects/markdown">markdown</ulink>. If you're not familiar with markdown, you should start by looking at@@ -11,7 +11,7 @@ "basics" page</ulink> and the <ulink url="http://daringfireball.net/projects/markdown/syntax">markdown syntax description</ulink>. Consult the- <ulink url="http://johnmacfarlane.net/pandoc/README.html">pandoc+ <ulink url="http://pandoc.org/README.html">pandoc User's Guide</ulink> for information about pandoc's syntax for footnotes, tables, description lists, and other elements not present in standard markdown.
data/markup.Markdown view
@@ -7,8 +7,8 @@ for footnotes, tables, description lists, and other elements not present in standard markdown. -[pandoc]: http://johnmacfarlane.net/pandoc-[pandoc User's Guide]: http://johnmacfarlane.net/pandoc/README.html+[pandoc]: http://pandoc.org+[pandoc User's Guide]: http://pandoc.org/README.html [markdown]: http://daringfireball.net/projects/markdown [markdown "basics" page]: http://daringfireball.net/projects/markdown/basics [markdown syntax description]: http://daringfireball.net/projects/markdown/syntax
data/markup.Org view
@@ -1,14 +1,14 @@ * Markdown This wiki's pages are written in-[[http://johnmacfarlane.net/pandoc][pandoc]]'s extended form of+[[http://pandoc.org][pandoc]]'s extended form of [[http://daringfireball.net/projects/markdown][markdown]]. If you're not familiar with markdown, you should start by looking at the [[http://daringfireball.net/projects/markdown/basics][markdown "basics" page]] and the [[http://daringfireball.net/projects/markdown/syntax][markdown syntax description]]. Consult the-[[http://johnmacfarlane.net/pandoc/README.html][pandoc User's Guide]]+[[http://pandoc.org/README.html][pandoc User's Guide]] for information about pandoc's syntax for footnotes, tables, description lists, and other elements not present in standard markdown.
data/markup.Textile view
@@ -1,6 +1,6 @@ h1(#markdown). Markdown -This wiki's pages are written in "pandoc":http://johnmacfarlane.net/pandoc's extended form of "markdown":http://daringfireball.net/projects/markdown. If you're not familiar with markdown, you should start by looking at the "markdown "basics" page":http://daringfireball.net/projects/markdown/basics and the "markdown syntax description":http://daringfireball.net/projects/markdown/syntax. Consult the "pandoc User's Guide":http://johnmacfarlane.net/pandoc/README.html for information about pandoc's syntax for footnotes, tables, description lists, and other elements not present in standard markdown.+This wiki's pages are written in "pandoc":http://pandoc.org's extended form of "markdown":http://daringfireball.net/projects/markdown. If you're not familiar with markdown, you should start by looking at the "markdown "basics" page":http://daringfireball.net/projects/markdown/basics and the "markdown syntax description":http://daringfireball.net/projects/markdown/syntax. Consult the "pandoc User's Guide":http://pandoc.org/README.html for information about pandoc's syntax for footnotes, tables, description lists, and other elements not present in standard markdown. Markdown is pretty intuitive, since it is based on email conventions. Here are some examples to get you started:
data/markupHelp/HTML view
@@ -46,5 +46,5 @@ ~~~~~~~~ For more: [xhtml tutorial](http://www.w3schools.com/Xhtml/),-[pandoc](http://johnmacfarlane.net/pandoc/README.html).+[pandoc](http://pandoc.org/README.html).
data/markupHelp/LaTeX view
@@ -50,5 +50,5 @@ For more: [LaTeX], [pandoc]. [LaTeX]: http://www.latex-project.org/-[pandoc]: http://johnmacfarlane.net/pandoc/README.html+[pandoc]: http://pandoc.org/README.html
data/markupHelp/LaTeX+LHS view
@@ -56,5 +56,5 @@ For more: [LaTeX], [pandoc]. [LaTeX]: http://www.latex-project.org/-[pandoc]: http://johnmacfarlane.net/pandoc/README.html+[pandoc]: http://pandoc.org/README.html
data/markupHelp/Markdown view
@@ -15,7 +15,7 @@ Links: [external](http://google.com), [Wiki Link](),-,+, [to heading](#section-heading). Indented code block:@@ -48,5 +48,5 @@ ~~~~~~~~ For more: [markdown syntax](http://daringfireball.net/projects/markdown),-[pandoc extensions](http://johnmacfarlane.net/pandoc/README.html).+[pandoc extensions](http://pandoc.org/README.html).
data/markupHelp/Markdown+LHS view
@@ -23,7 +23,7 @@ Links: [external](http://google.com), [Wiki Link](),-,+, [to heading](#section-heading). Indented code block:@@ -55,5 +55,5 @@ ~~~~~~~~ For more: [markdown syntax](http://daringfireball.net/projects/markdown),-[pandoc extensions](http://johnmacfarlane.net/pandoc/README.html).+[pandoc extensions](http://pandoc.org/README.html).
data/markupHelp/Org view
@@ -11,7 +11,7 @@ #+END_QUOTE Links: [[http://google.com][external]], [[][Wiki Link]],- [[/img/gitit-banner.png]], [[#section-heading][to heading]].+ [[/img/logo.png]], [[#section-heading][to heading]]. Indented code block:
data/markupHelp/RST view
@@ -16,7 +16,7 @@ `heading <#subsection>`_. .. |image| image::- /img/gitit-banner.png+ /img/logo.png ::
data/markupHelp/RST+LHS view
@@ -17,7 +17,7 @@ `heading <#subsection>`_. .. |image| image::- /img/gitit-banner.png+ /img/logo.png ::
data/templates/content.st view
@@ -1,6 +1,6 @@ <div id="content"> $if(revision)$- <h2 class="revision">Revision $revision$</h2>+ <h2 class="revision">Revision $revision$ (click the page title to view the current version)</h2> $endif$ <h1 class="pageTitle"><a href="$base$$pageUrl$">$pagetitle$</a></h1> $if(messages)$
gitit.cabal view
@@ -1,5 +1,5 @@ name: gitit-version: 0.12.1.1+version: 0.12.2 Cabal-version: >= 1.8 build-type: Simple synopsis: Wiki using happstack, git or darcs, and pandoc.@@ -139,8 +139,8 @@ directory, mtl, old-time,- pandoc >= 1.12.4 && < 1.18,- pandoc-types >= 1.12.3 && < 1.17,+ pandoc >= 1.12.4 && < 1.19,+ pandoc-types >= 1.12.3 && < 1.18, highlighting-kate >= 0.5.0.1 && < 0.7, bytestring, text,@@ -162,15 +162,15 @@ ConfigFile >= 1 && < 1.2, feed >= 0.3.6 && < 0.4, xss-sanitize >= 0.3 && < 0.4,- tagsoup >= 0.13 && < 0.14,+ tagsoup >= 0.13 && < 0.15, blaze-html >= 0.4 && < 0.9, json >= 0.4 && < 0.10, uri >= 0.1 && < 0.2, split, hoauth2 >= 0.4.2 && < 0.6,- http-conduit >= 2.1.4 && < 2.2,- http-client-tls >= 0.2.2 && < 0.3,- aeson >= 0.7 && < 0.12,+ http-conduit >= 2.1.4 && < 2.3,+ http-client-tls >= 0.2.2 && < 0.4,+ aeson >= 0.7 && < 1.1, uuid >= 1.3 && < 1.4 if impl(ghc >= 6.10) build-depends: base >= 4, syb@@ -187,7 +187,7 @@ ghc-options: -Wall -fno-warn-unused-do-bind else ghc-options: -Wall- ghc-prof-options: -fprof-auto-exported -rtsopts+ ghc-prof-options: -fprof-auto-exported Executable gitit hs-source-dirs: .
src/Network/Gitit/Config.hs view
@@ -157,6 +157,9 @@ liftIO $ logM "gitit" WARNING "rpx-domain is not set" ghConfig <- extractGithubConfig cp + when (null cfUserFile) $+ liftIO $ logM "gitit" ERROR "user-file is empty"+ return Config{ repositoryPath = cfRepositoryPath , repositoryType = repotype'
src/Network/Gitit/Handlers.hs view
@@ -537,7 +537,7 @@ , br , label ! [thefor "logMsg"] << "Description of changes:" , br- , textfield "logMsg" ! (readonly ++ [value logMsg])+ , textfield "logMsg" ! (readonly ++ [value (logMsg `orIfNull` defaultSummary cfg) ]) , submit "update" "Save" , primHtmlChar "nbsp" , submit "cancel" "Discard"
src/Network/Gitit/Page.hs view
@@ -172,7 +172,7 @@ E.catch (do fl <- B.hGetLine h if dashline fl then do -- get rest of metadata- rest <- hGetLinesTill h dotline+ rest <- hGetLinesTill h dotOrDashline let (md,_) = parseMetadata $ unlines $ "---":rest return $ splitCategories $ fromMaybe "" $ lookup "categories" md@@ -185,9 +185,10 @@ ('-':'-':'-':xs) | all (==' ') xs -> True _ -> False -dotline :: B.ByteString -> Bool-dotline x =+dotOrDashline :: B.ByteString -> Bool+dotOrDashline x = case BC.unpack x of+ ('-':'-':'-':xs) | all (==' ') xs -> True ('.':'.':'.':xs) | all (==' ') xs -> True _ -> False
src/Network/Gitit/State.hs view
@@ -21,6 +21,7 @@ module Network.Gitit.State where +import qualified Control.Exception as E import qualified Data.Map as M import System.Random (randomRIO) import Data.Digest.Pure.SHA (sha512, showDigest)@@ -100,8 +101,12 @@ writeUserFile :: Config -> IO () writeUserFile conf = do usrs <- queryGititState users- writeFile (userFile conf) $+ E.handle handleWriteError $ writeFile (userFile conf) $ "[" ++ intercalate "\n," (map show $ M.toList usrs) ++ "\n]"+ where handleWriteError :: E.SomeException -> IO ()+ handleWriteError e = logM "gitit" ERROR $+ "Error writing user file " ++ show (userFile conf) +++ "\n" ++ show e getUser :: String -> GititServerPart (Maybe User) getUser uname = liftM (M.lookup uname) $ queryGititState users