packages feed

yackage 0.2.1 → 0.3.0

raw patch · 2 files changed

+23/−30 lines, 2 filesdep +blaze-htmldep ~http-enumeratordep ~waidep ~warp

Dependencies added: blaze-html

Dependency ranges changed: http-enumerator, wai, warp, yesod-core, yesod-form

Files

yackage.cabal view
@@ -1,5 +1,5 @@ Name:                yackage-Version:             0.2.1+Version:             0.3.0 Synopsis:            Personal Hackage replacement for testing new packages. Description:     This package installs a yackage executable that runs a simplistic hackage-like server. It allows you to upload packages produced via cabal sdist and install them via cabal. The trick is to add the yackage repository to your cabal config file, with a line such as:@@ -15,43 +15,37 @@ Build-type:          Simple Cabal-version:       >=1.6 -flag yackage-  default: True-  description: Whether to build the yackage program itself.- flag upload   default: True   description: Whether to build the yackage-upload helper program.  Executable yackage   Main-is:             yackage.hs-  if flag(yackage)-      Build-depends:       base >= 4 && < 5-                         , yesod-core >= 0.8 && < 0.9-                         , warp-                         , Cabal-                         , bytestring-                         , text-                         , zlib-                         , tar-                         , containers-                         , directory-                         , data-object-                         , data-object-yaml-                         , cmdargs-                         , wai-                         , transformers-                         , hamlet-                         , yesod-form >= 0.2 && < 0.3-                         , http-types >= 0.6 && < 0.7-  else-    Buildable: False+  Build-depends:       base >= 4 && < 5+                     , yesod-core >= 0.9 && < 0.10+                     , warp < 1.0+                     , Cabal+                     , bytestring+                     , text+                     , zlib+                     , tar+                     , containers+                     , directory+                     , data-object+                     , data-object-yaml+                     , cmdargs+                     , wai < 1.0+                     , transformers+                     , hamlet+                     , yesod-form >= 0.3 && < 0.4+                     , http-types >= 0.6 && < 0.7+                     , blaze-html  Executable yackage-upload   Main-is:             yackage-upload.hs   if flag(upload)       Build-depends:       base >= 4 && < 5-                         , http-enumerator >= 0.6 && < 0.7+                         , http-enumerator >= 0.6 && < 0.9                          , blaze-builder >= 0.2.1.3 && < 0.4                          , bytestring   else
yackage.hs view
@@ -41,6 +41,7 @@ import Network.Wai.Handler.Warp (runSettings, defaultSettings, settingsPort, settingsHost) import Network.HTTP.Types (status403) import qualified Data.Text as T+import Text.Blaze (toHtml)  data Args = Args     { port :: Int@@ -104,14 +105,12 @@     fromSinglePiece = Just . PackageName . T.unpack     toSinglePiece = T.pack . unPackageName -type Handler = GHandler Yackage Yackage- getRootR :: Handler RepHtml getRootR = do     y <- getYesod     ps <- getYesod >>= liftIO . readMVar . packages >>= return . Map.toList     defaultLayout $ do-        setTitle $ string $ ytitle y+        setTitle $ toHtml $ ytitle y         addHamlet [$hamlet|\ <h1>#{ytitle y} <form method="post" enctype="multipart/form-data">