Hello community,
here is the log from the commit of package perl-Mojolicious for
openSUSE:Leap:15.2 checked in at 2020-05-12 11:31:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/perl-Mojolicious (Old)
and /work/SRC/openSUSE:Leap:15.2/.perl-Mojolicious.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Mojolicious"
Tue May 12 11:31:55 2020 rev:101 rq:801337 version:8.42
Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/perl-Mojolicious/perl-Mojolicious.changes
2020-05-01 15:06:41.694485887 +0200
+++
/work/SRC/openSUSE:Leap:15.2/.perl-Mojolicious.new.2738/perl-Mojolicious.changes
2020-05-12 11:32:10.239715414 +0200
@@ -1,0 +2,29 @@
+Tue May 5 03:12:00 UTC 2020 - Tina Müller <[email protected]>
+
+updated to 8.42
+ see /usr/share/doc/packages/perl-Mojolicious/Changes
+
+ 8.42 2020-05-04
+ - This release contains fixes for security issues, everybody should
upgrade!
+ - Added EXPERIMENTAL support for :any-link pseudo-class to Mojo::DOM::CSS.
+ - Added EXPERIMENTAL support for case-sensitive attribute selectors like
+ [foo="bar" s] to Mojo::DOM::CSS
+ - Renamed experimental :matches pseudo-class to :is in Mojo::DOM::CSS.
+ - Fixed a security issue that allowed for _method query parameters to be
used
+ with GET requests.
+ - Fixed a bug in Mojo::DOM::CSS where the case-sensitivity identifier was
+ case-sensitive.
+
+
+-------------------------------------------------------------------
+Sat May 2 03:13:43 UTC 2020 - Tina Müller <[email protected]>
+
+updated to 8.41
+ see /usr/share/doc/packages/perl-Mojolicious/Changes
+
+ 8.41 2020-04-30
+ - Improved Mojolicious::Commands to treat commands like
+ "mojo generate lite_app" as "mojo generate lite-app".
+
+
+-------------------------------------------------------------------
Old:
----
Mojolicious-8.40.tar.gz
New:
----
Mojolicious-8.42.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Mojolicious.spec ++++++
--- /var/tmp/diff_new_pack.N3yBaz/_old 2020-05-12 11:32:10.555716077 +0200
+++ /var/tmp/diff_new_pack.N3yBaz/_new 2020-05-12 11:32:10.563716094 +0200
@@ -1,7 +1,7 @@
#
# spec file for package perl-Mojolicious
#
-# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,13 +17,13 @@
Name: perl-Mojolicious
-Version: 8.40
+Version: 8.42
Release: 0
%define cpan_name Mojolicious
Summary: Real-time web framework
License: Artistic-2.0
Group: Development/Libraries/Perl
-Url: https://metacpan.org/release/%{cpan_name}
+URL: https://metacpan.org/release/%{cpan_name}
Source0:
https://cpan.metacpan.org/authors/id/S/SR/SRI/%{cpan_name}-%{version}.tar.gz
Source1: cpanspec.yml
BuildArch: noarch
++++++ Mojolicious-8.40.tar.gz -> Mojolicious-8.42.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-8.40/Changes new/Mojolicious-8.42/Changes
--- old/Mojolicious-8.40/Changes 2020-04-23 11:21:27.000000000 +0200
+++ new/Mojolicious-8.42/Changes 2020-05-04 18:58:21.000000000 +0200
@@ -1,4 +1,19 @@
+8.42 2020-05-04
+ - This release contains fixes for security issues, everybody should upgrade!
+ - Added EXPERIMENTAL support for :any-link pseudo-class to Mojo::DOM::CSS.
+ - Added EXPERIMENTAL support for case-sensitive attribute selectors like
+ [foo="bar" s] to Mojo::DOM::CSS
+ - Renamed experimental :matches pseudo-class to :is in Mojo::DOM::CSS.
+ - Fixed a security issue that allowed for _method query parameters to be used
+ with GET requests.
+ - Fixed a bug in Mojo::DOM::CSS where the case-sensitivity identifier was
+ case-sensitive.
+
+8.41 2020-04-30
+ - Improved Mojolicious::Commands to treat commands like
+ "mojo generate lite_app" as "mojo generate lite-app".
+
8.40 2020-04-23
- Fixed support for disabling the inactivity timeout in Mojo::UserAgent.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-8.40/MANIFEST
new/Mojolicious-8.42/MANIFEST
--- old/Mojolicious-8.40/MANIFEST 2020-04-23 11:23:19.000000000 +0200
+++ new/Mojolicious-8.42/MANIFEST 2020-05-04 19:14:24.000000000 +0200
@@ -282,6 +282,7 @@
t/mojolicious/lib/MojoliciousConfigTest.pm
t/mojolicious/lib/MojoliciousTest.pm
t/mojolicious/lib/MojoliciousTest/Baz.pm
+t/mojolicious/lib/MojoliciousTest/Command/_test2_command.pm
t/mojolicious/lib/MojoliciousTest/Command/test_command.pm
t/mojolicious/lib/MojoliciousTest/Exceptional.pm
t/mojolicious/lib/MojoliciousTest/Foo.pm
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-8.40/META.json
new/Mojolicious-8.42/META.json
--- old/Mojolicious-8.40/META.json 2020-04-23 11:23:19.000000000 +0200
+++ new/Mojolicious-8.42/META.json 2020-05-04 19:14:24.000000000 +0200
@@ -62,6 +62,6 @@
},
"x_IRC" : "irc://irc.freenode.net/#mojo"
},
- "version" : "8.40",
+ "version" : "8.42",
"x_serialization_backend" : "JSON::PP version 4.04"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-8.40/META.yml
new/Mojolicious-8.42/META.yml
--- old/Mojolicious-8.40/META.yml 2020-04-23 11:23:19.000000000 +0200
+++ new/Mojolicious-8.42/META.yml 2020-05-04 19:14:24.000000000 +0200
@@ -34,5 +34,5 @@
homepage: https://mojolicious.org
license: http://www.opensource.org/licenses/artistic-license-2.0
repository: https://github.com/mojolicious/mojo.git
-version: '8.40'
+version: '8.42'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-8.40/lib/Mojo/DOM/CSS.pm
new/Mojolicious-8.42/lib/Mojo/DOM/CSS.pm
--- old/Mojolicious-8.40/lib/Mojo/DOM/CSS.pm 2020-03-30 11:31:15.000000000
+0200
+++ new/Mojolicious-8.42/lib/Mojo/DOM/CSS.pm 2020-05-01 22:08:48.000000000
+0200
@@ -12,7 +12,7 @@
(?:
(\W)?= # Operator
(?:"((?:\\"|[^"])*)"|'((?:\\'|[^'])*)'|([^\]]+?)) # Value
- (?:\s+(i))? # Case-sensitivity
+ (?:\s+(?:(i|I)|s|S))? # Case-sensitivity
)?
\]
/x;
@@ -102,8 +102,8 @@
elsif ($css =~ /\G:([\w\-]+)(?:\(((?:\([^)]+\)|[^)])+)\))?/gcs) {
my ($name, $args) = (lc $1, $2);
- # ":matches" and ":not" (contains more selectors)
- $args = _compile($args, %ns) if $name eq 'matches' || $name eq 'not';
+ # ":is" and ":not" (contains more selectors)
+ $args = _compile($args, %ns) if $name eq 'is' || $name eq 'not';
# ":nth-*" (with An+B notation)
$args = _equation($args) if $name =~ /^nth-/;
@@ -183,8 +183,8 @@
# ":not"
return !_match($args, $current, $current) if $class eq 'not';
- # ":matches"
- return !!_match($args, $current, $current) if $class eq 'matches';
+ # ":is"
+ return !!_match($args, $current, $current) if $class eq 'is';
# ":empty"
return !grep { !_empty($_) } @$current[4 .. $#$current] if $class eq 'empty';
@@ -192,8 +192,8 @@
# ":root"
return $current->[3] && $current->[3][0] eq 'root' if $class eq 'root';
- # ":link" and ":visited"
- if ($class eq 'link' || $class eq 'visited') {
+ # ":any-link", ":link" and ":visited"
+ if ($class eq 'any-link' || $class eq 'link' || $class eq 'visited') {
return undef unless $current->[0] eq 'tag' && exists $current->[2]{href};
return !!grep { $current->[1] eq $_ } qw(a area link);
}
@@ -397,6 +397,18 @@
L<Selectors Level 4|http://dev.w3.org/csswg/selectors-4>, which is still a work
in progress.
+=head2 E[foo="bar" s]
+
+An C<E> element whose C<foo> attribute value is exactly and case-sensitively
+equal to C<bar>. Note that this selector is B<EXPERIMENTAL> and might change
+without warning!
+
+ my $case_sensitive = $css->select('input[type="hidden" s]');
+
+This selector is part of
+L<Selectors Level 4|http://dev.w3.org/csswg/selectors-4>, which is still a work
+in progress.
+
=head2 E[foo~="bar"]
An C<E> element whose C<foo> attribute value is a list of whitespace-separated
@@ -519,13 +531,21 @@
my $empty = $css->select(':empty');
+=head2 E:any-link
+
+Alias for L</"E:link">. Note that this selector is B<EXPERIMENTAL> and might
+change without warning! This selector is part of
+L<Selectors Level 4|http://dev.w3.org/csswg/selectors-4>, which is still a work
+in progress.
+
=head2 E:link
An C<E> element being the source anchor of a hyperlink of which the target is
not yet visited (C<:link>) or already visited (C<:visited>). Note that
-L<Mojo::DOM::CSS> is not stateful, therefore C<:link> and C<:visited> yield
-exactly the same results.
+L<Mojo::DOM::CSS> is not stateful, therefore C<:any-link>, C<:link> and
+C<:visited> yield exactly the same results.
+ my $links = $css->select(':any-link');
my $links = $css->select(':link');
my $links = $css->select(':visited');
@@ -564,13 +584,13 @@
L<Selectors Level 4|http://dev.w3.org/csswg/selectors-4>, which is still a work
in progress.
-=head2 E:matches(s1, s2)
+=head2 E:is(s1, s2)
An C<E> element that matches compound selector C<s1> and/or compound selector
C<s2>. Note that this selector is B<EXPERIMENTAL> and might change without
warning!
- my $headers = $css->select(':matches(section, article, aside, nav) h1');
+ my $headers = $css->select(':is(section, article, aside, nav) h1');
This selector is part of
L<Selectors Level 4|http://dev.w3.org/csswg/selectors-4>, which is still a work
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Mojolicious-8.40/lib/Mojolicious/Command/Author/generate/lite_app.pm
new/Mojolicious-8.42/lib/Mojolicious/Command/Author/generate/lite_app.pm
--- old/Mojolicious-8.40/lib/Mojolicious/Command/Author/generate/lite_app.pm
2020-04-21 21:48:51.000000000 +0200
+++ new/Mojolicious-8.42/lib/Mojolicious/Command/Author/generate/lite_app.pm
2020-04-30 17:59:03.000000000 +0200
@@ -20,10 +20,10 @@
=head1 SYNOPSIS
- Usage: APPLICATION generate lite_app [OPTIONS] [NAME]
+ Usage: APPLICATION generate lite-app [OPTIONS] [NAME]
- mojo generate lite_app
- mojo generate lite_app foo.pl
+ mojo generate lite-app
+ mojo generate lite-app foo.pl
Options:
-h, --help Show this summary of available options
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Mojolicious-8.40/lib/Mojolicious/Command/Author/generate.pm
new/Mojolicious-8.42/lib/Mojolicious/Command/Author/generate.pm
--- old/Mojolicious-8.40/lib/Mojolicious/Command/Author/generate.pm
2020-04-21 21:48:51.000000000 +0200
+++ new/Mojolicious-8.42/lib/Mojolicious/Command/Author/generate.pm
2020-04-30 17:59:03.000000000 +0200
@@ -25,7 +25,7 @@
Usage: APPLICATION generate GENERATOR [OPTIONS]
mojo generate app
- mojo generate lite_app
+ mojo generate lite-app
=head1 DESCRIPTION
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-8.40/lib/Mojolicious/Commands.pm
new/Mojolicious-8.42/lib/Mojolicious/Commands.pm
--- old/Mojolicious-8.40/lib/Mojolicious/Commands.pm 2020-03-30
11:31:27.000000000 +0200
+++ new/Mojolicious-8.42/lib/Mojolicious/Commands.pm 2020-04-30
17:59:03.000000000 +0200
@@ -35,7 +35,8 @@
if (!$ENV{MOJO_NO_DETECT} && (my $env = $self->detect)) { $name = $env }
# Run command
- if ($name && $name =~ /^\w+$/ && ($name ne 'help' || $args[0])) {
+ if ($name && $name =~ /^\w[\w-]+$/ && ($name ne 'help' || $args[0])) {
+ $name =~ s/-/_/g;
# Help
$name = shift @args if my $help = $name eq 'help';
@@ -68,7 +69,12 @@
for grep { _command($_) } find_modules($ns), find_packages($ns);
}
- my @rows = map { [" $_", $all{$_}] } sort keys %all;
+ my @rows;
+ for my $class (sort keys %all) {
+ my $command = $class;
+ $command =~ s/(?<!^)_/-/g;
+ push @rows, [" $command", $all{$class}];
+ }
return print $self->message, tablify(\@rows), $self->hint;
}
@@ -106,7 +112,7 @@
Usage: APPLICATION COMMAND [OPTIONS]
mojo version
- mojo generate lite_app
+ mojo generate lite-app
./myapp.pl daemon -m production -l http://*:8080
./myapp.pl get /foo
./myapp.pl routes -v
@@ -177,9 +183,9 @@
Use L<Mojolicious::Command::Author::generate::app> to generate application
directory structure for a fully functional L<Mojolicious> application.
-=head2 generate lite_app
+=head2 generate lite-app
- $ mojo generate lite_app
+ $ mojo generate lite-app
Use L<Mojolicious::Command::Author::generate::lite_app> to generate a fully
functional L<Mojolicious::Lite> application.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-8.40/lib/Mojolicious/Guides/Cookbook.pod
new/Mojolicious-8.42/lib/Mojolicious/Guides/Cookbook.pod
--- old/Mojolicious-8.40/lib/Mojolicious/Guides/Cookbook.pod 2020-04-22
18:53:35.000000000 +0200
+++ new/Mojolicious-8.42/lib/Mojolicious/Guides/Cookbook.pod 2020-04-30
17:59:03.000000000 +0200
@@ -1797,7 +1797,7 @@
L<Mojolicious::Command::eval> you can do just that, the application object
itself can be accessed via C<app>.
- $ mojo generate lite_app myapp.pl
+ $ mojo generate lite-app myapp.pl
$ ./myapp.pl eval 'say for @{app->static->paths}'
$ ./myapp.pl eval 'say for sort keys %{app->renderer->helpers}'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-8.40/lib/Mojolicious/Guides/Growing.pod
new/Mojolicious-8.42/lib/Mojolicious/Guides/Growing.pod
--- old/Mojolicious-8.40/lib/Mojolicious/Guides/Growing.pod 2020-03-30
11:30:57.000000000 +0200
+++ new/Mojolicious-8.42/lib/Mojolicious/Guides/Growing.pod 2020-04-30
17:59:03.000000000 +0200
@@ -167,7 +167,7 @@
L<Mojolicious::Command::Author::generate::lite_app> and
L<Mojolicious::Command::Author::generate::app>.
- $ mojo generate lite_app myapp.pl
+ $ mojo generate lite-app myapp.pl
$ mojo generate app MyApp
Feature-wise both are almost equal, the only real differences are
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-8.40/lib/Mojolicious/Guides/Testing.pod
new/Mojolicious-8.42/lib/Mojolicious/Guides/Testing.pod
--- old/Mojolicious-8.40/lib/Mojolicious/Guides/Testing.pod 2020-03-31
18:39:11.000000000 +0200
+++ new/Mojolicious-8.42/lib/Mojolicious/Guides/Testing.pod 2020-05-01
18:58:43.000000000 +0200
@@ -669,7 +669,7 @@
sub location_is {
my ($self, $value, $desc) = @_;
$desc ||= "Location: $value";
- return $self->test('is', $t->tx->res->headers->location, $value, $desc);
+ return $self->test('is', $self->tx->res->headers->location, $value, $desc);
}
1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-8.40/lib/Mojolicious/Guides/Tutorial.pod
new/Mojolicious-8.42/lib/Mojolicious/Guides/Tutorial.pod
--- old/Mojolicious-8.40/lib/Mojolicious/Guides/Tutorial.pod 2020-04-21
21:46:29.000000000 +0200
+++ new/Mojolicious-8.42/lib/Mojolicious/Guides/Tutorial.pod 2020-04-30
17:59:03.000000000 +0200
@@ -38,7 +38,7 @@
With L<Mojolicious::Command::Author::generate::lite_app> there is also a helper
command to generate a small example application.
- $ mojo generate lite_app myapp.pl
+ $ mojo generate lite-app myapp.pl
=head2 Commands
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-8.40/lib/Mojolicious/Routes.pm
new/Mojolicious-8.42/lib/Mojolicious/Routes.pm
--- old/Mojolicious-8.40/lib/Mojolicious/Routes.pm 2020-03-30
11:31:27.000000000 +0200
+++ new/Mojolicious-8.42/lib/Mojolicious/Routes.pm 2020-05-04
18:52:54.000000000 +0200
@@ -75,8 +75,10 @@
else { $path = $req->url->path->to_route }
# Method (HEAD will be treated as GET)
- my $method = uc($req->url->query->clone->param('_method') || $req->method);
- $method = 'GET' if $method eq 'HEAD';
+ my $method = uc $req->method;
+ my $override = $req->url->query->clone->param('_method');
+ $method = uc $override if $override && $method eq 'POST';
+ $method = 'GET' if $method eq 'HEAD';
# Check cache
my $ws = $c->tx->is_websocket ? 1 : 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-8.40/lib/Mojolicious/Validator.pm
new/Mojolicious-8.42/lib/Mojolicious/Validator.pm
--- old/Mojolicious-8.40/lib/Mojolicious/Validator.pm 2020-03-30
11:31:20.000000000 +0200
+++ new/Mojolicious-8.42/lib/Mojolicious/Validator.pm 2020-04-30
17:59:03.000000000 +0200
@@ -162,6 +162,14 @@
Registered validation checks, by default only L</"equal_to">, L</"in">,
L</"like">, L</"num">, L</"size"> and L</"upload"> are already defined.
+=head2 filters
+
+ my $filters = $validator->filters;
+ $validator = $validator->filters({trim => sub {...}});
+
+Registered filters, by default only L</"not_empty"> and L</"trim"> are already
+defined.
+
=head1 METHODS
L<Mojolicious::Validator> inherits all methods from L<Mojo::Base> and
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-8.40/lib/Mojolicious.pm
new/Mojolicious-8.42/lib/Mojolicious.pm
--- old/Mojolicious-8.40/lib/Mojolicious.pm 2020-04-22 14:49:31.000000000
+0200
+++ new/Mojolicious-8.42/lib/Mojolicious.pm 2020-05-01 15:35:06.000000000
+0200
@@ -59,7 +59,7 @@
has validator => sub { Mojolicious::Validator->new };
our $CODENAME = 'Supervillain';
-our $VERSION = '8.40';
+our $VERSION = '8.42';
sub BUILD_DYNAMIC {
my ($class, $method, $dyn_methods) = @_;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-8.40/lib/Test/Mojo.pm
new/Mojolicious-8.42/lib/Test/Mojo.pm
--- old/Mojolicious-8.40/lib/Test/Mojo.pm 2020-04-21 21:50:08.000000000
+0200
+++ new/Mojolicious-8.42/lib/Test/Mojo.pm 2020-05-01 19:01:44.000000000
+0200
@@ -1138,7 +1138,7 @@
$t = $t->test('is', 'first value', 'second value', 'right value');
Call L<Test::More> functions through L</"handler">, used to implement
-L<Test::Mojo> roles. Result is stored in L</"success">.
+L<Test::Mojo> roles. The result will be stored in L</"success">.
=head2 text_is
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-8.40/t/mojo/dom.t
new/Mojolicious-8.42/t/mojo/dom.t
--- old/Mojolicious-8.40/t/mojo/dom.t 2020-03-30 11:31:42.000000000 +0200
+++ new/Mojolicious-8.42/t/mojo/dom.t 2020-05-01 22:10:34.000000000 +0200
@@ -1117,7 +1117,7 @@
->each(sub { push @e, shift->text });
is_deeply \@e, [qw(C E F H)], 'found all odd li elements';
@e = ();
-$dom->find('ul li:matches(:first-child, :last-child)')
+$dom->find('ul li:is(:first-child, :last-child)')
->each(sub { push @e, shift->text });
is_deeply \@e, [qw(A I)], 'found all odd li elements';
@e = ();
@@ -1225,16 +1225,21 @@
<area href=/ alt=F>
<div href=borked>very borked</div>
EOF
+is $dom->find(':any-link')->map(sub { $_->tag })->join(','), 'a,link,area',
+ 'right tags';
is $dom->find(':link')->map(sub { $_->tag })->join(','), 'a,link,area',
'right tags';
is $dom->find(':visited')->map(sub { $_->tag })->join(','), 'a,link,area',
'right tags';
-is $dom->at('a:link')->text, 'B', 'right result';
-is $dom->at('a:visited')->text, 'B', 'right result';
-is $dom->at('link:link')->{rel}, 'D', 'right result';
-is $dom->at('link:visited')->{rel}, 'D', 'right result';
-is $dom->at('area:link')->{alt}, 'F', 'right result';
-is $dom->at('area:visited')->{alt}, 'F', 'right result';
+is $dom->at('a:link')->text, 'B', 'right result';
+is $dom->at('a:any-link')->text, 'B', 'right result';
+is $dom->at('a:visited')->text, 'B', 'right result';
+is $dom->at('link:any-link')->{rel}, 'D', 'right result';
+is $dom->at('link:link')->{rel}, 'D', 'right result';
+is $dom->at('link:visited')->{rel}, 'D', 'right result';
+is $dom->at('area:link')->{alt}, 'F', 'right result';
+is $dom->at('area:any-link')->{alt}, 'F', 'right result';
+is $dom->at('area:visited')->{alt}, 'F', 'right result';
# Sibling combinator
$dom = Mojo::DOM->new(<<EOF);
@@ -2418,20 +2423,30 @@
is $dom->find('.foo')->map('text')->join(','), 'A,B', 'right
result';
is $dom->find('.FOO')->map('text')->join(','), 'C', 'right
result';
is $dom->find('[class=foo]')->map('text')->join(','), 'A', 'right
result';
+is $dom->find('[class=foo s]')->map('text')->join(','), 'A', 'right
result';
+is $dom->find('[class=foo S]')->map('text')->join(','), 'A', 'right
result';
is $dom->find('[class=foo i]')->map('text')->join(','), 'A,C', 'right
result';
is $dom->find('[class="foo" i]')->map('text')->join(','), 'A,C', 'right
result';
-is $dom->find('[class="foo bar"]')->size, 0, 'no results';
+is $dom->find('[class="foo" I]')->map('text')->join(','), 'A,C', 'right
result';
+is $dom->find('[class="foo bar"]')->size, 0, 'no results';
+is $dom->find('[class="foo bar s"]')->size, 0, 'no results';
+is $dom->find('[class="foo bar S"]')->size, 0, 'no results';
is $dom->find('[class="foo bar" i]')->map('text')->join(','), 'B',
'right result';
-is $dom->find('[class~=foo]')->map('text')->join(','), 'A,B', 'right result';
+is $dom->find('[class~=foo]')->map('text')->join(','), 'A,B', 'right result';
+is $dom->find('[class~=foo s]')->map('text')->join(','), 'A,B', 'right result';
is $dom->find('[class~=foo i]')->map('text')->join(','), 'A,B,C',
'right result';
-is $dom->find('[class*=f]')->map('text')->join(','), 'A,B,D', 'right result';
+is $dom->find('[class*=f]')->map('text')->join(','), 'A,B,D', 'right result';
+is $dom->find('[class*=f s]')->map('text')->join(','), 'A,B,D', 'right result';
is $dom->find('[class*=f i]')->map('text')->join(','), 'A,B,C,D',
'right result';
-is $dom->find('[class^=F]')->map('text')->join(','), 'C', 'right result';
+is $dom->find('[class^=F]')->map('text')->join(','), 'C', 'right result';
+is $dom->find('[class^=F S]')->map('text')->join(','), 'C', 'right result';
is $dom->find('[class^=F i]')->map('text')->join(','), 'A,B,C,D',
'right result';
+is $dom->find('[class^=F I]')->map('text')->join(','), 'A,B,C,D',
+ 'right result';
is $dom->find('[class$=O]')->map('text')->join(','), 'C', 'right result';
is $dom->find('[class$=O i]')->map('text')->join(','), 'A,C', 'right result';
is $dom->find('[class|=foo]')->map('text')->join(','), 'A,D', 'right result';
@@ -2611,11 +2626,11 @@
</foo>
EOF
%ns = (foons => 'ns:foo', barns => 'ns:bar');
-ok $dom->at('foons|foo', %ns), 'result';
-ok $dom->at('foons|foo:not(barns|*)', %ns), 'result';
-ok $dom->at('foo:not(|foo)', %ns), 'result';
-ok $dom->at('foons|foo:root', %ns), 'result';
-ok $dom->at('foo:matches(:root, foons|*)', %ns), 'result';
+ok $dom->at('foons|foo', %ns), 'result';
+ok $dom->at('foons|foo:not(barns|*)', %ns), 'result';
+ok $dom->at('foo:not(|foo)', %ns), 'result';
+ok $dom->at('foons|foo:root', %ns), 'result';
+ok $dom->at('foo:is(:root, foons|*)', %ns), 'result';
ok !$dom->at('foons|foo:not(:root)', %ns), 'no result';
is $dom->at('foons|tag', %ns)->{val}, 1, 'right value';
is $dom->at('foons|tag:empty', %ns)->{val}, 1, 'right value';
@@ -2628,11 +2643,11 @@
ok $dom->at('barns|bar', %ns), 'result';
ok $dom->at('barns|bar:not(foons|*)', %ns), 'result';
ok $dom->at('bar:not(|bar)', %ns), 'result';
-ok $dom->at('bar:matches(barns|*)', %ns), 'result';
+ok $dom->at('bar:is(barns|*)', %ns), 'result';
ok !$dom->at('barns|bar:root', %ns), 'no result';
-ok $dom->at('barns|bar:not(:root)', %ns), 'result';
-ok $dom->at('bar:matches(barns|*, :not(:root))', %ns), 'result';
-ok $dom->at('foons|foo barns|bar', %ns), 'result';
+ok $dom->at('barns|bar:not(:root)', %ns), 'result';
+ok $dom->at('bar:is(barns|*, :not(:root))', %ns), 'result';
+ok $dom->at('foons|foo barns|bar', %ns), 'result';
is $dom->at('barns|tag', %ns)->{val}, 2, 'right value';
is $dom->at('barns|tag:empty', %ns)->{val}, 2, 'right value';
ok $dom->at('barns|tag[val="2"]', %ns), 'result';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-8.40/t/mojo/ioloop_tls.t
new/Mojolicious-8.42/t/mojo/ioloop_tls.t
--- old/Mojolicious-8.40/t/mojo/ioloop_tls.t 2020-03-30 11:31:38.000000000
+0200
+++ new/Mojolicious-8.42/t/mojo/ioloop_tls.t 2020-05-02 18:30:10.000000000
+0200
@@ -303,7 +303,7 @@
# Ignore invalid client certificate
$loop = Mojo::IOLoop->new;
-my $cipher;
+my ($cipher, $version);
($server, $client, $client_err) = ();
$id = $loop->server(
address => '127.0.0.1',
@@ -331,24 +331,28 @@
$stream->timeout(0.5);
$client_err = $err;
$client = 'connected';
- $cipher = $stream->handle->get_cipher;
+ my $handle = $stream->handle;
+ $cipher = $handle->get_cipher;
+ $version = $handle->get_sslversion;
}
);
$loop->start;
is $server, 'accepted', 'right result';
is $client, 'connected', 'right result';
ok !$client_err, 'no error';
-is $cipher, 'AES256-SHA', 'AES256-SHA has been negotiatied';
+my $expect = $version eq 'TLSv1_3' ? 'TLS_AES_256_GCM_SHA384' : 'AES256-SHA';
+is $cipher, $expect, "$expect has been negotiatied";
# Ignore missing client certificate
($server, $client, $client_err) = ();
$id = Mojo::IOLoop->server(
- address => '127.0.0.1',
- tls => 1,
- tls_ca => 't/mojo/certs/ca.crt',
- tls_cert => 't/mojo/certs/server.crt',
- tls_key => 't/mojo/certs/server.key',
- tls_verify => 0x01,
+ address => '127.0.0.1',
+ tls => 1,
+ tls_ca => 't/mojo/certs/ca.crt',
+ tls_cert => 't/mojo/certs/server.crt',
+ tls_key => 't/mojo/certs/server.key',
+ tls_verify => 0x01,
+ tls_version => 'TLSv1_2',
sub { $server = 'accepted' }
);
$port = Mojo::IOLoop->acceptor($id)->port;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-8.40/t/mojo/tls.t
new/Mojolicious-8.42/t/mojo/tls.t
--- old/Mojolicious-8.40/t/mojo/tls.t 2020-03-30 11:31:38.000000000 +0200
+++ new/Mojolicious-8.42/t/mojo/tls.t 2020-05-02 18:30:10.000000000 +0200
@@ -52,8 +52,12 @@
$delay->then(sub { ($server_result, $client_result) = @_ });
$delay->wait;
is ref $client_result, 'IO::Socket::SSL', 'right class';
-is $client_result->get_cipher, 'AES256-SHA', 'AES256-SHA has been negotiatied';
is ref $server_result, 'IO::Socket::SSL', 'right class';
-is $server_result->get_cipher, 'AES256-SHA', 'AES256-SHA has been negotiatied';
+my $expect
+ = $server_result->get_sslversion eq 'TLSv1_3'
+ ? 'TLS_AES_256_GCM_SHA384'
+ : 'AES256-SHA';
+is $client_result->get_cipher, $expect, "$expect has been negotiatied";
+is $server_result->get_cipher, $expect, "$expect has been negotiatied";
done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-8.40/t/mojolicious/app.t
new/Mojolicious-8.42/t/mojolicious/app.t
--- old/Mojolicious-8.40/t/mojolicious/app.t 2020-03-30 11:32:00.000000000
+0200
+++ new/Mojolicious-8.42/t/mojolicious/app.t 2020-05-04 18:52:46.000000000
+0200
@@ -336,9 +336,11 @@
# Foo::something
$t->put_ok('/somethingtest' => {'X-Test' => 'Hi there!'})->status_is(200)
->header_is(Server => 'Mojolicious (Perl)')->content_is('/test4/42');
-$t->get_ok('/somethingtest?_method=PUT' => {'X-Test' => 'Hi there!'})
+$t->post_ok('/somethingtest?_method=PUT' => {'X-Test' => 'Hi there!'})
->status_is(200)->header_is(Server => 'Mojolicious (Perl)')
->content_is('/test4/42');
+$t->get_ok('/somethingtest?_method=PUT' => {'X-Test' => 'Hi there!'})
+ ->status_is(404);
# Foo::url_for_missing
$t->get_ok('/something_missing' => {'X-Test' => 'Hi there!'})->status_is(200)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Mojolicious-8.40/t/mojolicious/commands.t
new/Mojolicious-8.42/t/mojolicious/commands.t
--- old/Mojolicious-8.40/t/mojolicious/commands.t 2020-03-30
11:32:00.000000000 +0200
+++ new/Mojolicious-8.42/t/mojolicious/commands.t 2020-04-30
17:59:03.000000000 +0200
@@ -71,18 +71,48 @@
'right reference';
}
-# Start application with application specific command
+# Start application with application specific commands
my $app;
{
local $ENV{MOJO_APP_LOADER} = 1;
$app = Mojolicious::Commands->start_app('MojoliciousTest');
}
-is $app->start('test_command'), 'works!', 'right result';
+is $app->start('test_command'), 'works!', 'right result';
+is $app->start('test-command'), 'works!', 'right result';
+is $app->start('_test2-command'), 'works 2!', 'right result';
{
is(Mojolicious::Commands->start_app(MojoliciousTest => 'test_command'),
'works!', 'right result');
+ is(Mojolicious::Commands->start_app(MojoliciousTest => 'test-command'),
+ 'works!', 'right result');
+ is(Mojolicious::Commands->start_app(MojoliciousTest => '_test2-command'),
+ 'works 2!', 'right result');
}
+# Application specific help
+my $buffer = '';
+{
+ open my $handle, '>', \$buffer;
+ local *STDOUT = $handle;
+ local $ENV{HARNESS_ACTIVE} = 0;
+ $app->start;
+}
+like $buffer,
+ qr/Usage: APPLICATION COMMAND \[OPTIONS\].*_test2-command.*cgi.*test-comm/s,
+ 'right output';
+
+# Commands starting with a dash are not allowed
+$buffer = '';
+{
+ open my $handle, '>', \$buffer;
+ local *STDOUT = $handle;
+ local $ENV{HARNESS_ACTIVE} = 0;
+ $app->start('-test2-command');
+}
+like $buffer,
+ qr/Usage: APPLICATION COMMAND \[OPTIONS\].*_test2-command.*cgi.*test-comm/s,
+ 'right output';
+
# Do not pick up options for detected environments
{
local $ENV{MOJO_MODE};
@@ -99,7 +129,7 @@
ok $commands->description, 'has a description';
like $commands->message, qr/COMMAND/, 'has a message';
like $commands->hint, qr/help/, 'has a hint';
-my $buffer = '';
+$buffer = '';
{
open my $handle, '>', \$buffer;
local *STDOUT = $handle;
@@ -107,19 +137,19 @@
$commands->run;
}
like $buffer,
- qr/Usage: APPLICATION COMMAND
\[OPTIONS\].*daemon.*my_test_command.*version/s,
+ qr/Usage: APPLICATION COMMAND
\[OPTIONS\].*daemon.*my-test-command.*version/s,
'right output';
like $buffer, qr/See, it works/, 'description has been picked up';
-unlike $buffer, qr/my_fake_test_command/, 'fake command has been ignored';
+unlike $buffer, qr/my-fake-test-command/, 'fake command has been ignored';
# help
$buffer = '';
{
open my $handle, '>', \$buffer;
local *STDOUT = $handle;
- $commands->run('help', 'generate', 'lite_app');
+ $commands->run('help', 'generate', 'lite-app');
}
-like $buffer, qr/Usage: APPLICATION generate lite_app \[OPTIONS\] \[NAME\]/,
+like $buffer, qr/Usage: APPLICATION generate lite-app \[OPTIONS\] \[NAME\]/,
'right output';
$buffer = '';
{
@@ -133,9 +163,9 @@
{
open my $handle, '>', \$buffer;
local *STDOUT = $handle;
- $commands->run('generate', 'lite_app', '--help');
+ $commands->run('generate', 'lite-app', '--help');
}
-like $buffer, qr/Usage: APPLICATION generate lite_app \[OPTIONS\] \[NAME\]/,
+like $buffer, qr/Usage: APPLICATION generate lite-app \[OPTIONS\] \[NAME\]/,
'right output';
# get
@@ -245,7 +275,7 @@
$generator->run;
}
like $buffer,
- qr/Usage: APPLICATION generate GENERATOR \[OPTIONS\].*lite_app.*plugin/s,
+ qr/Usage: APPLICATION generate GENERATOR \[OPTIONS\].*lite-app.*plugin/s,
'right output';
# generate app
@@ -280,7 +310,7 @@
require Mojolicious::Command::Author::generate::lite_app;
$app = Mojolicious::Command::Author::generate::lite_app->new;
ok $app->description, 'has a description';
-like $app->usage, qr/lite_app/, 'has usage information';
+like $app->usage, qr/lite-app/, 'has usage information';
$dir = tempdir CLEANUP => 1;
chdir $dir;
$buffer = '';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Mojolicious-8.40/t/mojolicious/lib/MojoliciousTest/Command/_test2_command.pm
new/Mojolicious-8.42/t/mojolicious/lib/MojoliciousTest/Command/_test2_command.pm
---
old/Mojolicious-8.40/t/mojolicious/lib/MojoliciousTest/Command/_test2_command.pm
1970-01-01 01:00:00.000000000 +0100
+++
new/Mojolicious-8.42/t/mojolicious/lib/MojoliciousTest/Command/_test2_command.pm
2020-04-30 17:59:03.000000000 +0200
@@ -0,0 +1,6 @@
+package MojoliciousTest::Command::_test2_command;
+use Mojo::Base 'Mojolicious::Command';
+
+sub run {'works 2!'}
+
+1;