packages feed

gitit 0.10.2 → 0.10.3

raw patch · 9 files changed

+44/−22 lines, 9 filesdep ~HStringTemplatedep ~blaze-htmldep ~pandocPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: HStringTemplate, blaze-html, pandoc

API changes (from Hackage documentation)

+ Network.Gitit.Interface: address :: Config -> String
+ Network.Gitit.Types: address :: Config -> String
- Network.Gitit.Interface: Config :: FilePath -> FileStoreType -> PageType -> MathMethod -> Bool -> Bool -> (Handler -> Handler) -> AuthenticationLevel -> Handler -> FilePath -> Int -> FilePath -> FilePath -> Priority -> FilePath -> [String] -> Bool -> Integer -> Integer -> Int -> Bool -> String -> [String] -> [String] -> String -> Maybe (String, [String]) -> Bool -> String -> String -> String -> String -> Bool -> Bool -> FilePath -> Map String String -> String -> String -> String -> Bool -> String -> Bool -> String -> Integer -> Integer -> Bool -> Maybe FilePath -> Bool -> Config
+ Network.Gitit.Interface: Config :: FilePath -> FileStoreType -> PageType -> MathMethod -> Bool -> Bool -> (Handler -> Handler) -> AuthenticationLevel -> Handler -> FilePath -> Int -> FilePath -> FilePath -> Priority -> FilePath -> [String] -> Bool -> Integer -> Integer -> String -> Int -> Bool -> String -> [String] -> [String] -> String -> Maybe (String, [String]) -> Bool -> String -> String -> String -> String -> Bool -> Bool -> FilePath -> Map String String -> String -> String -> String -> Bool -> String -> Bool -> String -> Integer -> Integer -> Bool -> Maybe FilePath -> Bool -> Config
- Network.Gitit.Types: Config :: FilePath -> FileStoreType -> PageType -> MathMethod -> Bool -> Bool -> (Handler -> Handler) -> AuthenticationLevel -> Handler -> FilePath -> Int -> FilePath -> FilePath -> Priority -> FilePath -> [String] -> Bool -> Integer -> Integer -> Int -> Bool -> String -> [String] -> [String] -> String -> Maybe (String, [String]) -> Bool -> String -> String -> String -> String -> Bool -> Bool -> FilePath -> Map String String -> String -> String -> String -> Bool -> String -> Bool -> String -> Integer -> Integer -> Bool -> Maybe FilePath -> Bool -> Config
+ Network.Gitit.Types: Config :: FilePath -> FileStoreType -> PageType -> MathMethod -> Bool -> Bool -> (Handler -> Handler) -> AuthenticationLevel -> Handler -> FilePath -> Int -> FilePath -> FilePath -> Priority -> FilePath -> [String] -> Bool -> Integer -> Integer -> String -> Int -> Bool -> String -> [String] -> [String] -> String -> Maybe (String, [String]) -> Bool -> String -> String -> String -> String -> Bool -> Bool -> FilePath -> Map String String -> String -> String -> String -> Bool -> String -> Bool -> String -> Integer -> Integer -> Bool -> Maybe FilePath -> Bool -> Config

Files

