Update to 0.38
- New upstream release 0.38 - Cope with GLD output changes in version 0.103 (GH#13)
This commit is contained in:
parent
87383fdabc
commit
f37abef7aa
@ -1,78 +0,0 @@
|
|||||||
commit 91da15eed08ede5d7486ccc3eec9b70ae493d627
|
|
||||||
Author: Paul Howarth <paul@city-fan.org>
|
|
||||||
Date: Tue Aug 21 16:47:12 2018 +0100
|
|
||||||
|
|
||||||
Cope with GLD output changes in version 0.103
|
|
||||||
|
|
||||||
The output text format of Getopt::Long::Descriptive changed yet again
|
|
||||||
at version 0.103 and broke some of the tests. This change fixes the
|
|
||||||
tests without breaking compatibility with older versions of
|
|
||||||
Getopt::Long::Descriptive.
|
|
||||||
|
|
||||||
diff --git a/t/104_override_usage.t b/t/104_override_usage.t
|
|
||||||
index bdee6c6..bc45029 100644
|
|
||||||
--- a/t/104_override_usage.t
|
|
||||||
+++ b/t/104_override_usage.t
|
|
||||||
@@ -55,9 +55,15 @@ use Test::Exception;
|
|
||||||
\t--foo INT A foo
|
|
||||||
}
|
|
||||||
:
|
|
||||||
+ $Getopt::Long::Descriptive::VERSION < 0.103 ?
|
|
||||||
qq{usage: 104_override_usage.t [-?] [long options...]
|
|
||||||
\t-? --usage --help Prints this usage information.
|
|
||||||
\t--foo INT A foo
|
|
||||||
+}
|
|
||||||
+ :
|
|
||||||
+ qq{usage: 104_override_usage.t [-?] [long options...]
|
|
||||||
+\t-? --[no-]usage --[no-]help Prints this usage information.
|
|
||||||
+\t--foo INT A foo
|
|
||||||
}
|
|
||||||
|
|
||||||
];
|
|
||||||
diff --git a/t/107_no_auto_help.t b/t/107_no_auto_help.t
|
|
||||||
index 1091fd2..27f87f5 100644
|
|
||||||
--- a/t/107_no_auto_help.t
|
|
||||||
+++ b/t/107_no_auto_help.t
|
|
||||||
@@ -60,7 +60,7 @@ END {
|
|
||||||
warning_like {
|
|
||||||
throws_ok { Class->new_with_options }
|
|
||||||
#usage: 107_no_auto_help.t [-?] [long options...]
|
|
||||||
- qr/^usage: [\d\w]+\Q.t [-?] [long options...]\E.\s+\Q-? --usage --help\E\s+\QPrints this usage information.\E.\s+--configfile/ms,
|
|
||||||
+ qr/^usage: [\d\w]+\Q.t [-?] [long options...]\E.\s+\Q-? --\E(\[no-\])?usage --(\[no-\])?\Qhelp\E\s+\QPrints this usage information.\E.\s+--configfile/ms,
|
|
||||||
'usage information looks good';
|
|
||||||
}
|
|
||||||
qr/^Specified configfile \'this_value_unimportant\' does not exist, is empty, or is not readable$/,
|
|
||||||
diff --git a/t/109_help_flag.t b/t/109_help_flag.t
|
|
||||||
index adc6e0c..8c658e2 100644
|
|
||||||
--- a/t/109_help_flag.t
|
|
||||||
+++ b/t/109_help_flag.t
|
|
||||||
@@ -40,7 +40,7 @@ foreach my $args ( ['--help'], ['--usage'], ['--?'], ['-?'] )
|
|
||||||
local @ARGV = @$args;
|
|
||||||
|
|
||||||
throws_ok { MyClass->new_with_options() }
|
|
||||||
- qr/^usage: (?:[\d\w]+)\Q.t [-?] [long options...]\E.^\t\Q-? --usage --help\E\s+\QPrints this usage information.\E$/ms,
|
|
||||||
+ qr/^usage: (?:[\d\w]+)\Q.t [-?] [long options...]\E.^\t\Q-? --\E(\[no-\])?usage --(\[no-\])?help\s+\QPrints this usage information.\E$/ms,
|
|
||||||
'Help request detected; usage information properly printed';
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/t/110_sort_usage_by_attr_order.t b/t/110_sort_usage_by_attr_order.t
|
|
||||||
index 3eb4a49..e7dd177 100644
|
|
||||||
--- a/t/110_sort_usage_by_attr_order.t
|
|
||||||
+++ b/t/110_sort_usage_by_attr_order.t
|
|
||||||
@@ -54,6 +54,16 @@ usage: 110_sort_usage_by_attr_order.t [-?] [long options...]
|
|
||||||
--baz STR Documentation for "baz"
|
|
||||||
USAGE
|
|
||||||
}
|
|
||||||
+if ( $Getopt::Long::Descriptive::VERSION >= 0.103 )
|
|
||||||
+{
|
|
||||||
+$expected = <<'USAGE';
|
|
||||||
+usage: 110_sort_usage_by_attr_order.t [-?] [long options...]
|
|
||||||
+ -? --[no-]usage --[no-]help Prints this usage information.
|
|
||||||
+ --foo STR Documentation for "foo"
|
|
||||||
+ --bar STR Documentation for "bar"
|
|
||||||
+ --baz STR Documentation for "baz"
|
|
||||||
+USAGE
|
|
||||||
+}
|
|
||||||
$expected =~ s/^[ ]{4}/\t/xmsg;
|
|
||||||
is($obj->usage->text, $expected, 'Usage text has nicely sorted options');
|
|
||||||
|
|
@ -1,11 +1,10 @@
|
|||||||
Name: perl-MouseX-Getopt
|
Name: perl-MouseX-Getopt
|
||||||
Summary: Mouse role for processing command line options
|
Summary: Mouse role for processing command line options
|
||||||
Version: 0.37
|
Version: 0.38
|
||||||
Release: 10%{?dist}
|
Release: 1%{?dist}
|
||||||
License: GPL+ or Artistic
|
License: GPL+ or Artistic
|
||||||
URL: https://metacpan.org/release/MouseX-Getopt
|
URL: https://metacpan.org/release/MouseX-Getopt
|
||||||
Source0: https://cpan.metacpan.org/authors/id/G/GF/GFUJI/MouseX-Getopt-%{version}.tar.gz
|
Source0: https://cpan.metacpan.org/modules/by-module/MouseX/MouseX-Getopt-%{version}.tar.gz
|
||||||
Patch0: MouseX-Getopt-0.37-gld103.patch
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
# Module Build
|
# Module Build
|
||||||
BuildRequires: perl-generators
|
BuildRequires: perl-generators
|
||||||
@ -49,9 +48,6 @@ objects using parameters passed in from the command line.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n MouseX-Getopt-%{version}
|
%setup -q -n MouseX-Getopt-%{version}
|
||||||
|
|
||||||
# Fix compatibility with GLD 0.103 (GH#12, GH#13)
|
|
||||||
%patch0 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
perl Build.PL --installdirs=vendor
|
perl Build.PL --installdirs=vendor
|
||||||
./Build
|
./Build
|
||||||
@ -63,7 +59,7 @@ perl Build.PL --installdirs=vendor
|
|||||||
./Build test
|
./Build test
|
||||||
|
|
||||||
%files
|
%files
|
||||||
# Note: malformed LICENSE file in 0.35 .. 0.37 not shipped
|
# Note: malformed LICENSE file in 0.35 .. 0.38 not shipped
|
||||||
# https://github.com/gfx/mousex-getopt/issues/2
|
# https://github.com/gfx/mousex-getopt/issues/2
|
||||||
%doc Changes README.md
|
%doc Changes README.md
|
||||||
%{perl_vendorlib}/MouseX/
|
%{perl_vendorlib}/MouseX/
|
||||||
@ -79,6 +75,10 @@ perl Build.PL --installdirs=vendor
|
|||||||
%{_mandir}/man3/MouseX::Getopt::Strict.3*
|
%{_mandir}/man3/MouseX::Getopt::Strict.3*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jan 28 2019 Paul Howarth <paul@city-fan.org> - 0.38-1
|
||||||
|
- Update to 0.38
|
||||||
|
- Cope with GLD output changes in version 0.103 (GH#13)
|
||||||
|
|
||||||
* Tue Aug 21 2018 Paul Howarth <paul@city-fan.org> - 0.37-10
|
* Tue Aug 21 2018 Paul Howarth <paul@city-fan.org> - 0.37-10
|
||||||
- Fix compatibility with GLD 0.103 (GH#12, GH#13)
|
- Fix compatibility with GLD 0.103 (GH#12, GH#13)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user