bird 0.0.12 → 0.0.13
raw patch · 3 files changed
+6/−12 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- bin/bird.hs +4/−10
- bird.cabal +1/−1
- readme.markdown +1/−1
bin/bird.hs view
@@ -15,28 +15,22 @@ appModuleName <- return $ head . reverse $ split '/' appModuleNamePath partialRouteFile <- readFile $ appModuleName ++ ".bird.hs" writeFile (appModuleName ++ ".hs") ((appModulePrelude appModuleName)++ "\n" ++ partialRouteFile ++ "\n" ++ appModuleEpilogue)- readProcess "ghc" ["--make", "-O2", "Main.hs"] ""+ system "ghc --make -O2 Main.hs" files <- getDirectoryContents appModuleNamePath- return $ map cleanGHC files+ system $ "rm *.o *.hi " ++ appModuleName ++ ".hs" renameFile "Main" appModuleName return () "fly" -> do appModuleNamePath <- getCurrentDirectory appModuleName <- return $ head . reverse $ split '/' appModuleNamePath - readProcess ("./" ++ appModuleName) [] ""+ system $ "./" ++ appModuleName return () appName -> createBirdApp appName -cleanGHC file = - if any (`isSuffixOf` file) [".hi", ".o"]- then removeFile file- else return ()- 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" ++ "module " ++ appModuleName ++ " where\n" ++ "import Bird\n\n" --- ++ "-- get, post, put, delete :: Path -> BirdResponder ()\n"- appModuleEpilogue = "get _ = status 404\n" ++
bird.cabal view
@@ -1,5 +1,5 @@ Name: bird-Version: 0.0.12+Version: 0.0.13 Build-type: Simple Synopsis: A simple, sinatra-inspired web framework. Description: Bird is a hack-compatible framework for simple websites.
readme.markdown view
@@ -94,7 +94,7 @@ -- ex: for the request GET /droids?name=c3po, -- then `p <- param "name"' would bind the value `Just "c3po"' to the variable "p" - body :: String -> BirdRouter ()+ body :: String -> BirdResponder () -- takes a string and sets the Http Response body to whatever the string contained. status :: Integer -> BirdResponder ()