Hello community,
here is the log from the commit of package ghc-cron for openSUSE:Factory
checked in at 2017-03-03 17:49:15
Comparing /work/SRC/openSUSE:Factory/ghc-cron (Old)
and /work/SRC/openSUSE:Factory/.ghc-cron.new (New)
Package is "ghc-cron"
Fri Mar 3 17:49:15 2017 rev:3 rq:461620 version:0.5.0
Changes:
--- /work/SRC/openSUSE:Factory/ghc-cron/ghc-cron.changes2017-01-12
15:48:06.425005107 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-cron.new/ghc-cron.changes 2017-03-03
17:49:16.492950341 +0100
@@ -1,0 +2,5 @@
+Sun Feb 12 14:11:26 UTC 2017 - psim...@suse.com
+
+- Update to version 0.5.0 with cabal2obs.
+
+---
Old:
cron-0.4.2.tar.gz
cron.cabal
New:
cron-0.5.0.tar.gz
Other differences:
--
++ ghc-cron.spec ++
--- /var/tmp/diff_new_pack.iTTPgu/_old 2017-03-03 17:49:17.388823815 +0100
+++ /var/tmp/diff_new_pack.iTTPgu/_new 2017-03-03 17:49:17.388823815 +0100
@@ -1,7 +1,7 @@
#
# spec file for package ghc-cron
#
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,16 +19,16 @@
%global pkg_name cron
%bcond_with tests
Name: ghc-%{pkg_name}
-Version:0.4.2
+Version:0.5.0
Release:0
Summary:Cron datatypes and Attoparsec parser
License:MIT
Group: Development/Languages/Other
Url:https://hackage.haskell.org/package/%{pkg_name}
Source0:
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
-Source1:
https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal#/%{pkg_name}.cabal
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-attoparsec-devel
+BuildRequires: ghc-data-default-class-devel
BuildRequires: ghc-mtl-compat-devel
BuildRequires: ghc-mtl-devel
BuildRequires: ghc-old-locale-devel
@@ -69,7 +69,6 @@
%prep
%setup -q -n %{pkg_name}-%{version}
-cp -p %{SOURCE1} %{pkg_name}.cabal
%build
%ghc_lib_build
@@ -92,5 +91,6 @@
%files devel -f %{name}-devel.files
%defattr(-,root,root,-)
+%doc README.md changelog
%changelog
++ cron-0.4.2.tar.gz -> cron-0.5.0.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cron-0.4.2/README.md new/cron-0.5.0/README.md
--- old/cron-0.4.2/README.md2016-11-22 21:18:44.0 +0100
+++ new/cron-0.5.0/README.md2017-01-05 03:07:47.0 +0100
@@ -10,7 +10,9 @@
`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.
+individual schedules up to full crontab files. System.Cron.Descrive 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.
To do anything, you'll need to install cabal-dev with cabal.
@@ -51,9 +53,21 @@
job2 = putStrLn "Job 2"
```
+ Describe
+```haskell
+main :: IO ()
+main = do
+ let Right cs1 = parseCronSchedule "*/2 * 3 * 4,5,6"
+ print $ describe defaultOpts cs1
+
+ let Right cs2 = parseCronSchedule "*/2 12 3 * 4,5,6"
+ print $ describe (twentyFourHourFormat <> verbose) cs2
+```
+
## Contributors
* [Simon Hengel](https://github.com/sol)
* [Alberto Valverde](https://github.com/albertov)
* [Andrew Rademacher](https://github.com/AndrewRademacher)
* [Peter Simons](https://github.com/peti)
+* [Joseph Canero](https://github.com/caneroj1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cron-0.4.2/bench/Main.hs new/cron-0.5.0/bench/Main.hs
--- old/cron-0.4.2/bench/Main.hs2016-11-22 21:18:44.0 +0100
+++ new/cron-0.5.0/bench/Main.hs2017-01-05 03:07:47.0 +0100
@@ -22,6 +22,7 @@
, scheduleMatchesBenchmarks
, nextMatchBenchmarks
, serializeBenchmarks
+ , describeBenchmarks
]
@@ -67,6 +68,21 @@
---
+describeBenchmarks :: Benchmark
+describeBenchmarks = bgroup "description"
+ [
+bgroup "verbose" [
+ bench "simple" (whnf (describe verbose) simpleCronSchedule)
+, bench "complicated" (whnf (describe verbose) complexCronSchedule)
+]
+ , bgroup "non-verbose" [
+ bench "simple" (whnf (describe notVerbose) simpleCronSchedul