packages feed

shelly 1.7.0 → 1.7.0.1

raw patch · 5 files changed

+56/−9 lines, 5 filesdep +filepathPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependencies added: filepath

API changes (from Hackage documentation)

- Shelly: liftIO :: MonadIO m => forall a. IO a -> m a
+ Shelly: liftIO :: MonadIO m => forall a. () => IO a -> m a
- Shelly: type FoldCallback a = a -> Text -> a
+ Shelly: type FoldCallback a = (a -> Text -> a)
- Shelly.Lifted: class Monad m => MonadShControl m where data ShM m a :: * where {
+ Shelly.Lifted: class Monad m => MonadShControl m where {
- Shelly.Lifted: liftIO :: MonadIO m => forall a. IO a -> m a
+ Shelly.Lifted: liftIO :: MonadIO m => forall a. () => IO a -> m a
- Shelly.Lifted: type FoldCallback a = a -> Text -> a
+ Shelly.Lifted: type FoldCallback a = (a -> Text -> a)
- Shelly.Pipe: liftIO :: MonadIO m => forall a. IO a -> m a
+ Shelly.Pipe: liftIO :: MonadIO m => forall a. () => IO a -> m a
- Shelly.Pipe: type FoldCallback a = a -> Text -> a
+ Shelly.Pipe: type FoldCallback a = (a -> Text -> a)

Files

ChangeLog.md view
@@ -1,3 +1,7 @@+# 1.7.0.1++* Fix FindSpec.hs tests. Fixes [#150](https://github.com/yesodweb/Shelly.hs/issues/150), [#162](https://github.com/yesodweb/Shelly.hs/issues/162)+ # 1.6.8.7  * Relax unix-compat constraints
README.md view
@@ -1,5 +1,10 @@ # Shelly +[![Build Status](https://travis-ci.org/yesodweb/Shelly.hs.svg?branch=master)](https://travis-ci.org/yesodweb/Shelly.hs)+[![Hackage](https://img.shields.io/hackage/v/shelly.svg)](https://hackage.haskell.org/package/shelly)+[![Stackage Nightly](http://stackage.org/package/shelly/badge/nightly)](http://stackage.org/nightly/package/shelly)+[![Stackage LTS](http://stackage.org/package/shelly/badge/lts)](http://stackage.org/lts/package/shelly)+ Shelly provides a single module for convenient systems programming in Haskell.  * is aimed at convenience and getting things done rather than being a demonstration of elegance.
shelly.cabal view
@@ -1,6 +1,6 @@ Name:       shelly -Version:     1.7.0+Version:     1.7.0.1 Synopsis:    shell-like (systems) programming in Haskell  Description: Shelly provides convenient systems programming in Haskell,@@ -37,6 +37,7 @@                     test/examples/*.hs                     test/data/zshrc                     test/data/nonascii.txt+                    test/data/symlinked_dir/hoge_file                     test/testall                     README.md                     ChangeLog.md@@ -135,6 +136,7 @@     hspec                     >= 1.5,     transformers,     transformers-base,+    filepath,     monad-control,     lifted-base,     lifted-async,
+ test/data/symlinked_dir/hoge_file view
test/src/FindSpec.hs view
@@ -2,7 +2,23 @@  import TestInit import Data.List (sort)+import System.Directory (createDirectoryIfMissing)+import System.PosixCompat.Files (createSymbolicLink, fileExist)+import qualified System.FilePath as SF +createSymlinkForTest :: IO ()+createSymlinkForTest = do+  createDirectoryIfMissing False symDir+  fexist <- fileExist (symDir SF.</> "symlinked_dir")+  if fexist+    then return ()+    else createSymbolicLink+           (".." SF.</> "symlinked_dir")+           (symDir SF.</> "symlinked_dir")+  where+    rootDir = "test" SF.</> "data"+    symDir = rootDir SF.</> "dir"+ findSpec :: Spec findSpec = do   describe "relativeTo" $ do@@ -68,12 +84,32 @@                     "TestInit.hs", "TestMain.hs",                     "WhichSpec.hs", "WriteSpec.hs", "sleep.hs"] -    it "follow symlinks" $ do-      res <- shelly $ followSymlink True $ relPath "test/data" >>= find >>= mapM (relativeTo "test/data")-      sort res @?=  ["dir","nonascii.txt","symlinked_dir","zshrc","dir/symlinked_dir",-                     "dir/symlinked_dir/hoge_file","symlinked_dir/hoge_file"]+    before createSymlinkForTest $ do+      it "follow symlinks" $+         do res <-+              shelly $+              followSymlink True $+              relPath "test/data" >>= find >>= mapM (relativeTo "test/data")+            sort res @?=+              [ "dir"+              , "nonascii.txt"+              , "symlinked_dir"+              , "zshrc"+              , "dir/symlinked_dir"+              , "dir/symlinked_dir/hoge_file"+              , "symlinked_dir/hoge_file"+              ]+      it "not follow symlinks" $+         do res <-+              shelly $+              followSymlink False $+              relPath "test/data" >>= find >>= mapM (relativeTo "test/data")+            sort res @?=+              [ "dir"+              , "nonascii.txt"+              , "symlinked_dir"+              , "zshrc"+              , "dir/symlinked_dir"+              , "symlinked_dir/hoge_file"+              ] -    it "not follow symlinks" $ do-      res <- shelly $ followSymlink False $ relPath "test/data" >>= find >>= mapM (relativeTo "test/data")-      sort res @?=  ["dir","nonascii.txt","symlinked_dir","zshrc","dir/symlinked_dir",-                     "symlinked_dir/hoge_file"]