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".

The branch, master has been updated
       via  a478c11273a44f709c3a4f8d888caaab131c9489 (commit)
      from  6734957ed4822ac4c6086976db1611009b0fc797 (commit)


Summary of changes:
 project_template/barebones/foo.cabal |    4 ++--
 project_template/default/foo.cabal   |    6 +++---
 snap.cabal                           |    1 +
 src/Snap/Extension.hs                |    8 +++++---
 4 files changed, 11 insertions(+), 8 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 a478c11273a44f709c3a4f8d888caaab131c9489
Author: Gregory Collins <[email protected]>
Date:   Sat Jan 8 18:22:02 2011 +0100

    Update to work with snap-core 0.4 and blaze-builder

diff --git a/project_template/barebones/foo.cabal 
b/project_template/barebones/foo.cabal
index 75f4c00..dbceebc 100644
--- a/project_template/barebones/foo.cabal
+++ b/project_template/barebones/foo.cabal
@@ -19,8 +19,8 @@ Executable projname
     bytestring >= 0.9.1 && < 0.10,
     MonadCatchIO-transformers >= 0.2.1 && < 0.3,
     mtl >= 2 && < 3,
-    snap-core >= 0.3 && <0.4,
-    snap-server >= 0.3 && <0.4
+    snap-core == 0.4.*,
+    snap-server == 0.4.*
 
   if impl(ghc >= 6.12.0)
     ghc-options: -threaded -Wall -fwarn-tabs -funbox-strict-fields -O2
diff --git a/project_template/default/foo.cabal 
b/project_template/default/foo.cabal
index e4ecb0b..d8bf44c 100644
--- a/project_template/default/foo.cabal
+++ b/project_template/default/foo.cabal
@@ -29,9 +29,9 @@ Executable projname
     hexpat >= 0.19 && < 0.20,
     MonadCatchIO-transformers >= 0.2.1 && < 0.3,
     mtl >= 2 && < 3,
-    snap >= 0.3 && < 0.4,
-    snap-core >= 0.3 && < 0.4,
-    snap-server >= 0.3 && <0.4,
+    snap == 0.4.*,
+    snap-core == 0.4.*,
+    snap-server == 0.4.*,
     text >= 0.11 && < 0.12,
     time >= 1.1 && < 1.3
 
diff --git a/snap.cabal b/snap.cabal
index 0c2dc89..0c8ebd4 100644
--- a/snap.cabal
+++ b/snap.cabal
@@ -48,6 +48,7 @@ Library
 
   build-depends:
     base >= 4 && < 5,
+    blaze-builder >= 0.2.1.4 && <0.3,
     bytestring >= 0.9.1 && < 0.10,
     directory >= 1.0 && < 1.2,
     enumerator == 0.4.*,
diff --git a/src/Snap/Extension.hs b/src/Snap/Extension.hs
index e58a9dc..749af01 100644
--- a/src/Snap/Extension.hs
+++ b/src/Snap/Extension.hs
@@ -31,6 +31,7 @@ module Snap.Extension
   , nullReloadHandler
   ) where
 
+import           Blaze.ByteString.Builder
 import           Control.Applicative
 import           Control.Exception (SomeException)
 import           Control.Monad
@@ -43,7 +44,7 @@ import           Data.Monoid
 import qualified Data.Text as T
 import qualified Data.Text.Encoding as T
 import           Prelude hiding (catch, init)
-import           Snap.Iteratee (enumBS, (>==>))
+import           Snap.Iteratee (enumBuilder, (>==>))
 import           Snap.Types
 import           System.IO
 
@@ -465,11 +466,12 @@ defaultReloadHandler :: MonadSnap m
 defaultReloadHandler ioms = failIfNotLocal $ do
     ms <- liftIO $ ioms
     let showE e       = mappend "Error: "  $ toUTF8 $ show e
-        format (n, m) = mconcat [n, ": ", maybe "Sucess" showE m, "\n"]
+        format (n, m) = mconcat [n, ": ", maybe "Success" showE m, "\n"]
         msg           = mconcat $ map format ms
     finishWith $ setContentType "text/plain; charset=utf-8"
         $ setContentLength (fromIntegral $ B.length msg)
-        $ modifyResponseBody (>==> enumBS msg) emptyResponse
+        $ modifyResponseBody (>==> enumBuilder (fromByteString msg))
+                             emptyResponse
   where
     failIfNotLocal m = do
         rip <- liftM rqRemoteAddr getRequest
-----------------------------------------------------------------------


hooks/post-receive
-- 
snap
_______________________________________________
Snap mailing list
[email protected]
http://mailman-mail5.webfaction.com/listinfo/snap

Reply via email to