Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package perl-DateTime-Format-Natural for 
openSUSE:Factory checked in at 2023-10-19 22:50:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-DateTime-Format-Natural (Old)
 and      /work/SRC/openSUSE:Factory/.perl-DateTime-Format-Natural.new.1945 
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-DateTime-Format-Natural"

Thu Oct 19 22:50:39 2023 rev:10 rq:1118905 version:1.180.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/perl-DateTime-Format-Natural/perl-DateTime-Format-Natural.changes
        2023-07-12 17:27:09.894429176 +0200
+++ 
/work/SRC/openSUSE:Factory/.perl-DateTime-Format-Natural.new.1945/perl-DateTime-Format-Natural.changes
      2023-10-19 22:53:39.936242230 +0200
@@ -1,0 +2,14 @@
+Fri Oct  6 03:06:10 UTC 2023 - Tina Müller <[email protected]>
+
+- updated to 1.18
+   see /usr/share/doc/packages/perl-DateTime-Format-Natural/Changes
+
+  1.18  2023-10-05  <[email protected]>
+   - Merged development version to stable.
+  1.17_02  2023-10-03  <[email protected]>
+   - Validate 'daytime' parameter.
+  1.17_01  2023-10-01  <[email protected]>
+   - Minor wording tweak.
+   - Minor indentation tweak.
+
+-------------------------------------------------------------------

Old:
----
  DateTime-Format-Natural-1.17.tar.gz

New:
----
  DateTime-Format-Natural-1.18.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-DateTime-Format-Natural.spec ++++++
--- /var/tmp/diff_new_pack.4b0mkQ/_old  2023-10-19 22:53:40.360257609 +0200
+++ /var/tmp/diff_new_pack.4b0mkQ/_new  2023-10-19 22:53:40.364257753 +0200
@@ -18,12 +18,13 @@
 
 %define cpan_name DateTime-Format-Natural
 Name:           perl-DateTime-Format-Natural
-Version:        1.17
+Version:        1.180.0
 Release:        0
+%define cpan_version 1.18
 License:        Artistic-1.0 OR GPL-1.0-or-later
 Summary:        Parse informal natural language date/time strings
 URL:            https://metacpan.org/release/%{cpan_name}
-Source0:        
https://cpan.metacpan.org/authors/id/S/SC/SCHUBIGER/%{cpan_name}-%{version}.tar.gz
+Source0:        
https://cpan.metacpan.org/authors/id/S/SC/SCHUBIGER/%{cpan_name}-%{cpan_version}.tar.gz
 Source1:        cpanspec.yml
 BuildArch:      noarch
 BuildRequires:  perl
@@ -33,7 +34,7 @@
 BuildRequires:  perl(DateTime::HiRes)
 BuildRequires:  perl(DateTime::TimeZone)
 BuildRequires:  perl(List::MoreUtils)
-BuildRequires:  perl(Module::Build) >= 0.420000
+BuildRequires:  perl(Module::Build) >= 0.42
 BuildRequires:  perl(Module::Util)
 BuildRequires:  perl(Params::Validate) >= 1.15
 BuildRequires:  perl(Test::MockTime::HiRes)
@@ -45,6 +46,22 @@
 Requires:       perl(List::MoreUtils)
 Requires:       perl(Params::Validate) >= 1.15
 Requires:       perl(boolean)
+Provides:       perl(DateTime::Format::Natural) = 1.180.0
+Provides:       perl(DateTime::Format::Natural::Calc) = 1.46
+Provides:       perl(DateTime::Format::Natural::Compat) = 0.07
+Provides:       perl(DateTime::Format::Natural::Duration) = 0.07
+Provides:       perl(DateTime::Format::Natural::Duration::Checks) = 0.05
+Provides:       perl(DateTime::Format::Natural::Expand) = 0.04
+Provides:       perl(DateTime::Format::Natural::Extract) = 0.13
+Provides:       perl(DateTime::Format::Natural::Formatted) = 0.12
+Provides:       perl(DateTime::Format::Natural::Helpers) = 0.06
+Provides:       perl(DateTime::Format::Natural::Lang::Base) = 1.08
+Provides:       perl(DateTime::Format::Natural::Lang::EN) = 1.72
+Provides:       perl(DateTime::Format::Natural::Rewrite) = 0.08
+Provides:       perl(DateTime::Format::Natural::Test) = 0.130.0
+Provides:       perl(DateTime::Format::Natural::Utils) = 0.08
+Provides:       perl(DateTime::Format::Natural::Wrappers) = 0.03
+%define         __perllib_provides /bin/true
 Recommends:     perl(Date::Calc)
 %{perl_requires}
 
