bird 0.0.18 → 0.0.19
raw patch · 3 files changed
+18/−8 lines, 3 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Bird.Translator: fromBirdReply :: (BirdReplyTranslator a) => Reply -> a
+ Bird.Translator: fromBirdReply :: BirdReplyTranslator a => Reply -> a
- Bird.Translator: toBirdRequest :: (BirdRequestTranslator a) => a -> Request
+ Bird.Translator: toBirdRequest :: BirdRequestTranslator a => a -> Request
- Bird.Translator.Hack: fromBirdReply :: (BirdReplyTranslator a) => Reply -> a
+ Bird.Translator.Hack: fromBirdReply :: BirdReplyTranslator a => Reply -> a
- Bird.Translator.Hack: toBirdRequest :: (BirdRequestTranslator a) => a -> Request
+ Bird.Translator.Hack: toBirdRequest :: BirdRequestTranslator a => a -> Request
Files
- bin/bird.hs +16/−6
- bird.cabal +1/−1
- readme.markdown +1/−1
bin/bird.hs view
@@ -30,6 +30,11 @@ appModuleName <- return $ head . reverse $ split '/' appModuleNamePath system $ "./" ++ appModuleName ++ "App" return ()+ ["fly", port] -> do+ appModuleNamePath <- getCurrentDirectory+ appModuleName <- return $ head . reverse $ split '/' appModuleNamePath+ system $ "./" ++ appModuleName ++ "App " ++ port+ return () ["hatch", appName] -> createBirdApp appName (action:_) -> do putStrLn $ "Unrecognized action: " ++ (show action) ++ "\n"@@ -47,9 +52,9 @@ printHelp = do putStrLn $ "Usage: bird action [options]\n\n" ++ " Actions:\n" ++- " hatch -> create a new Bird app, takes the name as an argument, for example `bird hatch StarWars`\n" ++- " nest -> compile your Bird app\n" ++- " fly -> expose your Bird app to the world (on port 3000)\n"+ " hatch -> create a new Bird app, takes the name as an argument, for example `bird hatch StarWars`\n" +++ " nest -> compile your Bird app\n" +++ " fly [port] -> expose your Bird app to the world (port 3000 by default)\n" appModulePrelude appModuleName = "--This file is generated by bird. It will be overwritten the next time you run 'bird nest'. Edit at your own peril.\n" ++@@ -74,6 +79,7 @@ "config = def\n" mainFile a =+ "import System.Environment (getArgs)\n" ++ "import Hack\n" ++ "import qualified Hack as Hack\n" ++ "import Hack.Handler.Happstack\n" ++@@ -102,10 +108,14 @@ " Bird.POST -> post $ path r\n" ++ " Bird.PUT -> put $ path r\n" ++ " Bird.DELETE -> delete $ path r\n\n" ++-+ + "printBirdFlight port = putStrLn $ \"A bird was just spotted in flight at http://localhost:\" ++ port\n\n" +++ "main = do\n" ++- " putStrLn \"A bird was just spotted in flight at http://localhost:3000\"\n" ++- " run app\n"+ " args <- getArgs\n" +++ " case args of \n" +++ " [birdPort] -> printBirdFlight birdPort >> runWithConfig (def { port = read birdPort :: Int }) app\n" +++ " [] -> printBirdFlight \"3000\" >> run app\n" extractFunction :: String -> [String] -> [String] extractFunction f program = (concat (findAll f program)) ++ [(f ++ " _ = status 404")]
bird.cabal view
@@ -1,5 +1,5 @@ Name: bird-Version: 0.0.18+Version: 0.0.19 Build-type: Simple Synopsis: A simple, sinatra-inspired web framework. Description: Bird is a hack-compatible framework for simple websites.
readme.markdown view
@@ -134,7 +134,7 @@ This project is *still* in its infancy. Coming features: -* post/put/delete http param processing+* support for multipart forms submissions * helpers for popular html generation solutions (Hamlet, HStringTemplate, HAXML, BlazeHTML, etc.) * WAI support * static asset serving