packages feed

nemesis-titan 2013.6.13.1 → 2013.6.13.2

raw patch · 6 files changed

+83/−24 lines, 6 filesPVP: minor bump suggested

API additions: PVP suggests at least a minor version bump

API changes (from Hackage documentation)

+ System.Nemesis.Titan: halt :: IO ()
+ System.Nemesis.Titan: safe_spec :: IO () -> IO ExitCode
+ System.Nemesis.Titan: with_spec :: IO () -> IO b -> IO ()

Files

Nemesis view
@@ -23,3 +23,5 @@   console ["-isrc", "-Wall"] "src/System/Nemesis/Titan"    titan "Main.hs"+  +  titan "Test.hs"
nemesis-titan.cabal view
@@ -1,5 +1,5 @@ Name:                 nemesis-titan-Version:              2013.6.13.1+Version:              2013.6.13.2 Build-type:           Simple Synopsis:             A collection of Nemesis tasks to bootstrap a Haskell project with a focus on continuous integration Description:          @@ -12,7 +12,7 @@ Cabal-version:        >= 1.2 category:             Web homepage:             http://github.com/nfjinjing/nemesis-titan-data-files:           readme.md, changelog.md, known-issues.md, Nemesis+data-files:           readme.md, changelog.md, known-issues.md, Nemesis, vendor/Nemesis, src/Main.hs  library   ghc-options: -Wall
readme.md view
@@ -1,50 +1,60 @@+Titan!+======+ Requirements-============+------------ -* [Guard](https://github.com/guard/guard)-* [Angel](https://github.com/MichaelXavier/Angel)+### [Guard](https://github.com/guard/guard)+    +    # User space guard gem is required+    +    gem install guard+    gem install rb-fsevent+  +    +### [Angel](https://github.com/MichaelXavier/Angel) -Install-=======+    cabal install angel++### [Nemesis](https://github.com/nfjinjing/nemesis)++Automatically installed as a dependency of `nemesis-titan`.+    +Installation+------------        cabal install nemesis-titan-    cabal install air-extra  Usage-=====+----- -    mkdir my_project-    cd my_project+    mkdir my-project+    cd my-project  -Bootstrap----------+### Bootstrap -    curl https://raw.github.com/nfjinjing/nemesis-titan/master/vendor/Nemesis -o Nemesis+    curl -O https://raw.github.com/nfjinjing/nemesis-titan/master/vendor/Nemesis      -List available tasks---------------------+### List available tasks      runghc Nemesis      -Generate "Main.hs"--------------------+### Generate "Main.hs"      runghc Nemesis Main/init  -Start the continuous integration process-------------------------------------------+### Start the continuous integration process      runghc Nemesis Main/titan   Check-=====+------  Make some changes in `src/Main.hs` and see your code gets auto compiled and tested in the console.-     -    +
+ src/Main.hs view
@@ -0,0 +1,15 @@+module Main where++import Prelude ()+import Air.Env+import Air.Extra++import System.Nemesis.Titan+import Test.Hspec++spec :: IO ()+spec = do+  titan_spec++main = do+  with_spec spec halt
src/System/Nemesis/Titan.hs view
@@ -14,10 +14,14 @@ import System.Directory import System.Random import System.FilePath+import System.Exit (ExitCode(..))+import qualified Control.Exception as E+import Control.Monad (forever)  import Test.Hspec import Text.StringTemplate + angel_template :: StringTemplate String angel_template = newSTMP - [here| server {@@ -53,7 +57,6 @@ haskell_template = newSTMP - [here| module Main where -import Air.Extra (with_spec, halt) import System.Nemesis.Titan import Test.Hspec @@ -186,3 +189,25 @@       sh - "guard --no-bundler-warning -G " + guard_path        custom_tasks+++-- Helpers+safe_spec :: IO () -> IO ExitCode+safe_spec spec = E.handle (\e -> return (e :: ExitCode)) - do+  spec+  return ExitSuccess++halt :: IO ()+halt = forever - sleep (1 :: Double)+  +with_spec :: IO () -> IO b -> IO ()+with_spec spec process = do+  exit_code <- safe_spec spec+  +  case exit_code of+    ExitSuccess -> do+      fork - process+    _ ->+      return ()+  +  halt
+ vendor/Nemesis view
@@ -0,0 +1,7 @@+import System.Nemesis.Env+import System.Nemesis.Titan++main = run nemesis++nemesis = do+  titan "Main.hs"