Skip to content

Commit

Permalink
Merge branch 'giterlizzi/issue14'
Browse files Browse the repository at this point in the history
  • Loading branch information
giterlizzi committed Jul 24, 2024
2 parents a9ba764 + 99435dc commit ddd3606
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 31 deletions.
6 changes: 3 additions & 3 deletions lib/URI/PackageURL.pm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use constant DEBUG => $ENV{PURL_DEBUG};

use overload '""' => 'to_string', fallback => 1;

our $VERSION = '2.20_2';
our $VERSION = '2.20_3';
our @EXPORT = qw(encode_purl decode_purl);

my $PURL_REGEXP = qr{^pkg:[A-Za-z\\.\\-\\+][A-Za-z0-9\\.\\-\\+]*/.+};
Expand Down Expand Up @@ -283,7 +283,7 @@ URI::PackageURL - Perl extension for Package URL (aka "purl")
type => cpan,
namespace => 'GDT',
name => 'URI-PackageURL',
version => '2.20'
version => '2.20_3'
);
say $purl; # pkg:cpan/GDT/URI-PackageURL@2.20
Expand All @@ -296,7 +296,7 @@ URI::PackageURL - Perl extension for Package URL (aka "purl")
$purl = decode_purl('pkg:cpan/GDT/URI-PackageURL@2.20');
say $purl->type; # cpan
$purl_string = encode_purl(type => cpan, name => 'URI::PackageURL', version => '2.20');
$purl_string = encode_purl(type => cpan, name => 'URI::PackageURL', version => '2.20_3');
say $purl_string; # pkg:cpan/URI::PackageURL@2.20
=head1 DESCRIPTION
Expand Down
2 changes: 1 addition & 1 deletion lib/URI/PackageURL/App.pm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use Data::Dumper ();

use URI::PackageURL ();

our $VERSION = '2.20_2';
our $VERSION = '2.20_3';

sub cli_error {
my ($error) = @_;
Expand Down
43 changes: 19 additions & 24 deletions lib/URI/PackageURL/Util.pm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use warnings;

use Exporter qw(import);

our $VERSION = '2.20_2';
our $VERSION = '2.20_3';
our @EXPORT = qw(purl_to_urls purl_components_normalize);

sub purl_components_normalize {
Expand Down Expand Up @@ -221,12 +221,11 @@ sub _bitbucket_urls {

my $purl = shift;

my $name = $purl->name;
my $namespace = $purl->namespace;
my $version = $purl->version;
my $qualifiers = $purl->qualifiers;
my $file_ext = $qualifiers->{ext} || 'tar.gz';
my $version_prefix = $qualifiers->{version_prefix} || '';
my $name = $purl->name;
my $namespace = $purl->namespace;
my $version = $purl->version;
my $qualifiers = $purl->qualifiers;
my $file_ext = $qualifiers->{ext} || 'tar.gz';

my $urls = {};

Expand All @@ -235,7 +234,7 @@ sub _bitbucket_urls {
}

if ($version) {
$urls->{download} = "https://bitbucket.org/$namespace/$name/get/$version_prefix$version.$file_ext";
$urls->{download} = "https://bitbucket.org/$namespace/$name/get/$version.$file_ext";
}

return $urls;
Expand Down Expand Up @@ -360,12 +359,11 @@ sub _github_urls {

my $purl = shift;

my $name = $purl->name;
my $namespace = $purl->namespace;
my $version = $purl->version;
my $qualifiers = $purl->qualifiers;
my $file_ext = $qualifiers->{ext} || 'tar.gz';
my $version_prefix = $qualifiers->{version_prefix} || '';
my $name = $purl->name;
my $namespace = $purl->namespace;
my $version = $purl->version;
my $qualifiers = $purl->qualifiers;
my $file_ext = $qualifiers->{ext} || 'tar.gz';

my $urls = {};

Expand All @@ -381,8 +379,7 @@ sub _github_urls {
$urls->{download} = "https://github.com/$namespace/$name/archive/$version.$file_ext";
}
else {
$urls->{download}
= "https://github.com/$namespace/$name/archive/refs/tags/$version_prefix$version.$file_ext";
$urls->{download} = "https://github.com/$namespace/$name/archive/refs/tags/$version.$file_ext";
}

}
Expand All @@ -395,12 +392,11 @@ sub _gitlab_urls {

my $purl = shift;

my $name = $purl->name;
my $namespace = $purl->namespace;
my $version = $purl->version;
my $qualifiers = $purl->qualifiers;
my $file_ext = $qualifiers->{ext} || 'tar.gz';
my $version_prefix = $qualifiers->{version_prefix} || '';
my $name = $purl->name;
my $namespace = $purl->namespace;
my $version = $purl->version;
my $qualifiers = $purl->qualifiers;
my $file_ext = $qualifiers->{ext} || 'tar.gz';

my $urls = {};

Expand All @@ -409,8 +405,7 @@ sub _gitlab_urls {
}

if ($version) {
$urls->{download}
= "https://gitlab.com/$namespace/$name/-/archive/$version_prefix$version/$name-$version_prefix$version.$file_ext";
$urls->{download} = "https://gitlab.com/$namespace/$name/-/archive/$version/$name-$version.$file_ext";
}

return $urls;
Expand Down
2 changes: 1 addition & 1 deletion lib/URI/VersionRange.pm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use constant FALSE => !!0;

use overload '""' => 'to_string', fallback => 1;

our $VERSION = '2.20_2';
our $VERSION = '2.20_3';
our @EXPORT = qw(encode_vers decode_vers);

my $VERS_REGEXP = qr{^vers:[a-z\\.\\-\\+][a-z0-9\\.\\-\\+]*/.+};
Expand Down
2 changes: 1 addition & 1 deletion lib/URI/VersionRange/App.pm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use Data::Dumper ();

use URI::VersionRange ();

our $VERSION = '2.20_2';
our $VERSION = '2.20_3';

sub cli_error {
my ($error) = @_;
Expand Down
2 changes: 1 addition & 1 deletion lib/URI/VersionRange/Constraint.pm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use overload '""' => 'to_string', fallback => 1;

use URI::VersionRange::Version;

our $VERSION = '2.20_2';
our $VERSION = '2.20_3';

our %COMPARATOR = (
'=' => 'equal',
Expand Down

0 comments on commit ddd3606

Please sign in to comment.