packages feed

shelly 0.14.3 → 0.15.0

raw patch · 4 files changed

+20/−23 lines, 4 filesdep −hspec-discoverdep ~hspec

Dependencies removed: hspec-discover

Dependency ranges changed: hspec

Files

Shelly.hs view
@@ -66,7 +66,7 @@          , toTextIgnore, toTextWarn, fromText           -- * Utilities.-         , (<$>), (<$$>), whenM, unlessM, time+         , (<$>), whenM, unlessM, time           -- * Re-exported for your convenience          , liftIO, when, unless, FilePath@@ -359,8 +359,8 @@ pack :: String -> FilePath pack = decodeString --- | Currently a 'renameFile' wrapper. TODO: Support cross-filesystem--- move. TODO: Support directory paths in the second parameter, like in 'cp'.+-- | Currently a 'rename' wrapper.+-- TODO: Support directory paths in the second parameter, like in 'cp'. mv :: FilePath -> FilePath -> Sh () mv a b = do a' <- absPath a             b' <- absPath b@@ -376,16 +376,16 @@ pwd = gets sDirectory `tag` "pwd"  -- | exit 0 means no errors, all other codes are error conditions-exit :: Int -> Sh ()+exit :: Int -> Sh a exit 0 = liftIO (exitWith ExitSuccess) `tag` "exit 0" exit n = liftIO (exitWith (ExitFailure n)) `tag` ("exit " `mappend` LT.pack (show n))  -- | echo a message and exit with status 1-errorExit :: Text -> Sh ()+errorExit :: Text -> Sh a errorExit msg = echo msg >> exit 1  -- | for exiting with status > 0 without printing debug information-quietExit :: Int -> Sh ()+quietExit :: Int -> Sh a quietExit 0 = exit 0 quietExit n = throw $ QuietExit n @@ -773,24 +773,26 @@ -- | bind some arguments to run for re-use. Example: -- -- > monit = command "monit" ["-c", "monitrc"]+-- > monit ["stop", "program"] command :: FilePath -> [Text] -> [Text] -> Sh Text command com args more_args = run com (args ++ more_args)  -- | bind some arguments to 'run_' for re-use. Example: -- -- > monit_ = command_ "monit" ["-c", "monitrc"]+-- > monit_ ["stop", "program"] command_ :: FilePath -> [Text] -> [Text] -> Sh () command_ com args more_args = run_ com (args ++ more_args) --- | bind some arguments to run for re-use, and expect 1 argument. Example:+-- | bind some arguments to run for re-use, and require 1 argument. Example: -- -- > git = command1 "git" []; git "pull" ["origin", "master"] command1 :: FilePath -> [Text] -> Text -> [Text] -> Sh Text command1 com args one_arg more_args = run com ([one_arg] ++ args ++ more_args) --- | bind some arguments to run for re-use, and expect 1 argument. Example:+-- | bind some arguments to run for re-use, and require 1 argument. Example: ----- > git_ = command1_ "git" []; git+ "pull" ["origin", "master"]+-- > git_ = command1_ "git" []; git "pull" ["origin", "master"] command1_ :: FilePath -> [Text] -> Text -> [Text] -> Sh () command1_ com args one_arg more_args = run_ com ([one_arg] ++ args ++ more_args) @@ -904,9 +906,7 @@   where     extraMsg t f = "during copy from: " ++ unpack f ++ " to: " ++ unpack t --- | A functor-lifting function composition.-(<$$>) :: (Functor m) => (b -> c) -> (a -> m b) -> a -> m c-f <$$> v = fmap f . v+  -- | Create a temporary directory and pass it as a parameter to a Sh -- computation. The directory is nuked afterwards.
Shelly/Pipe.hs view
@@ -84,7 +84,7 @@          , toTextIgnore, toTextWarn, fromText           -- * Utilities.-         , (<$>), (<$$>), whenM, unlessM, time+         , (<$>), whenM, unlessM, time           -- * Re-exported for your convenience          , liftIO, when, unless, FilePath@@ -110,7 +110,7 @@  import Shelly(       (</>), (<.>), hasExt-    , (<$$>), whenM, unlessM, toTextIgnore+    , whenM, unlessM, toTextIgnore     , fromText, catchany     , FoldCallback) 
shelly.cabal view
@@ -1,6 +1,6 @@ Name:       shelly -Version:     0.14.3+Version:     0.15.0 Synopsis:    shell-like (systems) programming in Haskell  Description: Shelly provides convenient systems programming in Haskell,@@ -59,8 +59,7 @@                  , system-filepath < 0.5                  , system-fileio < 0.4                  , bytestring-                 , hspec-discover-                 , hspec >= 1.3+                 , hspec >= 1.4                  , HUnit  -- demonstarated that command output in Shellish was not shown until after the command finished
test/main.hs view
@@ -1,6 +1,4 @@-{- # OPTIONS_GHC -F -pgmF hspec-discover -optF --nested #-}-{-import qualified CopySpec-}-{-main = CopySpec.main-}-import qualified FailureSpec-main :: IO ()-main = FailureSpec.main+{-# OPTIONS_GHC -F -pgmF hspec-discover -optF --nested #-}+-- import qualified FindSpec+-- main :: IO ()+-- main = FindSpec.main