Skip to content

Commit 957a281

Browse files
author
Artur Khabibullin
committed
Takes only last part of URI after the full stop (#14)
1 parent 68da5d4 commit 957a281

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

Changes

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2+
* Take only last part of URI after full stop (#14);
3+
14
0.72
25
* Makes tests use Test::More::note instead of printing to STDERR;
36

lib/Raisin/Routes/Endpoint.pm

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ sub _build_regex {
5050
$regex =~ s/[{}]//g;
5151

5252
# Allows any extensions
53-
$regex .= "(?:\\\..+)?";
53+
$regex .= "(?:\\\.[^.]+?)?";
5454

5555
qr/^$regex$/;
5656
}

t/unit/routes/endpoint.t

+1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ my @CASES = (
7575
input => { method => 'put', path => '/api/item/42' },
7676
expected => undef,
7777
},
78+
# TODO: see GitHub issue #14
7879
);
7980

8081
sub _make_object {

0 commit comments

Comments
 (0)