bamboo 2009.4.50 → 2009.4.52
raw patch · 7 files changed
+30/−28 lines, 7 filesdep ~hackdep ~hack-contribPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: hack, hack-contrib
API changes (from Hackage documentation)
- Bamboo: bamboo :: MiddleWare
+ Bamboo: bamboo :: Middleware
Files
- bamboo.cabal +4/−4
- changelog.md +14/−0
- readme.md +7/−16
- src/Bamboo.hs +1/−1
- src/Bamboo/Controller/Application.hs +0/−1
- src/Bamboo/Helper/Env.hs +1/−0
- src/Bamboo/Helper/Helper.hs +3/−6
bamboo.cabal view
@@ -1,8 +1,8 @@ Name: bamboo-Version: 2009.4.50+Version: 2009.4.52 Build-type: Simple-Synopsis: A simple blog engine on Hack-Description: A simple blog engine on Hack+Synopsis: A simple blog middleware on hack+Description: A simple blog middleware on hack License: GPL License-file: LICENSE Author: Wang, Jinjing@@ -15,7 +15,7 @@ library ghc-options: -Wall -fno-warn-missing-signatures -fno-warn-name-shadowing -fno-warn-orphans -fno-warn-type-defaults- build-depends: base, cgi, network, haskell98, old-locale, old-time, time, unix, bytestring, template, base64-string, zlib, directory, ansi-wl-pprint, filepath, containers, process, mps >= 2008.11.6, parsedate >= 3000.0.0, rss >= 3000.0.1, xhtml, kibro >= 0.4.2, utf8-string >= 0.3.3, pandoc, parsec >= 2, MissingH, gravatar >= 0.3, data-default >= 0.2, hcheat >= 2008.11.6, hack >= 2009.4.30, hack-contrib >= 2009.4.50+ build-depends: base, cgi, network, haskell98, old-locale, old-time, time, unix, bytestring, template, base64-string, zlib, directory, ansi-wl-pprint, filepath, containers, process, mps >= 2008.11.6, parsedate >= 3000.0.0, rss >= 3000.0.1, xhtml, kibro >= 0.4.2, utf8-string >= 0.3.3, pandoc, parsec >= 2, MissingH, gravatar >= 0.3, data-default >= 0.2, hcheat >= 2008.11.6, hack >= 2009.4.52, hack-contrib >= 2009.4.52 hs-source-dirs: src/ exposed-modules: Bamboo
changelog.md view
@@ -1,3 +1,17 @@+2009.4.52+---------++### Fix++* Compatible with hack 4.52++2009.4.51+---------++### Fix++* use Content Length in new hack-contrib+ 2009.4.50 ---------
readme.md view
@@ -65,23 +65,13 @@ cabal install happy cabal install rss --reinstall- cabal install hack- cabal install hack-contrib cabal install bamboo -### Choose a hack handler--#### Hyena+### Pick a hack handler -##### install hyena+#### Happstack - cabal install network --reinstall- - git clone git://github.com/tibbe/hyena.git- cd hyena- cabal install- - cabal install hack-handler-hyena+ cabal install hack-handler-happstack ##### get a starter kit ( template ) @@ -98,16 +88,16 @@ module Main where import Bamboo- import Hack.Handler.Hyena+ import Hack.Handler.Happstack - import Hack.Utils+ import Hack.Contrib.Utils import Hack.Contrib.Middleware.ContentType import Hack.Contrib.Middleware.ContentSize import Hack.Contrib.Middleware.ShowExceptions import Hack.Contrib.Middleware.Static - import qualified Hack.Contrib.Head as H+ import qualified Hack.Contrib.Middleware.Head as H default_content_type = "text/plain; charset=UTF-8" @@ -134,6 +124,7 @@ app = use middleware_stack dummy_app main = run app+ ##### run
src/Bamboo.hs view
@@ -8,5 +8,5 @@ import Hack import Hack.Contrib.Middleware.RawRouter -bamboo :: MiddleWare+bamboo :: Middleware bamboo = route paths
src/Bamboo/Controller/Application.hs view
@@ -55,7 +55,6 @@ ] .map_fst ((G.root /) > ("^" ++)) - only_for ext x = if has_extension ext then x else const not_found
src/Bamboo/Helper/Env.hs view
@@ -40,3 +40,4 @@ import System.Directory import Data.Foldable (find) import Data.Default+
src/Bamboo/Helper/Helper.hs view
@@ -23,6 +23,7 @@ import Data.Default import System.Directory import Hack+import qualified Hack.Contrib.Request as Request import Hack.Contrib.Response import Hack.Contrib.Constants @@ -65,12 +66,8 @@ remove_trailing_slash s = if s.last.is '/' then s.init else s -params env = do- case env.query_string of- [] -> []- s -> s.formDecode .map_snd ( unescape_unicode_xml > b2u)--inputs = getInputs ^ map_snd (strip > unescape_unicode_xml > b2u)+params = Request.params > map_fst b2u > map_snd b2u+inputs = Request.inputs > map_fst b2u > map_snd b2u param_with_default s d env = env .get_param s .fromMaybe d input_with_default s d env = env .get_input s .fromMaybe d