@@ -54,7 +71,7 @@
 ordinary strings.
 
 %prep
-%autosetup  -n %{cpan_name}-%{version}
+%autosetup  -n %{cpan_name}-%{cpan_version}
 
 find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path 
"*/script/*" ! -path "*/scripts/*" ! -name "configure" -print0 | xargs -0 chmod 
644
 

++++++ DateTime-Format-Natural-1.17.tar.gz -> 
DateTime-Format-Natural-1.18.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/DateTime-Format-Natural-1.17/Changes 
new/DateTime-Format-Natural-1.18/Changes
--- old/DateTime-Format-Natural-1.17/Changes    2023-06-20 19:43:36.000000000 
+0200
+++ new/DateTime-Format-Natural-1.18/Changes    2023-10-05 16:50:41.000000000 
+0200
@@ -1,5 +1,19 @@
 Revision history for Perl extension DateTime::Format::Natural.
 
+1.18  2023-10-05  <[email protected]>
+
+ - Merged development version to stable.
+
+1.17_02  2023-10-03  <[email protected]>
+
+ - Validate 'daytime' parameter.
+
+1.17_01  2023-10-01  <[email protected]>
+
+ - Minor wording tweak.
+
+ - Minor indentation tweak.
+
 1.17  2023-06-20  <[email protected]>
 
  - Merged development version to stable.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/DateTime-Format-Natural-1.17/META.json 
new/DateTime-Format-Natural-1.18/META.json
--- old/DateTime-Format-Natural-1.17/META.json  2023-06-20 19:43:36.000000000 
+0200
+++ new/DateTime-Format-Natural-1.18/META.json  2023-10-05 16:50:41.000000000 
+0200
@@ -54,7 +54,7 @@
    "provides" : {
       "DateTime::Format::Natural" : {
          "file" : "lib/DateTime/Format/Natural.pm",
-         "version" : "1.17"
+         "version" : "1.18"
       },
       "DateTime::Format::Natural::Calc" : {
          "file" : "lib/DateTime/Format/Natural/Calc.pm",
@@ -102,7 +102,7 @@
       },
       "DateTime::Format::Natural::Test" : {
          "file" : "lib/DateTime/Format/Natural/Test.pm",
-         "version" : "0.12"
+         "version" : "0.13"
       },
       "DateTime::Format::Natural::Utils" : {
          "file" : "lib/DateTime/Format/Natural/Utils.pm",
@@ -122,6 +122,6 @@
          "url" : "https://github.com/stsc/DateTime-Format-Natural";
       }
    },
-   "version" : "1.17",
+   "version" : "1.18",
    "x_serialization_backend" : "JSON::PP version 4.04"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/DateTime-Format-Natural-1.17/META.yml 
new/DateTime-Format-Natural-1.18/META.yml
--- old/DateTime-Format-Natural-1.17/META.yml   2023-06-20 19:43:36.000000000 
+0200
+++ new/DateTime-Format-Natural-1.18/META.yml   2023-10-05 16:50:41.000000000 
+0200
@@ -22,7 +22,7 @@
 provides:
   DateTime::Format::Natural:
     file: lib/DateTime/Format/Natural.pm
-    version: '1.17'
+    version: '1.18'
   DateTime::Format::Natural::Calc:
     file: lib/DateTime/Format/Natural/Calc.pm
     version: '1.46'
@@ -58,7 +58,7 @@
     version: '0.08'
   DateTime::Format::Natural::Test:
     file: lib/DateTime/Format/Natural/Test.pm
-    version: '0.12'
+    version: '0.13'
   DateTime::Format::Natural::Utils:
     file: lib/DateTime/Format/Natural/Utils.pm
     version: '0.08'
@@ -84,5 +84,5 @@
 resources:
   license: http://dev.perl.org/licenses/
   repository: https://github.com/stsc/DateTime-Format-Natural
-version: '1.17'
+version: '1.18'
 x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/DateTime-Format-Natural-1.17/README 
new/DateTime-Format-Natural-1.18/README
--- old/DateTime-Format-Natural-1.17/README     2023-06-20 19:43:36.000000000 
+0200
+++ new/DateTime-Format-Natural-1.18/README     2023-10-05 16:50:41.000000000 
+0200
@@ -112,8 +112,8 @@
 
     *   "daytime"
 
