[libdist-zilla-plugin-githubmeta-perl] 01/01: Update to set CPAN::Meta::Spec 2 repository information
Axel Beckert
abe at deuxchevaux.org
Sun Apr 26 22:25:36 UTC 2015
This is an automated email from the git hooks/post-receive script.
abe pushed a commit to annotated tag 0.08
in repository libdist-zilla-plugin-githubmeta-perl.
commit 9d5663594cd849a322d1d7cdc03651cb94174107
Author: Chris 'BinGOs' Williams <chris at bingosnet.co.uk>
Date: Thu Jun 10 16:07:53 2010 +0100
Update to set CPAN::Meta::Spec 2 repository information
---
dist.ini | 3 ++-
lib/Dist/Zilla/Plugin/GithubMeta.pm | 18 +++++-------------
2 files changed, 7 insertions(+), 14 deletions(-)
diff --git a/dist.ini b/dist.ini
index 42cbd9a..1939bd8 100644
--- a/dist.ini
+++ b/dist.ini
@@ -1,5 +1,5 @@
name = Dist-Zilla-Plugin-GithubMeta
-version = 0.06
+version = 0.08
author = Chris Williams <chris at bingosnet.co.uk>
license = Perl_5
copyright_holder = Chris Williams and Tatsuhiko Miyagawa
@@ -16,6 +16,7 @@ copyright_holder = Chris Williams and Tatsuhiko Miyagawa
[ChangelogFromGit]
file_name = Changes
+tag_regexp = ^\d
[ReadmeFromPod]
diff --git a/lib/Dist/Zilla/Plugin/GithubMeta.pm b/lib/Dist/Zilla/Plugin/GithubMeta.pm
index d40fd32..435290a 100644
--- a/lib/Dist/Zilla/Plugin/GithubMeta.pm
+++ b/lib/Dist/Zilla/Plugin/GithubMeta.pm
@@ -21,20 +21,14 @@ sub metadata {
return unless can_run('git');
return unless my ($git_url) = `git remote show -n origin` =~ /URL: (.*)$/m;
return unless $git_url =~ /github\.com/; # Not a Github repository
- my $homepage;
- if ( $self->homepage ) {
- $homepage = $self->homepage->as_string;
- }
- else {
- $homepage = $git_url;
- $homepage =~ s![\w\-]+\@([^:]+):!http://$1/!;
- $homepage =~ s!\.git$!/tree!;
- }
+ my $web_url = $git_url;
$git_url =~ s![\w\-]+\@([^:]+):!git://$1/!;
- return { resources => { repository => { url => $git_url }, homepage => $homepage } };
+ $web_url =~ s![\w\-]+\@([^:]+):!http://$1/!;
+ $web_url =~ s!\.git$!/tree!;
+ my $home_url = $self->homepage ? $self->homepage->as_string : $web_url;
+ return { resources => { repository => { url => $git_url, type => 'git', web => $web_url }, homepage => $home_url } };
}
-
sub _under_git {
return 1 if -e '.git';
my $cwd = getcwd;
@@ -123,6 +117,4 @@ This module may be used, modified, and distributed under the same terms as Perl
L<Dist::Zilla>
-L<MooseX::Types::URI>
-
=cut
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libdist-zilla-plugin-githubmeta-perl.git
More information about the Pkg-perl-cvs-commits
mailing list