packages feed

cron 0.5.0 → 0.6.0

raw patch · 5 files changed

+9/−5 lines, 5 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

- System.Cron.Types: instance GHC.Generics.Constructor System.Cron.Types.C1_0BaseField
- System.Cron.Types: instance GHC.Generics.Constructor System.Cron.Types.C1_0CronCommand
- System.Cron.Types: instance GHC.Generics.Constructor System.Cron.Types.C1_0CronField
- System.Cron.Types: instance GHC.Generics.Constructor System.Cron.Types.C1_0CronSchedule
- System.Cron.Types: instance GHC.Generics.Constructor System.Cron.Types.C1_0Crontab
- System.Cron.Types: instance GHC.Generics.Constructor System.Cron.Types.C1_0CrontabEntry
- System.Cron.Types: instance GHC.Generics.Constructor System.Cron.Types.C1_0DayOfMonthSpec
- System.Cron.Types: instance GHC.Generics.Constructor System.Cron.Types.C1_0DayOfWeekSpec
- System.Cron.Types: instance GHC.Generics.Constructor System.Cron.Types.C1_0HourSpec
- System.Cron.Types: instance GHC.Generics.Constructor System.Cron.Types.C1_0MinuteSpec
- System.Cron.Types: instance GHC.Generics.Constructor System.Cron.Types.C1_0MonthSpec
- System.Cron.Types: instance GHC.Generics.Constructor System.Cron.Types.C1_0RangeField
- System.Cron.Types: instance GHC.Generics.Constructor System.Cron.Types.C1_0SpecificField
- System.Cron.Types: instance GHC.Generics.Constructor System.Cron.Types.C1_0StepField
- System.Cron.Types: instance GHC.Generics.Constructor System.Cron.Types.C1_1BaseField
- System.Cron.Types: instance GHC.Generics.Constructor System.Cron.Types.C1_1CronField
- System.Cron.Types: instance GHC.Generics.Constructor System.Cron.Types.C1_1CrontabEntry
- System.Cron.Types: instance GHC.Generics.Constructor System.Cron.Types.C1_2BaseField
- System.Cron.Types: instance GHC.Generics.Constructor System.Cron.Types.C1_2CronField
- System.Cron.Types: instance GHC.Generics.Datatype System.Cron.Types.D1BaseField
- System.Cron.Types: instance GHC.Generics.Datatype System.Cron.Types.D1CronCommand
- System.Cron.Types: instance GHC.Generics.Datatype System.Cron.Types.D1CronField
- System.Cron.Types: instance GHC.Generics.Datatype System.Cron.Types.D1CronSchedule
- System.Cron.Types: instance GHC.Generics.Datatype System.Cron.Types.D1Crontab
- System.Cron.Types: instance GHC.Generics.Datatype System.Cron.Types.D1CrontabEntry
- System.Cron.Types: instance GHC.Generics.Datatype System.Cron.Types.D1DayOfMonthSpec
- System.Cron.Types: instance GHC.Generics.Datatype System.Cron.Types.D1DayOfWeekSpec
- System.Cron.Types: instance GHC.Generics.Datatype System.Cron.Types.D1HourSpec
- System.Cron.Types: instance GHC.Generics.Datatype System.Cron.Types.D1MinuteSpec
- System.Cron.Types: instance GHC.Generics.Datatype System.Cron.Types.D1MonthSpec
- System.Cron.Types: instance GHC.Generics.Datatype System.Cron.Types.D1RangeField
- System.Cron.Types: instance GHC.Generics.Datatype System.Cron.Types.D1SpecificField
- System.Cron.Types: instance GHC.Generics.Datatype System.Cron.Types.D1StepField
- System.Cron.Types: instance GHC.Generics.Selector System.Cron.Types.S1_0_0CronCommand
- System.Cron.Types: instance GHC.Generics.Selector System.Cron.Types.S1_0_0CronSchedule
- System.Cron.Types: instance GHC.Generics.Selector System.Cron.Types.S1_0_0Crontab
- System.Cron.Types: instance GHC.Generics.Selector System.Cron.Types.S1_0_0DayOfMonthSpec
- System.Cron.Types: instance GHC.Generics.Selector System.Cron.Types.S1_0_0DayOfWeekSpec
- System.Cron.Types: instance GHC.Generics.Selector System.Cron.Types.S1_0_0HourSpec
- System.Cron.Types: instance GHC.Generics.Selector System.Cron.Types.S1_0_0MinuteSpec
- System.Cron.Types: instance GHC.Generics.Selector System.Cron.Types.S1_0_0MonthSpec
- System.Cron.Types: instance GHC.Generics.Selector System.Cron.Types.S1_0_0RangeField
- System.Cron.Types: instance GHC.Generics.Selector System.Cron.Types.S1_0_0SpecificField
- System.Cron.Types: instance GHC.Generics.Selector System.Cron.Types.S1_0_0StepField
- System.Cron.Types: instance GHC.Generics.Selector System.Cron.Types.S1_0_1CronSchedule
- System.Cron.Types: instance GHC.Generics.Selector System.Cron.Types.S1_0_1RangeField
- System.Cron.Types: instance GHC.Generics.Selector System.Cron.Types.S1_0_1StepField
- System.Cron.Types: instance GHC.Generics.Selector System.Cron.Types.S1_0_2CronSchedule
- System.Cron.Types: instance GHC.Generics.Selector System.Cron.Types.S1_0_3CronSchedule
- System.Cron.Types: instance GHC.Generics.Selector System.Cron.Types.S1_0_4CronSchedule
- System.Cron.Schedule: addJob :: MonadSchedule m => IO () -> String -> m ()
+ System.Cron.Schedule: addJob :: MonadSchedule m => IO () -> Text -> m ()

