Hello community,
here is the log from the commit of package perl-Time-Duration-Parse for
openSUSE:Factory checked in at 2015-10-28 17:31:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Time-Duration-Parse (Old)
and /work/SRC/openSUSE:Factory/.perl-Time-Duration-Parse.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Time-Duration-Parse"
Changes:
--------
---
/work/SRC/openSUSE:Factory/perl-Time-Duration-Parse/perl-Time-Duration-Parse.changes
2015-07-08 06:59:33.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.perl-Time-Duration-Parse.new/perl-Time-Duration-Parse.changes
2015-10-28 17:31:07.000000000 +0100
@@ -1,0 +2,13 @@
+Tue Oct 27 10:37:36 UTC 2015 - [email protected]
+
+- updated to 0.13
+ see /usr/share/doc/packages/perl-Time-Duration-Parse/Changes
+
+ 0.13 2015-10-25 NEILB
+ - Added additional abbrevations for 'months': 'mo', 'mon', 'mons'.
+ Thanks to PERLANCAR.
+ - Rewrote the main testsuite to be data driven, to make it easy to
+ add test cases, as for the above change.
+ - Updated github repo URL after changing my github username
+
+-------------------------------------------------------------------
Old:
----
Time-Duration-Parse-0.12.tar.gz
New:
----
Time-Duration-Parse-0.13.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Time-Duration-Parse.spec ++++++
--- /var/tmp/diff_new_pack.HVeT3V/_old 2015-10-28 17:31:08.000000000 +0100
+++ /var/tmp/diff_new_pack.HVeT3V/_new 2015-10-28 17:31:08.000000000 +0100
@@ -17,7 +17,7 @@
Name: perl-Time-Duration-Parse
-Version: 0.12
+Version: 0.13
Release: 0
%define cpan_name Time-Duration-Parse
Summary: Parse string that represents time duration
++++++ Time-Duration-Parse-0.12.tar.gz -> Time-Duration-Parse-0.13.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Time-Duration-Parse-0.12/Changes
new/Time-Duration-Parse-0.13/Changes
--- old/Time-Duration-Parse-0.12/Changes 2015-07-02 22:56:55.000000000
+0200
+++ new/Time-Duration-Parse-0.13/Changes 2015-10-25 11:20:37.000000000
+0100
@@ -1,5 +1,12 @@
Revision history for Perl extension Time::Duration::Parse
+0.13 2015-10-25 NEILB
+ - Added additional abbrevations for 'months': 'mo', 'mon', 'mons'.
+ Thanks to PERLANCAR.
+ - Rewrote the main testsuite to be data driven, to make it easy to
+ add test cases, as for the above change.
+ - Updated github repo URL after changing my github username
+
0.12 2015-07-02 NEILB
- Added [MetaJSON] to dist.ini, so the dist will get a META.json file.
RT#105627 from ETHER.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Time-Duration-Parse-0.12/MANIFEST
new/Time-Duration-Parse-0.13/MANIFEST
--- old/Time-Duration-Parse-0.12/MANIFEST 2015-07-02 22:56:55.000000000
+0200
+++ new/Time-Duration-Parse-0.13/MANIFEST 2015-10-25 11:20:37.000000000
+0100
@@ -1,4 +1,4 @@
-# This file was automatically generated by Dist::Zilla::Plugin::Manifest
v5.032.
+# This file was automatically generated by Dist::Zilla::Plugin::Manifest
v5.037.
Changes
LICENSE
MANIFEST
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Time-Duration-Parse-0.12/META.json
new/Time-Duration-Parse-0.13/META.json
--- old/Time-Duration-Parse-0.12/META.json 2015-07-02 22:56:55.000000000
+0200
+++ new/Time-Duration-Parse-0.13/META.json 2015-10-25 11:20:37.000000000
+0100
@@ -4,13 +4,13 @@
"Tatsuhiko Miyagawa <[email protected]>"
],
"dynamic_config" : 0,
- "generated_by" : "Dist::Zilla version 5.032, CPAN::Meta::Converter version
2.150001",
+ "generated_by" : "Dist::Zilla version 5.037, CPAN::Meta::Converter version
2.150005",
"license" : [
"perl_5"
],
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
- "version" : "2"
+ "version" : 2
},
"name" : "Time-Duration-Parse",
"prereqs" : {
@@ -37,13 +37,13 @@
},
"release_status" : "stable",
"resources" : {
- "homepage" : "https://github.com/neilbowers/Time-Duration-Parse",
+ "homepage" : "https://github.com/neilb/Time-Duration-Parse",
"repository" : {
"type" : "git",
- "url" : "https://github.com/neilbowers/Time-Duration-Parse.git",
- "web" : "https://github.com/neilbowers/Time-Duration-Parse"
+ "url" : "https://github.com/neilb/Time-Duration-Parse.git",
+ "web" : "https://github.com/neilb/Time-Duration-Parse"
}
},
- "version" : "0.12"
+ "version" : "0.13"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Time-Duration-Parse-0.12/META.yml
new/Time-Duration-Parse-0.13/META.yml
--- old/Time-Duration-Parse-0.12/META.yml 2015-07-02 22:56:55.000000000
+0200
+++ new/Time-Duration-Parse-0.13/META.yml 2015-10-25 11:20:37.000000000
+0100
@@ -8,7 +8,7 @@
configure_requires:
ExtUtils::MakeMaker: '0'
dynamic_config: 0
-generated_by: 'Dist::Zilla version 5.032, CPAN::Meta::Converter version
2.150001'
+generated_by: 'Dist::Zilla version 5.037, CPAN::Meta::Converter version
2.150005'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -21,6 +21,6 @@
strict: '0'
warnings: '0'
resources:
- homepage: https://github.com/neilbowers/Time-Duration-Parse
- repository: https://github.com/neilbowers/Time-Duration-Parse.git
-version: '0.12'
+ homepage: https://github.com/neilb/Time-Duration-Parse
+ repository: https://github.com/neilb/Time-Duration-Parse.git
+version: '0.13'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Time-Duration-Parse-0.12/Makefile.PL
new/Time-Duration-Parse-0.13/Makefile.PL
--- old/Time-Duration-Parse-0.12/Makefile.PL 2015-07-02 22:56:55.000000000
+0200
+++ new/Time-Duration-Parse-0.13/Makefile.PL 2015-10-25 11:20:37.000000000
+0100
@@ -1,4 +1,4 @@
-# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker
v5.032.
+# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker
v5.037.
use strict;
use warnings;
@@ -27,7 +27,7 @@
"Test::More" => "0.88",
"Time::Duration" => 0
},
- "VERSION" => "0.12",
+ "VERSION" => "0.13",
"test" => {
"TESTS" => "t/*.t"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Time-Duration-Parse-0.12/README
new/Time-Duration-Parse-0.13/README
--- old/Time-Duration-Parse-0.12/README 2015-07-02 22:56:55.000000000 +0200
+++ new/Time-Duration-Parse-0.13/README 2015-10-25 11:20:37.000000000 +0100
@@ -1,7 +1,7 @@
This archive contains the distribution Time-Duration-Parse,
-version 0.12:
+version 0.13:
Parse string that represents time duration
@@ -11,5 +11,5 @@
the same terms as the Perl 5 programming language system itself.
-This README file was generated by Dist::Zilla::Plugin::Readme v5.032.
+This README file was generated by Dist::Zilla::Plugin::Readme v5.037.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Time-Duration-Parse-0.12/dist.ini
new/Time-Duration-Parse-0.13/dist.ini
--- old/Time-Duration-Parse-0.12/dist.ini 2015-07-02 22:56:55.000000000
+0200
+++ new/Time-Duration-Parse-0.13/dist.ini 2015-10-25 11:20:37.000000000
+0100
@@ -4,10 +4,13 @@
copyright_holder = Tatsuhiko Miyagawa
copyright_year = 2006
-version = 0.12
+version = 0.13
[@Basic]
[PkgVersion]
[AutoPrereqs]
[MetaJSON]
[GithubMeta]
+[Git::Tag]
+tag_message=
+[Git::Push]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Time-Duration-Parse-0.12/lib/Time/Duration/Parse.pm
new/Time-Duration-Parse-0.13/lib/Time/Duration/Parse.pm
--- old/Time-Duration-Parse-0.12/lib/Time/Duration/Parse.pm 2015-07-02
22:56:55.000000000 +0200
+++ new/Time-Duration-Parse-0.13/lib/Time/Duration/Parse.pm 2015-10-25
11:20:37.000000000 +0100
@@ -1,5 +1,5 @@
package Time::Duration::Parse;
-$Time::Duration::Parse::VERSION = '0.12';
+$Time::Duration::Parse::VERSION = '0.13';
use 5.006;
use strict;
use warnings;
@@ -15,7 +15,7 @@
map(($_, 60*60), qw(h hr hour hours)),
map(($_, 60*60*24), qw(d day days)),
map(($_, 60*60*24*7), qw(w week weeks)),
- map(($_, 60*60*24*30), qw(M month months)),
+ map(($_, 60*60*24*30), qw(M month months mo mon mons)),
map(($_, 60*60*24*365), qw(y year years)) );
sub parse_duration {
@@ -115,7 +115,7 @@
=head1 REPOSITORY
-L<https://github.com/neilbowers/Time-Duration-Parse>
+L<https://github.com/neilb/Time-Duration-Parse>
=head1 AUTHOR
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Time-Duration-Parse-0.12/t/01_parse.t
new/Time-Duration-Parse-0.13/t/01_parse.t
--- old/Time-Duration-Parse-0.12/t/01_parse.t 2015-07-02 22:56:55.000000000
+0200
+++ new/Time-Duration-Parse-0.13/t/01_parse.t 2015-10-25 11:20:37.000000000
+0100
@@ -1,8 +1,75 @@
use strict;
-use Test::More 0.88 tests => 38;
+use Test::More 0.88;
use Time::Duration::Parse;
+my @GOOD_TIME_SPECS = (
+ ['3', 3],
+ ['3 seconds', 3],
+ ['3 Seconds', 3],
+ ['3 s', 3],
+ ['6 minutes', 360],
+ ['6 minutes and 3 seconds', 363],
+ ['6 Minutes and 3 seconds', 363],
+ ['1 day', 86400],
+ ['1 day, and 3 seconds', 86403],
+ ['-1 seconds', -1],
+ ['-6 minutes', -360],
+
+ ['1 hr', 3600],
+ ['3s', 3],
+ ['1hr', 3600],
+ ['+2h', 7200],
+
+ ['1d 2:03', 93780],
+ ['1d 2:03:01', 93781],
+ ['1d -24:00', 0],
+ ['2:03', 7380],
+
+ [' 1s ', 1],
+ [' 1 ', 1],
+ [' 1.3 ', 1],
+
+ ['1.5h', 5400],
+ ['1,5h', 5400],
+ ['1.5h 30m', 7200],
+ ['1.9s', 2], # Check rounding
+ ['1.3s', 1],
+ ['1.3', 1],
+ ['1.9', 2],
+
+ ['1h,30m, 3s', 5403],
+ ['1h and 30m,3s', 5403],
+ ['1,5h, 3s', 5403],
+ ['1,5h and 3s', 5403],
+ ['1.5h, 3s', 5403],
+ ['1.5h and 3s', 5403],
+
+ ['1 month', 2592000],
+ ['2 months', 5184000],
+ ['2 mo', 5184000],
+ ['2 mon', 5184000],
+ ['2 mons', 5184000],
+);
+
+
+my @BAD_TIME_SPECS = (
+ '3 sss',
+ '6 minutes and 3 sss',
+ '6 minutes, and 3 seconds a',
+);
+
+plan tests => int(@GOOD_TIME_SPECS) + int(@BAD_TIME_SPECS);
+
+foreach my $test (@GOOD_TIME_SPECS) {
+ my ($spec, $expected_seconds) = @$test;
+ ok_duration($spec, $expected_seconds);
+}
+
+foreach my $spec (@BAD_TIME_SPECS) {
+ fail_duration($spec);
+}
+
sub ok_duration {
my($spec, $seconds) = @_;
is parse_duration($spec), $seconds, "$spec = $seconds";
@@ -13,48 +80,3 @@
eval { parse_duration($spec) };
ok $@, $@;
}
-
-ok_duration '3', 3;
-ok_duration '3 seconds', 3;
-ok_duration '3 Seconds', 3;
-ok_duration '3 s', 3;
-ok_duration '6 minutes', 360;
-ok_duration '6 minutes and 3 seconds', 363;
-ok_duration '6 Minutes and 3 seconds', 363;
-ok_duration '1 day', 86400;
-ok_duration '1 day, and 3 seconds', 86403;
-ok_duration '-1 seconds', -1;
-ok_duration '-6 minutes', -360;
-
-ok_duration '1 hr', 3600;
-ok_duration '3s', 3;
-ok_duration '1hr', 3600;
-ok_duration '+2h', 7200;
-
-ok_duration '1d 2:03', 93780;
-ok_duration '1d 2:03:01', 93781;
-ok_duration '1d -24:00', 0;
-ok_duration '2:03', 7380;
-
-ok_duration ' 1s ', 1;
-ok_duration ' 1 ', 1;
-ok_duration ' 1.3 ', 1;
-
-ok_duration '1.5h', 5400;
-ok_duration '1,5h', 5400;
-ok_duration '1.5h 30m', 7200;
-ok_duration '1.9s', 2; # Check rounding
-ok_duration '1.3s', 1;
-ok_duration '1.3', 1;
-ok_duration '1.9', 2;
-
-ok_duration '1h,30m, 3s', 5403;
-ok_duration '1h and 30m,3s', 5403;
-ok_duration '1,5h, 3s', 5403;
-ok_duration '1,5h and 3s', 5403;
-ok_duration '1.5h, 3s', 5403;
-ok_duration '1.5h and 3s', 5403;
-
-fail_duration '3 sss';
-fail_duration '6 minutes and 3 sss';
-fail_duration '6 minutes, and 3 seconds a';