-        An anonymous hash reference consisting of customized daytime hours,
-        which may be selectively changed.
+        A hash reference consisting of customized daytime hours, which may
+        be selectively changed.
 
 METHODS
   parse_datetime
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DateTime-Format-Natural-1.17/lib/DateTime/Format/Natural/Test.pm 
new/DateTime-Format-Natural-1.18/lib/DateTime/Format/Natural/Test.pm
--- old/DateTime-Format-Natural-1.17/lib/DateTime/Format/Natural/Test.pm        
2023-06-20 19:43:36.000000000 +0200
+++ new/DateTime-Format-Natural-1.18/lib/DateTime/Format/Natural/Test.pm        
2023-10-05 16:50:41.000000000 +0200
@@ -16,9 +16,12 @@
 our ($VERSION, @EXPORT_OK, %EXPORT_TAGS, %time, $case_strings, $time_entries);
 my @set;
 
-$VERSION = '0.12';
+$VERSION = '0.13';
+
+@set = qw(truncated unaltered %time $case_strings
+          $time_entries _run_tests _result_string
+          _result_string_hires _message);
 
-@set         =  qw(truncated unaltered %time $case_strings $time_entries 
_run_tests _result_string _result_string_hires _message);
 @EXPORT_OK   = (qw(_find_modules _find_files), @set);
 %EXPORT_TAGS = ('set' => [ @set ]);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/DateTime-Format-Natural-1.17/lib/DateTime/Format/Natural.pm 
new/DateTime-Format-Natural-1.18/lib/DateTime/Format/Natural.pm
--- old/DateTime-Format-Natural-1.17/lib/DateTime/Format/Natural.pm     
2023-06-20 19:43:36.000000000 +0200
+++ new/DateTime-Format-Natural-1.18/lib/DateTime/Format/Natural.pm     
2023-10-05 16:50:41.000000000 +0200
@@ -24,7 +24,7 @@
 
 use DateTime::Format::Natural::Utils qw(trim);
 
-our $VERSION = '1.17';
+our $VERSION = '1.18';
 
 validation_options(
     on_fail => sub
@@ -142,6 +142,28 @@
         daytime => {
             type => HASHREF,
             optional => true,
+            callbacks => {
+                'valid daytime' => sub
+                {
+                    my $href = shift;
+                    my %daytimes = map { $_ => true } qw(morning afternoon 
evening);
+                    if (any { !$daytimes{$_} } keys %$href) {
+                        die "spelling of daytime\n";
+                    }
+                    elsif (any { !defined $href->{$_} } keys %$href) {
+                        die "undefined hour\n";
+                    }
+                    elsif (any { $href->{$_} !~ /^\d{1,2}$/ } keys %$href) {
+                        die "not a valid number\n";
+                    }
+                    elsif (any { $href->{$_} < 0 || $href->{$_} > 23 } keys 
%$href) {
+                        die "hour out of range\n";
+                    }
+                    else {
+                        return true;
+                    }
+                }
+            },
         },
         datetime => {
             type => OBJECT,
@@ -853,7 +875,7 @@
 
 =item * C<daytime>
 
-An anonymous hash reference consisting of customized daytime hours,
+A hash reference consisting of customized daytime hours,
 which may be selectively changed.
 
 =back
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/DateTime-Format-Natural-1.17/t/18-validate.t 
new/DateTime-Format-Natural-1.18/t/18-validate.t
--- old/DateTime-Format-Natural-1.17/t/18-validate.t    2023-06-20 
19:43:36.000000000 +0200
+++ new/DateTime-Format-Natural-1.18/t/18-validate.t    2023-10-05 
16:50:41.000000000 +0200
@@ -8,7 +8,7 @@
 use DateTime::Format::Natural;
 use DateTime::HiRes;
 use DateTime::TimeZone;
-use Test::More tests => 18;
+use Test::More tests => 19;
 
 eval { DateTime::Format::Natural->new(lang => 'en') };
 ok(!$@, 'lang');
@@ -48,7 +48,10 @@
 ok(!$@, 'time_zone object');
 
 eval { DateTime::Format::Natural->new(daytime => {}) };
-ok(!$@, 'daytime');
+ok(!$@, 'daytime empty');
+
+eval { DateTime::Format::Natural->new(daytime => { morning => 8, afternoon => 
14, evening => 20 }) };
+ok(!$@, 'daytime hours');
 
 eval { DateTime::Format::Natural->new(datetime => DateTime->now) };
 ok(!$@, 'datetime with DateTime object');

Reply via email to