packages feed

sws 0.3.1.0 → 0.3.1.1

raw patch · 4 files changed

+28/−4 lines, 4 filesdep ~base

Dependency ranges changed: base

Files

CHANGELOG.md view
@@ -1,6 +1,10 @@ # Change Log All notable changes to this project will be documented in this file. +## 0.3.1.1 - 2015-04-17+### Changed+- Upper bound bump to support GHC 7.10.+ ## 0.3.1.0 - 2015-01-07 ### Added - Added Public mode.
Main.hs view
@@ -18,6 +18,7 @@ import System.Environment ( getArgs ) -- base import System.FilePath ( (</>) ) -- filepath import System.IO ( putStrLn, hPutStrLn, hPutStr, stderr ) -- base+import System.IO.Error ( catchIOError ) -- base import Network.HTTP.Types.Status ( status200, status403, status404 ) -- http-types import Network.HTTP.Types.Method ( methodPost ) -- http-types import Network.Wai ( Application, Middleware, requestMethod, rawPathInfo, responseLBS ) -- wai@@ -60,7 +61,7 @@ -- Not future things: CGI etc of any sort, "extensibility" -- vERSION :: String-vERSION = "0.3.1.0"+vERSION = "0.3.1.1"  -- STUN code @@ -186,6 +187,7 @@         k (responseLBS status200 [] html)   where allowWrites = optAllowUploads opts         fileDetails label f = liftA2 (renderFile label f) (doesDirectoryExist f) (getModificationTime f)+                                `catchIOError` \_ -> return (fromString "")         renderFile label path isDirectory modTime = LBS.concat $ map fromString [             "<tr><td>", if isDirectory then "d" else "f", "</td><td><a href=\"/", path, "\">", label, "</a></td><td>", show modTime, "</td></tr>"           ]
README.md view
@@ -26,6 +26,24 @@ simple testing by running "`sws -d`".  (Admittedly, using a file URI will probably work pretty well too, though maybe not so much for mocked POST requests...)  You want to show a friend.  Just make that "`sws`". +### Use-case 3: Instant read-only Git hosting++```bash+git clone --bare /path/to/myrepo ~/public/myrepo.git+cd ~/public/myrepo.git+mv hooks/post-update.sample hooks/post-update+chmod a+x hooks/post-update+git update-server-info+sws --no-compress -H example.com ~/public/+```++Elsewhere:+```bash+git -c http.sslVerify=false clone https://example.com:3000/myrepo.git+```++This would be even more instant with darcs.+ What it isn't ------------- 
sws.cabal view
@@ -10,7 +10,7 @@ -- PVP summary:      +-+------- breaking API changes --                   | | +----- non-breaking API additions --                   | | | +--- code changes with no API change-version:             0.3.1.0+version:             0.3.1.1  -- A short (one-line) description of the package. synopsis:            A simple web server for serving directories, similar to weborf.@@ -36,7 +36,7 @@ maintainer:          derek.a.elkins@gmail.com  -- A copyright notice.-copyright:           Copyright (c) 2014 Derek Elkins+copyright:           Copyright (c) 2014-2015 Derek Elkins  category:            Web @@ -68,7 +68,7 @@   build-depends:            asn1-types(==0.3.*),     asn1-encoding(==0.9.*),-    base >=4.6 && <4.8, +    base >=4.6 && <4.9,     bytestring(==0.10.*),      crypto-pubkey(==0.2.*),     crypto-random(==0.0.*),