[Snap Framework] snap-static-pages branch, master, updated. eb35016130066c220080dd8d318e95a9ee85ebae

noreply at snapframework.com noreply at snapframework.com
Mon Jun 13 11:28:49 CDT 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "snap-static-pages".

The branch, master has been updated
       via  eb35016130066c220080dd8d318e95a9ee85ebae (commit)
      from  f4b3e3e8404d7a65c4338e7175dc459a38d6a2ed (commit)


Summary of changes:
 src/Snap/StaticPages.hs |   51 -----------------------------------------------
 1 files changed, 0 insertions(+), 51 deletions(-)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit eb35016130066c220080dd8d318e95a9ee85ebae
Author: Gregory Collins <greg at gregorycollins.net>
Date:   Mon Jun 13 12:28:45 2011 -0400

    Remove commented-out code

diff --git a/src/Snap/StaticPages.hs b/src/Snap/StaticPages.hs
index 86ca4a4..a652f42 100644
--- a/src/Snap/StaticPages.hs
+++ b/src/Snap/StaticPages.hs
@@ -201,54 +201,3 @@ readConfig fp = do
 
     resToVal (Error e)   = error e
     resToVal (Success x) = x
-
-
-{-
-readConfig :: FilePath -> IO (Atom.Feed, String, String, ExcludeList)
-readConfig fp = do
-    cp <- parseConfig fp
-
-    either (throwIO . StaticPagesException . show)
-           return
-           (mkFeed cp)
-  where
-    ensurePrefix :: Char -> String -> String
-    ensurePrefix p s = if [p] `isPrefixOf` s then s else p:s
-
-    stripSuffix :: Char -> String -> String
-    stripSuffix x s = if [x] `isSuffixOf` s then init s else s
-
-
-    mkFeed :: Either Cfg.CPError Cfg.ConfigParser
-           -> Either Cfg.CPError (Atom.Feed, String, String, ExcludeList)
-    mkFeed cfg = do
-      cp       <- cfg
-      title    <- Cfg.get cp "feed" "title"
-      authors  <- Cfg.get cp "feed" "authors"
-      baseURL' <- Cfg.get cp "default" "baseurl"
-      siteURL' <- Cfg.get cp "default" "siteurl"
-
-      let icon = getM cp "feed" "icon"
-      let skip = maybe EL.empty
-                       (EL.fromPathList . B.pack)
-                       (getM cp "feed" "skipurls")
-
-      let siteURL = stripSuffix '/' siteURL'
-      let baseURL = stripSuffix '/' $ ensurePrefix '/' baseURL'
-      let feedURL = (siteURL ++ baseURL)
-
-      let feed = Atom.nullFeed feedURL
-                               (Atom.TextString title)
-                               ""
-
-      let feed' = feed { Atom.feedAuthors = parsePersons authors
-                       , Atom.feedIcon    = icon
-                       , Atom.feedLinks   = [ Atom.nullLink feedURL ]
-                       }
-
-      return (feed', siteURL, baseURL, skip)
-
-
-parseConfig :: FilePath -> IO (Either Cfg.CPError Cfg.ConfigParser)
-parseConfig = Cfg.readfile Cfg.emptyCP
--}
-----------------------------------------------------------------------


hooks/post-receive
-- 
snap-static-pages


More information about the Snap mailing list