CHANGES view
@@ -1,3 +1,16 @@+Version 0.10.3 released 09 Mar 2013++*   Allow latest versions of pandoc, blaze-html, HStringTemplate.++*   Fixed duplicate ids in user box.++*   Added `mathjax-script` option, specifies the mathjax script to+    use. (Dmitry Gerasimov.)++*   Set focus on editedText on page load.  (Mathieu Larose.)++*   Added `address` config option.  (Matieu Larose.)+ Version 0.10.2 released 09 Feb 2013  *   Updated to work with pandoc 1.10.
Network/Gitit/Config.hs view
@@ -66,6 +66,7 @@       cfRepositoryPath <- get cp "DEFAULT" "repository-path"       cfDefaultPageType <- get cp "DEFAULT" "default-page-type"       cfMathMethod <- get cp "DEFAULT" "math"+      cfMathjaxScript <- get cp "DEFAULT" "mathjax-script"       cfShowLHSBirdTracks <- get cp "DEFAULT" "show-lhs-bird-tracks"       cfRequireAuthentication <- get cp "DEFAULT" "require-authentication"       cfAuthenticationMethod <- get cp "DEFAULT" "authentication-method"@@ -79,6 +80,7 @@       cfTableOfContents <- get cp "DEFAULT" "table-of-contents"       cfMaxUploadSize <- get cp "DEFAULT" "max-upload-size"       cfMaxPageSize <- get cp "DEFAULT" "max-page-size"+      cfAddress <- get cp "DEFAULT" "address"       cfPort <- get cp "DEFAULT" "port"       cfDebugMode <- get cp "DEFAULT" "debug-mode"       cfFrontPage <- get cp "DEFAULT" "front-page"@@ -131,7 +133,7 @@         , mathMethod           = case map toLower cfMathMethod of                                       "jsmath"   -> JsMathScript                                       "mathml"   -> MathML-                                      "mathjax"  -> MathJax "https://d3eoax9i5htok0.cloudfront.net/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"+                                      "mathjax"  -> MathJax cfMathjaxScript                                       "google"   -> WebTeX "http://chart.apis.google.com/chart?cht=tx&chl="                                       _          -> RawTeX         , defaultLHS           = lhs@@ -167,6 +169,7 @@         , tableOfContents      = cfTableOfContents         , maxUploadSize        = readSize "max-upload-size" cfMaxUploadSize         , maxPageSize          = readSize "max-page-size" cfMaxPageSize+        , address              = cfAddress         , portNumber           = readNumber "port" cfPort         , debugMode            = cfDebugMode         , frontPage            = cfFrontPage
Network/Gitit/Types.hs view
@@ -90,6 +90,8 @@   maxUploadSize        :: Integer,   -- | Max size of page uploads   maxPageSize          :: Integer,+  -- | IP address to bind to+  address              :: String,   -- | Port number to serve content on   portNumber           :: Int,   -- | Print debug info to the console?
data/default.conf view
@@ -1,5 +1,8 @@ # gitit wiki configuration file +address: 0.0.0.0+# sets the IP address on which the web server will listen.+ port: 5001 # sets the port on which the web server will run. @@ -72,6 +75,16 @@ # This is the most portable solution. If google is selected, the google chart # API is called to render the formula as an image. This requires a connection # to google, and might raise a technical or a privacy problem.++mathjax-script: https://d3eoax9i5htok0.cloudfront.net/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML+# specifies the path to MathJax rendering script.+# You might want to use your own MathJax script to render formulas without+# Internet connection or if you want to use some special LaTeX packages.+# Note: path specified there cannot be an absolute path to a script on your hdd, +# instead you should run your (local if you wish) HTTP server which will +# serve the MathJax.js script. You can easily (in four lines of code) serve+# MathJax.js using http://happstack.com/docs/crashcourse/FileServing.html+# Do not forget the "http://" prefix (e.g. http://localhost:1234/MathJax.js)  show-lhs-bird-tracks: no # specifies whether to show Haskell code blocks in "bird style",
data/static/js/preview.js view
@@ -24,5 +24,6 @@ }; $(document).ready(function(){     $("#previewButton").show();-  });+    $("#editedText").focus();+}); 
data/templates/getuser.st view
@@ -1,7 +1,7 @@ <script type="text/javascript"> /* <![CDATA[ */   \$.get("$base$/_user", {}, function(username, status) {-     \$("#username").text(username);+     \$("#logged_in_user").text(username);      if (username == "") {  // nobody logged in         \$("#logoutlink").hide();         \$("#loginlink").show();
data/templates/userbox.st view
@@ -5,5 +5,5 @@   </noscript>   &nbsp;   <a id="loginlink" class="login" href="$base$/_login">Login / Get an account</a>-  <a id="logoutlink" class="login" href="$base$/_logout">Logout <span id="username"></span></a>+  <a id="logoutlink" class="login" href="$base$/_logout">Logout <span id="logged_in_user"></span></a> </div>
gitit.cabal view
@@ -1,5 +1,5 @@ name:                gitit-version:             0.10.2+version:             0.10.3 Cabal-version:       >= 1.6 build-type:          Simple synopsis:            Wiki using happstack, git or darcs, and pandoc.@@ -117,7 +117,7 @@     exposed-modules: Network.Gitit.Interface     build-depends:   ghc, ghc-paths     cpp-options:     -D_PLUGINS-  build-depends:     base >= 3, pandoc >= 1.10.0.5 && < 1.11,+  build-depends:     base >= 3, pandoc >= 1.10.0.5 && < 1.12,                      pandoc-types >= 1.10 && < 1.11, filepath, safe   extensions:        CPP   if impl(ghc >= 6.12)@@ -134,7 +134,7 @@                      pretty,                      xhtml,                      containers,-                     pandoc >= 1.10.0.5 && < 1.11,+                     pandoc >= 1.10.0.5 && < 1.12,                      pandoc-types >= 1.10 && < 1.11,                      process,                      filepath,@@ -150,7 +150,7 @@                      utf8-string >= 0.3 && < 0.4,                      SHA > 1 && < 1.7,                      HTTP >= 4000.0 && < 4000.3,-                     HStringTemplate >= 0.6 && < 0.7,+                     HStringTemplate >= 0.6 && < 0.8,                      old-locale >= 1,                      time >= 1.1 && < 1.5,                      recaptcha >= 0.1,@@ -165,7 +165,7 @@                      feed >= 0.3.6 && < 0.4,                      xss-sanitize >= 0.3 && < 0.4,                      tagsoup >= 0.12 && < 0.13,-                     blaze-html >= 0.4 && < 0.6,+                     blaze-html >= 0.4 && < 0.7,                      json >= 0.4 && < 0.8   if impl(ghc >= 6.10)     build-depends:   base >= 4, syb
gitit.hs view
@@ -34,7 +34,6 @@ import System.IO (stderr) import System.Console.GetOpt import Network.Socket hiding (Debug)-import Network.URI import Data.Version (showVersion) import qualified Data.ByteString.Char8 as B import Data.ByteString.UTF8 (fromString)@@ -97,7 +96,7 @@   -- open the requested interface   sock <- socket AF_INET Stream defaultProtocol   setSocketOption sock ReuseAddr 1-  device <- inet_addr (getListenOrDefault opts)+  device <- inet_addr (address conf)   bindSocket sock (SockAddrInet (toEnum (portNumber conf)) device)   listen sock 10 @@ -128,7 +127,7 @@         "Print version information"    , Option ['p'] ["port"] (ReqArg (Right . Port . read) "PORT")         "Specify port"-   , Option ['l'] ["listen"] (ReqArg (Right . Listen . checkListen) "INTERFACE")+   , Option ['l'] ["listen"] (ReqArg (Right . Listen) "INTERFACE")         "Specify IP address to listen on"    , Option [] ["print-default-config"] (NoArg (Left PrintDefaultConfig))         "Print default configuration"@@ -138,16 +137,6 @@         "Specify configuration file"    ] -checkListen :: String -> String-checkListen l | isIPv6address l = l-              | isIPv4address l = l-              | otherwise       = error "Gitit.checkListen: Not a valid interface name"--getListenOrDefault :: [ConfigOpt] -> String-getListenOrDefault [] = "0.0.0.0"-getListenOrDefault ((Listen l):_) = l-getListenOrDefault (_:os) = getListenOrDefault os- parseArgs :: [String] -> IO [Opt] parseArgs argv = do   case getOpt Permute flags argv of@@ -175,6 +164,7 @@ handleFlag :: Config -> ConfigOpt -> Config handleFlag conf Debug = conf{ debugMode = True, logLevel = DEBUG } handleFlag conf (Port p) = conf { portNumber = p }+handleFlag conf (Listen l) = conf { address = l } handleFlag conf _ = conf  putErr :: ExitCode -> String -> IO a