packages feed

gitit 0.8 → 0.8.0.1

raw patch · 3 files changed

+30/−18 lines, 3 filesdep ~ConfigFiledep ~SHAdep ~happstack-serverPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: ConfigFile, SHA, happstack-server, happstack-util, network

API changes (from Hackage documentation)

Files

CHANGES view
@@ -1,3 +1,10 @@+Version 0.8.0.1 released 07 Jun 2011++* Fixed file upload problem with recent versions of directory+  package. (Thanks to Oliver Braun.)++* Relaxed some version upper bounds.+ Version 0.8 released 13 May 2011  * Uses happstack 6.
Network/Gitit/Handlers.hs view
@@ -81,12 +81,7 @@ import Data.Time (getCurrentTime, addUTCTime) import Data.FileStore import System.Log.Logger (logM, Priority(..))-import System.Directory (canonicalizePath) --- Returns True if f is inside d.-isInsideDir :: FilePath -> FilePath -> IO Bool-isInsideDir f d = liftM2 isPrefixOf (canonicalizePath d) (canonicalizePath f)- handleAny :: Handler handleAny = uriRest $ \uri ->   let path' = uriPath uri@@ -185,7 +180,9 @@ uploadFile = withData $ \(params :: Params) -> do   let origPath = pFilename params   let filePath = pFilePath params-  let wikiname = pWikiname params `orIfNull` takeFileName origPath+  let wikiname = normalise+                 $ dropWhile (=='/')+                 $ pWikiname params `orIfNull` takeFileName origPath   let logMsg = pLogMsg params   cfg <- getConfig   mbUser <- getLoggedInUser@@ -198,14 +195,14 @@                       if e == NotFound                          then return False                          else throwIO e >> return True-  inStaticDir <- liftIO $-                  (repositoryPath cfg </> wikiname) `isInsideDir` staticDir cfg-  inTemplatesDir <- liftIO $-                  (repositoryPath cfg </> wikiname) `isInsideDir` templatesDir cfg+  let inStaticDir = staticDir cfg `isPrefixOf` (repositoryPath cfg </> wikiname)+  let inTemplatesDir = templatesDir cfg `isPrefixOf` (repositoryPath cfg </> wikiname)+  let dirs' = splitDirectories $ takeDirectory wikiname   let imageExtensions = [".png", ".jpg", ".gif"]   let errors = validate                  [ (null . filter (not . isSpace) $ logMsg,                     "Description cannot be empty.")+                 , (".." `elem` dirs', "Wikiname cannot contain '..'")                  , (null origPath, "File not found.")                  , (inStaticDir,  "Destination is inside static directory.")                  , (inTemplatesDir,  "Destination is inside templates directory.")
gitit.cabal view
@@ -1,6 +1,6 @@ name:                gitit-version:             0.8-Cabal-version:       >= 1.2+version:             0.8.0.1+Cabal-version:       >= 1.6 build-type:          Simple synopsis:            Wiki using happstack, git or darcs, and pandoc. description:         Gitit is a wiki backed by a git, darcs, or mercurial@@ -80,6 +80,10 @@                      plugins/Subst.hs,                      CHANGES, README.markdown, YUI-LICENSE, BLUETRIP-LICENSE, TANGOICONS +Source-repository head+  type:          git+  location:      git://github.com/jgm/gitit.git+ Flag plugins   description:       Compile in support for plugins.  This will increase the size of                      the executable and the memory it uses, so those who will not need@@ -124,31 +128,35 @@                      directory,                      mtl,                      cgi,-                     network,                      old-time,                      highlighting-kate >= 0.2.7.1,                      bytestring,                      random,+                     network >= 2.1.0.0 && < 2.4,                      utf8-string >= 0.3 && < 0.4,-                     SHA > 1 && < 1.5, HTTP >= 4000.0 && < 4000.2,+                     SHA > 1 && < 1.6,+                     HTTP >= 4000.0 && < 4000.2,                      HStringTemplate >= 0.6 && < 0.7,-                     network >= 2.1.0.0 && < 2.4,                      old-locale >= 1,                      time >= 1.1 && < 1.3,                      recaptcha >= 0.1,                      filestore >= 0.4.0.2 && < 0.5,                      zlib >= 0.5 && < 0.6,                      url >= 2.1 && < 2.2,-                     happstack-server >= 6.0 && < 6.1,-                     happstack-util >= 6.0 && < 6.1,+                     happstack-server >= 6.0 && < 6.2,+                     happstack-util >= 6.0 && < 6.2,                      xml >= 1.3.5,                      hslogger >= 1 && < 1.2,-                     ConfigFile >= 1 && < 1.1,+                     ConfigFile >= 1 && < 1.2,                      feed >= 0.3.6 && < 0.4,                      xss-sanitize >= 0.2 && < 0.3,                      json >= 0.4 && < 0.5   if impl(ghc >= 6.10)     build-depends:   base >= 4, syb+  if impl(ghc >= 7.0.3)+    -- without this, 'cabal install' tries to install an older+    -- version of network; I'm not sure why:+    build-depends:   network >= 2.3 && < 2.4   if flag(plugins)     build-depends:   ghc, ghc-paths     cpp-options:     -D_PLUGINS