twitch 0.1.0.0 → 0.1.1.0
raw patch · 3 files changed
+21/−8 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- src/Twitch/InternalRule.hs +1/−0
- src/Twitch/Main.hs +6/−4
- twitch.cabal +14/−4
src/Twitch/InternalRule.hs view
@@ -131,6 +131,7 @@ setupRuleForDir config@(Config {..}) man rules dirPath = do -- TODO Instead of const True, this should use the rule's fileTests void $ watchDir man dirPath (const True) $ \event -> do + print event log $ IEvent event forM_ rules $ testAndFireRule config event
src/Twitch/Main.hs view
@@ -137,12 +137,13 @@ <> help "Whether to use polling or not" <> value (usePolling def) )- <*> option+ <*> nullOption ( long "current-dir" <> short 'c' <> metavar "CURRENT_DIR" <> help "Director to append to the glob patterns" <> value (currentDir def)+ <> eitherReader (return . Just) ) -- This is like run, but the config params can be over written from the defaults@@ -159,13 +160,14 @@ dirsToWatch' = if null dirsToWatch then [currentDir'] else- dirsToWatch+ dirsToWatch (logger, mhandle) <- toLogger (fromMaybe "log.txt" logFile) log + let encodedDirs = map F.decodeString dirsToWatch' dirsToWatch'' <- if recurseThroughDirectories then - concatMapM findAllDirs $ map F.decodeString dirsToWatch'+ (encodedDirs ++) <$> concatMapM findAllDirs encodedDirs else - return $ map F.decodeString dirsToWatch'+ return encodedDirs let watchConfig = FS.WatchConfig { FS.confDebounce = toDB debounceAmount debounce
twitch.cabal view
@@ -2,15 +2,15 @@ -- documentation, see http://haskell.org/cabal/users-guide/ name: twitch-version: 0.1.0.0-synopsis: A high level file watcher API+version: 0.1.1.0+synopsis: A high level file watcher DSL -- description: homepage: https://github.com/jfischoff/twitch license: MIT license-file: LICENSE author: Jonathan Fischoff maintainer: jonathangfischoff@gmail.com--- copyright: +-- copyright: category: System build-type: Simple extra-source-files: README.md@@ -24,7 +24,17 @@ , Twitch.Path , Twitch.Rule , Twitch.Run- other-extensions: RecordWildCards, LambdaCase, GeneralizedNewtypeDeriving, OverloadedStrings, FlexibleInstances, RankNTypes, DeriveDataTypeable, ScopedTypeVariables, MultiParamTypeClasses, TypeSynonymInstances, TemplateHaskell+ other-extensions: RecordWildCards+ , LambdaCase+ , GeneralizedNewtypeDeriving+ , OverloadedStrings+ , FlexibleInstances+ , RankNTypes+ , DeriveDataTypeable+ , ScopedTypeVariables+ , MultiParamTypeClasses+ , TypeSynonymInstances+ , TemplateHaskell build-depends: base >=4.7 && <4.8 , containers >=0.5 && <0.6 , system-filepath >=0.4 && <0.5