Files

README.md view
@@ -10,7 +10,7 @@ `scheduleMatches`, which you can use to compare a time against a `CronSchedule` to see if an action needs to be performed.  System.Cron.Parser is where you will find the parsers `cronSchedule`, `crontabEntry` and `cronTab`. To parse-individual schedules up to full crontab files. System.Cron.Descrive is where+individual schedules up to full crontab files. System.Cron.Describe is where you will find the `describe` function for creating human-readable strings from cron schedules, as well as any options to control how the description is created. 
changelog view
@@ -1,3 +1,5 @@+# 0.6.0+* Use Text instead of String in Cron.Schedule # 0.5.0 * Add System.Cron.Describe which describes cron schedules in words (English only for now). Big thanks to Joe Canero for this feature! # 0.4.2
cron.cabal view
@@ -1,5 +1,5 @@ Name:                cron-Version:             0.5.0+Version:             0.6.0 Description:   Cron data structure and Attoparsec parser. The idea is to embed it in larger   systems which want to roll their own scheduled tasks in a format that people
src/System/Cron/Schedule.hs view
@@ -53,7 +53,7 @@ import           Control.Monad.Identity import           Control.Monad.State import           Data.Attoparsec.Text       (parseOnly)-import           Data.Text                  (pack)+import           Data.Text                  (Text) import           Data.Time #if !MIN_VERSION_time(1,5,0) import           System.Locale@@ -115,11 +115,11 @@  ------------------------------------------------------------------------------- class MonadSchedule m where-    addJob ::  IO () -> String -> m ()+    addJob ::  IO () -> Text -> m ()  instance (Monad m) => MonadSchedule (ScheduleT m) where     addJob a t = do s :: Jobs <- get-                    case parseOnly cronSchedule (pack t) of+                    case parseOnly cronSchedule t of                         Left  e  -> throwError $ ParseError e                         Right t' -> put $ Job t' a : s 
test/System/Test/Cron/Schedule.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE OverloadedStrings #-}+ module System.Test.Cron.Schedule     ( tests     ) where