Dist-Zilla-Plugin-GithubMeta-0.52/0000755000175000017500000000000012541517033016224 5ustar bingosbingosDist-Zilla-Plugin-GithubMeta-0.52/dist.ini0000644000175000017500000000111012541517033017661 0ustar bingosbingosname = Dist-Zilla-Plugin-GithubMeta version = 0.52 author = Chris Williams author = Ricardo SIGNES license = Perl_5 copyright_holder = Chris Williams, Tatsuhiko Miyagawa and Ricardo SIGNES [Bootstrap::lib] [@BINGOS] [Prereqs] perl = 5.008005 Dist::Zilla = 4.101582 Dist::Zilla::Role::MetaProvider = 4.101582 IPC::Cmd = 0 Moose = 1.07 MooseX::Types::URI = 0.03 Try::Tiny = 0 version = 0 Dist-Zilla-Plugin-GithubMeta-0.52/corpus/0000755000175000017500000000000012541517033017537 5ustar bingosbingosDist-Zilla-Plugin-GithubMeta-0.52/corpus/GHM-Sample/0000755000175000017500000000000012541517033021371 5ustar bingosbingosDist-Zilla-Plugin-GithubMeta-0.52/corpus/GHM-Sample/ignore0000644000175000017500000000000012541517033022565 0ustar bingosbingosDist-Zilla-Plugin-GithubMeta-0.52/corpus/git/0000755000175000017500000000000012541517033020322 5ustar bingosbingosDist-Zilla-Plugin-GithubMeta-0.52/corpus/git/objects/0000755000175000017500000000000012541517033021753 5ustar bingosbingosDist-Zilla-Plugin-GithubMeta-0.52/corpus/git/objects/ignore0000644000175000017500000000000012541517033023147 0ustar bingosbingosDist-Zilla-Plugin-GithubMeta-0.52/corpus/git/info/0000755000175000017500000000000012541517033021255 5ustar bingosbingosDist-Zilla-Plugin-GithubMeta-0.52/corpus/git/info/exclude0000644000175000017500000000036012541517033022630 0ustar bingosbingos# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ Dist-Zilla-Plugin-GithubMeta-0.52/corpus/git/description0000644000175000017500000000011112541517033022561 0ustar bingosbingosUnnamed repository; edit this file 'description' to name the repository. Dist-Zilla-Plugin-GithubMeta-0.52/corpus/git/refs/0000755000175000017500000000000012541517033021261 5ustar bingosbingosDist-Zilla-Plugin-GithubMeta-0.52/corpus/git/refs/ignore0000644000175000017500000000000012541517033022455 0ustar bingosbingosDist-Zilla-Plugin-GithubMeta-0.52/corpus/git/HEAD0000644000175000017500000000002712541517033020745 0ustar bingosbingosref: refs/heads/master Dist-Zilla-Plugin-GithubMeta-0.52/corpus/git/hooks/0000755000175000017500000000000012541517033021445 5ustar bingosbingosDist-Zilla-Plugin-GithubMeta-0.52/corpus/git/hooks/pre-applypatch.sample0000755000175000017500000000061612541517033025607 0ustar bingosbingos#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"} : Dist-Zilla-Plugin-GithubMeta-0.52/corpus/git/hooks/pre-rebase.sample0000755000175000017500000001152712541517033024706 0ustar bingosbingos#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up-to-date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi exit 0 ################################################################ This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". Dist-Zilla-Plugin-GithubMeta-0.52/corpus/git/hooks/applypatch-msg.sample0000755000175000017500000000070412541517033025605 0ustar bingosbingos#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup test -x "$GIT_DIR/hooks/commit-msg" && exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"} : Dist-Zilla-Plugin-GithubMeta-0.52/corpus/git/hooks/pre-commit.sample0000755000175000017500000000305212541517033024727 0ustar bingosbingos#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 fi # If you want to allow non-ascii filenames set this variable to true. allownonascii=$(git config hooks.allownonascii) # Cross platform projects tend to avoid non-ascii filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test "$(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0')" then echo "Error: Attempt to add a non-ascii file name." echo echo "This can cause problems if you want to work" echo "with people on other platforms." echo echo "To be portable it is advisable to rename the file ..." echo echo "If you know what you are doing you can disable this" echo "check using:" echo echo " git config hooks.allownonascii true" echo exit 1 fi exec git diff-index --check --cached $against -- Dist-Zilla-Plugin-GithubMeta-0.52/corpus/git/hooks/prepare-commit-msg.sample0000755000175000017500000000232712541517033026367 0ustar bingosbingos#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first comments out the # "Conflicts:" part of a merge commit. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. case "$2,$3" in merge,) /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;; # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$1" ;; *) ;; esac # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" Dist-Zilla-Plugin-GithubMeta-0.52/corpus/git/hooks/commit-msg.sample0000755000175000017500000000160012541517033024724 0ustar bingosbingos#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } Dist-Zilla-Plugin-GithubMeta-0.52/corpus/git/hooks/update.sample0000755000175000017500000000703312541517033024140 0ustar bingosbingos#!/bin/sh # # An example hook script to blocks unannotated tags from entering. # Called by "git receive-pack" with arguments: refname sha1-old sha1-new # # To enable this hook, rename this file to "update". # # Config # ------ # hooks.allowunannotated # This boolean sets whether unannotated tags will be allowed into the # repository. By default they won't be. # hooks.allowdeletetag # This boolean sets whether deleting tags will be allowed in the # repository. By default they won't be. # hooks.allowmodifytag # This boolean sets whether a tag may be modified after creation. By default # it won't be. # hooks.allowdeletebranch # This boolean sets whether deleting branches will be allowed in the # repository. By default they won't be. # hooks.denycreatebranch # This boolean sets whether remotely creating branches will be denied # in the repository. By default this is allowed. # # --- Command line refname="$1" oldrev="$2" newrev="$3" # --- Safety check if [ -z "$GIT_DIR" ]; then echo "Don't run this script from the command line." >&2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "Usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --bool hooks.allowunannotated) allowdeletebranch=$(git config --bool hooks.allowdeletebranch) denycreatebranch=$(git config --bool hooks.denycreatebranch) allowdeletetag=$(git config --bool hooks.allowdeletetag) allowmodifytag=$(git config --bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero="0000000000000000000000000000000000000000" if [ "$newrev" = "$zero" ]; then newrev_type=delete else newrev_type=$(git cat-file -t $newrev) fi case "$refname","$newrev_type" in refs/tags/*,commit) # un-annotated tag short_refname=${refname##refs/tags/} if [ "$allowunannotated" != "true" ]; then echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 Dist-Zilla-Plugin-GithubMeta-0.52/corpus/git/hooks/post-commit.sample0000755000175000017500000000024012541517033025122 0ustar bingosbingos#!/bin/sh # # An example hook script that is called after a successful # commit is made. # # To enable this hook, rename this file to "post-commit". : Nothing Dist-Zilla-Plugin-GithubMeta-0.52/corpus/git/hooks/post-receive.sample0000755000175000017500000000105012541517033025254 0ustar bingosbingos#!/bin/sh # # An example hook script for the "post-receive" event. # # The "post-receive" script is run after receive-pack has accepted a pack # and the repository has been updated. It is passed arguments in through # stdin in the form # # For example: # aa453216d1b3e49e7f6f98441fa56946ddcd6a20 68f7abf4e6f922807889f52bc043ecd31b79f814 refs/heads/master # # see contrib/hooks/ for a sample, or uncomment the next line and # rename the file to "post-receive". #. /usr/share/doc/git-core/contrib/hooks/post-receive-email Dist-Zilla-Plugin-GithubMeta-0.52/corpus/git/hooks/post-update.sample0000755000175000017500000000027512541517033025124 0ustar bingosbingos#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info Dist-Zilla-Plugin-GithubMeta-0.52/corpus/git/config0000644000175000017500000000015712541517033021515 0ustar bingosbingos[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true Dist-Zilla-Plugin-GithubMeta-0.52/corpus/git/branches/0000755000175000017500000000000012541517033022107 5ustar bingosbingosDist-Zilla-Plugin-GithubMeta-0.52/corpus/git/branches/ignore0000644000175000017500000000000012541517033023303 0ustar bingosbingosDist-Zilla-Plugin-GithubMeta-0.52/META.json0000644000175000017500000000327312541517033017652 0ustar bingosbingos{ "abstract" : "Automatically include GitHub meta information in META.yml", "author" : [ "Chris Williams ", "Ricardo SIGNES " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 5.036, CPAN::Meta::Converter version 2.150001", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "Dist-Zilla-Plugin-GithubMeta", "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "develop" : { "requires" : { "Pod::Coverage::TrustPod" : "0", "Test::Pod" : "1.41", "Test::Pod::Coverage" : "1.08" } }, "runtime" : { "requires" : { "Dist::Zilla" : "4.101582", "Dist::Zilla::Role::MetaProvider" : "4.101582", "IPC::Cmd" : "0", "Moose" : "1.07", "MooseX::Types::URI" : "0.03", "Try::Tiny" : "0", "perl" : "5.008005", "version" : "0" } }, "test" : { "requires" : { "File::Spec" : "0", "IO::Handle" : "0", "IPC::Open3" : "0", "Test::More" : "0" } } }, "release_status" : "stable", "resources" : { "homepage" : "https://github.com/bingos/dist-zilla-plugin-githubmeta", "repository" : { "type" : "git", "url" : "https://github.com/bingos/dist-zilla-plugin-githubmeta.git", "web" : "https://github.com/bingos/dist-zilla-plugin-githubmeta" } }, "version" : "0.52" } Dist-Zilla-Plugin-GithubMeta-0.52/MANIFEST0000644000175000017500000000145212541517033017357 0ustar bingosbingos# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.036. Changes LICENSE MANIFEST META.json META.yml Makefile.PL README corpus/GHM-Sample/ignore corpus/git/HEAD corpus/git/branches/ignore corpus/git/config corpus/git/description corpus/git/hooks/applypatch-msg.sample corpus/git/hooks/commit-msg.sample corpus/git/hooks/post-commit.sample corpus/git/hooks/post-receive.sample corpus/git/hooks/post-update.sample corpus/git/hooks/pre-applypatch.sample corpus/git/hooks/pre-commit.sample corpus/git/hooks/pre-rebase.sample corpus/git/hooks/prepare-commit-msg.sample corpus/git/hooks/update.sample corpus/git/info/exclude corpus/git/objects/ignore corpus/git/refs/ignore dist.ini lib/Dist/Zilla/Plugin/GithubMeta.pm t/00-compile.t t/basic.t t/release-pod-coverage.t t/release-pod-syntax.t Dist-Zilla-Plugin-GithubMeta-0.52/t/0000755000175000017500000000000012541517033016467 5ustar bingosbingosDist-Zilla-Plugin-GithubMeta-0.52/t/release-pod-syntax.t0000644000175000017500000000045612541517033022405 0ustar bingosbingos#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } # This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. use Test::More; use Test::Pod 1.41; all_pod_files_ok(); Dist-Zilla-Plugin-GithubMeta-0.52/t/basic.t0000644000175000017500000000645012541517033017742 0ustar bingosbingosuse strict; use warnings; use Test::More 0.88; use IPC::Cmd qw[can_run]; use Try::Tiny; use Test::Deep; unless ( can_run('git') ) { ok('No git, no dice'); done_testing; exit 0; } { my ($gitver) = `git version`; my ($ver) = $gitver =~ m!git version ([0-9.]+(\.msysgit)?[0-9.]+)!; $ver =~ s![^\d._]!!g; $ver =~ s!\.$!!; chomp $gitver; require version; my $ver_obj = try { version->parse( $ver ) } catch { die "'$gitver' not parsable as '$ver': $_" }; if ( $ver_obj < version->parse('1.5.0') ) { diag("$gitver is too low, 1.5.0 or above is required"); ok("$gitver is too low, 1.5.0 or above is required"); done_testing; exit 0; } diag("Using $gitver\n"); } use lib 't/lib'; use Test::Deep qw(all ignore superhashof); use Test::DZil; test_plugin("simplest case, ssh url" => { plugin => { }, git => { origin => 'git@github.com:example/Example-Repo.git' }, }); test_plugin("https url" => { plugin => { }, git => { origin => 'https://github.com:example/Example-Repo.git' }, }); test_plugin("SSH url, from a github-keygen user" => { plugin => { }, git => { origin => 'example.github.com:example/Example-Repo.git' }, }); test_plugin("use a non-default remote" => { plugin => { remote => 'github' }, git => { github => 'git@github.com:example/Example-Repo.git', origin => 'rjbs@git.manxome.org/zork/Gnusto.git', }, }); test_plugin("override the user" => { plugin => { user => 'example' }, git => { origin => 'git@github.com:rjbs/Example-Repo.git' }, }); test_plugin("override the repo" => { plugin => { repo => 'Example-Repo' }, git => { origin => 'git@github.com:example/example--repo.git' }, }); test_plugin("turn on issues" => { plugin => { issues => 1 }, git => { origin => 'git@github.com:example/Example-Repo.git' }, resources => { bugtracker => { web => 'https://github.com/example/Example-Repo/issues' }, }, }); done_testing; ############# my %FMT; BEGIN { $FMT{CONFIG} = <<'END_GITCONFIG'; [core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true %s END_GITCONFIG $FMT{REMOTE} = <<'END_REMOTE'; [remote "%s"] url = %s END_REMOTE } sub git_config_for { my ($config) = @_; my $remote_config = join qq{\n}, map {; sprintf $FMT{REMOTE}, $_, $config->{$_} } keys %$config; return sprintf $FMT{CONFIG}, $remote_config; } sub test_plugin { my ($desc, $test) = @_; my $gitconfig = git_config_for($test); my $tzil = Builder->from_config( { dist_root => 'corpus/GHM-Sample' }, { add_files => { 'source/dist.ini' => simple_ini( 'MetaJSON', [ GithubMeta => $test->{plugin} ], ), 'source/.git/config' => git_config_for($test->{git}), }, also_copy => { 'corpus/git' => 'source/.git', }, }, ); $tzil->build; cmp_deeply( $tzil->distmeta, all( $test->{meta} || ignore(), superhashof({ resources => { homepage => 'https://github.com/example/Example-Repo', repository => { type => 'git', url => 'https://github.com/example/Example-Repo.git', web => 'https://github.com/example/Example-Repo', }, $test->{resources} ? %{ $test->{resources} } : (), }, }), ), $desc, ); } Dist-Zilla-Plugin-GithubMeta-0.52/t/release-pod-coverage.t0000644000175000017500000000057212541517033022651 0ustar bingosbingos#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } # This file was automatically generated by Dist::Zilla::Plugin::PodCoverageTests. use Test::Pod::Coverage 1.08; use Pod::Coverage::TrustPod; all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' }); Dist-Zilla-Plugin-GithubMeta-0.52/t/00-compile.t0000644000175000017500000000214012541517033020516 0ustar bingosbingosuse 5.006; use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::Compile 2.052 use Test::More; plan tests => 1 + ($ENV{AUTHOR_TESTING} ? 1 : 0); my @module_files = ( 'Dist/Zilla/Plugin/GithubMeta.pm' ); # no fake home requested my $inc_switch = -d 'blib' ? '-Mblib' : '-Ilib'; use File::Spec; use IPC::Open3; use IO::Handle; open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!"; my @warnings; for my $lib (@module_files) { # see L my $stderr = IO::Handle->new; my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, '-e', "require q[$lib]"); binmode $stderr, ':crlf' if $^O eq 'MSWin32'; my @_warnings = <$stderr>; waitpid($pid, 0); is($?, 0, "$lib loaded ok"); if (@_warnings) { warn @_warnings; push @warnings, @_warnings; } } is(scalar(@warnings), 0, 'no warnings found') or diag 'got warnings: ', ( Test::More->can('explain') ? Test::More::explain(\@warnings) : join("\n", '', @warnings) ) if $ENV{AUTHOR_TESTING}; Dist-Zilla-Plugin-GithubMeta-0.52/LICENSE0000644000175000017500000004405012541517033017234 0ustar bingosbingosThis software is copyright (c) 2015 by Chris Williams, Tatsuhiko Miyagawa and Ricardo SIGNES. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Terms of the Perl programming language system itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 2015 by Chris Williams, Tatsuhiko Miyagawa and Ricardo SIGNES. This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Artistic License 1.0 --- This software is Copyright (c) 2015 by Chris Williams, Tatsuhiko Miyagawa and Ricardo SIGNES. This is free software, licensed under: The Artistic License 1.0 The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End Dist-Zilla-Plugin-GithubMeta-0.52/Changes0000644000175000017500000003567412541517033017536 0ustar bingosbingos================================================== Changes from 2010-06-22 00:00:00 +0000 to present. ================================================== ----------------------------------------- version 0.52 at 2015-06-21 11:20:31 +0000 ----------------------------------------- Change: 1b0c40003721d838885dcdc3687f1c055671bc36 Author: Chris 'BinGOs' Williams Date : 2015-06-21 12:20:31 +0000 Sanitise git version strings more aggressively Because 'git version 2.4.3.573.g4eafbef' doh! Change: 22025b929618e2e4d7c70012893dd67c6dd1de3f Author: Karen Etheridge Date : 2015-06-21 12:16:54 +0000 Avoid meta validation issues by testing the data directly, not the json rendering When CPAN::Meta and Dist::Zilla versions are out of sync, we can get errors like this: [MetaJSON] Invalid META structure. Errors found: [MetaJSON] Expected a list structure (license) [Validation: 2] at /Volumes/amaretto/Users/ether/.perlbrew/libs/20.0@std/lib/perl5/darwi n-2level/Moose/Meta/Method/Delegation.pm line 110. t/basic.t .. Dubious, test returned 25 (wstat 6400, 0x1900) ...which aren't your problem. Avoid all this by just testing $tzil->distmeta directly. Signed-off-by: Chris 'BinGOs' Williams ----------------------------------------- version 0.50 at 2015-05-14 08:46:03 +0000 ----------------------------------------- Change: 07e8ddfe498e8c37c84ae5e63e9136d3959c2d3b Author: Chris 'BinGOs' Williams Date : 2015-05-14 09:46:03 +0000 Release 0.50 Change: 59db6a0d33016f7c8f8e9d2da6026cd3cdf28f31 Author: Chris Williams Date : 2015-05-14 09:42:52 +0000 Merge pull request #11 from wchristian/test_msysgit_compatibility upgrade basic.t to handle msysgit versions (1.9.5.msysgit.0) Change: f6d82b59f3648ba3fad35cdebc4ff2418e31ea16 Author: Christian Walde Date : 2015-05-14 10:38:56 +0000 upgrade basic.t to handle msysgit versions (1.9.5.msysgit.0) This change was made in .pm, but i neglected to run the test, so it remained faulty. This commit fixes that. ----------------------------------------- version 0.48 at 2015-03-21 15:53:16 +0000 ----------------------------------------- Change: b7ac21aff607d06371264bf68e2085e881037593 Author: Chris 'BinGOs' Williams Date : 2015-03-21 15:53:16 +0000 Release 0.48 Change: 70280d5532bc8bce437be937266bae7e093978bf Author: Chris Williams Date : 2015-03-21 15:51:17 +0000 Merge pull request #9 from wchristian/msysgit_compatibility msysgit compatibility Change: 99589e9197967e4c628f362d9c273a8b0cafbf85 Author: Christian Walde Date : 2015-02-20 04:36:15 +0000 handle msysgit versions (1.9.5.msysgit.0) so version.pm doesn't choke Change: 2de4972403ed15b714b112c261c62c1b296fdcdc Author: Christian Walde Date : 2015-02-20 04:27:07 +0000 throw useful errors on git version parse errors ----------------------------------------- version 0.46 at 2014-05-12 21:18:44 +0000 ----------------------------------------- Change: e3eb032ff0241d18f79a4b73288e4b43a46df9da Author: Chris 'BinGOs' Williams Date : 2014-05-12 22:18:44 +0000 Set LC_ALL to C as well as LANG Reported by Slaven Rezić as RT#95587 ----------------------------------------- version 0.44 at 2014-05-09 17:46:15 +0000 ----------------------------------------- Change: e705f5151f7a44479b09dc05c07ad28011b72518 Author: Chris 'BinGOs' Williams Date : 2014-05-09 18:46:15 +0000 Release engineering for 0.44 Change: 5ac089e9d43e366621507f6ac9ded5b241535281 Author: Chris Williams Date : 2014-05-09 18:42:34 +0000 Merge pull request #7 from dsteinbrunner/patch-1 typo fix Change: 97bcc799c9b52cfc22158bf7741cfa1af7e9af1c Author: David Steinbrunner Date : 2014-03-23 17:24:32 +0000 typo fix ----------------------------------------- version 0.42 at 2013-09-30 11:03:50 +0000 ----------------------------------------- Change: 6c90717d27f8938ac462040b97ebec25b420bd31 Author: Chris 'BinGOs' Williams Date : 2013-09-30 12:03:50 +0000 Work around ancient git versions git remote wasn't available until 1.5.0 The output from git remote changed sometime after 1.6.x ----------------------------------------- version 0.40 at 2013-09-27 18:04:49 +0000 ----------------------------------------- Change: 9880215eff857762840f431e3e9c37f1231ff23b Author: Chris 'BinGOs' Williams Date : 2013-09-27 19:04:49 +0000 Bump version to fix compile test ----------------------------------------- version 0.38 at 2013-09-09 08:53:35 +0000 ----------------------------------------- Change: bb85bd8d712ff12b2fd2bea2a8495f279099fc9b Author: Chris 'BinGOs' Williams Date : 2013-09-09 09:53:35 +0000 Change LANG env var to 'C' before calling 'git' The plugin fails if locale is set for instance to LANG=de_DE.UTF-8, so git output is German: > LANG=de_DE.UTF-8 git remote show -n origin * externes Projektarchiv origin URL zum Abholen: ... URL zum Versenden: ... Reported by Jakob Voss Change: 5a14672775dcf0379138fafc090101655742982d Author: Chris Williams Date : 2013-09-09 01:47:54 +0000 Merge pull request #6 from haarg/remote-not-config use git remote command to fetch remote urls Change: 6be9e72b39608d991438052f38ff1e4146e897b8 Author: Graham Knop Date : 2013-09-09 01:37:27 +0000 use git remote command to fetch remote urls If the git url..insteadOf or url..pushInsteadOf options are used, the URL listed in the config directly may not be the real URL used for fetching. The remote command will resolve the real URLs git will be using, so use that instead. ----------------------------------------- version 0.36 at 2013-09-05 12:14:13 +0000 ----------------------------------------- Change: 18fd642e7b403a75f2a2638cf7657f70c680cfeb Author: Chris 'BinGOs' Williams Date : 2013-09-05 13:14:13 +0000 Version bump because CPAN/PAUSE has lost the 0.34 tarball ----------------------------------------- version 0.34 at 2013-09-02 09:18:21 +0000 ----------------------------------------- Change: 12957cd7f8868e44b4981663580c3c515bf8f26c Author: Chris 'BinGOs' Williams Date : 2013-09-02 10:18:21 +0000 Report the version of git being used in the test output ----------------------------------------- version 0.32 at 2013-08-23 20:44:13 +0000 ----------------------------------------- Change: 0405192af204ea9abc3b974c56ba2120fc1e24c4 Author: Chris 'BinGOs' Williams Date : 2013-08-23 21:44:13 +0000 Bump to version 0.32 Change: c250a4496a910ac1fc851f303425d9100fb423b3 Author: Chris Williams Date : 2013-07-18 00:04:55 +0000 Merge pull request #4 from dolmen/optimize/url_for_remote Optimize _url_for_remote Change: 5d555a1a0fb6b8a514e524b87889b90bfee2c851 Author: Olivier Mengué Date : 2013-07-18 00:32:46 +0000 Optimize _url_for_remote: use git plumbing command Change: 964ed6b1cdf759c98d3d6f22cb2e022c83d8273f Author: Olivier Mengué Date : 2013-07-18 00:32:45 +0000 Use [Bootstrap::lib] To eat our own food. ----------------------------------------- version 0.30 at 2013-07-17 22:50:24 +0000 ----------------------------------------- Change: e05fee83d15cef137af091181bdab5d260471a6c Author: Chris 'BinGOs' Williams Date : 2013-07-17 23:50:24 +0000 Bump to version 0.30 Change: e36a578d02b3d72295afab625c81860f9e3f1e48 Author: Chris Williams Date : 2013-07-17 15:18:52 +0000 Merge pull request #3 from dolmen/lazy-load Lazy load IPC::Cmd Change: 96bfad240045ff88e9b79e6233cdda1c418b8b4f Author: Olivier Mengué Date : 2013-07-17 23:47:30 +0000 Lazy load IPC::Cmd ----------------------------------------- version 0.28 at 2011-11-17 21:22:40 +0000 ----------------------------------------- Change: de8fcf692ab356de6d8799c9c0165d49c41be967 Author: Chris 'BinGOs' Williams Date : 2011-11-17 21:22:40 +0000 Bump the required version of MooseX::Types::URI ----------------------------------------- version 0.26 at 2011-10-23 18:30:32 +0000 ----------------------------------------- Change: 2d465f4b76f37adf1068f4b84e49446e97db0513 Author: Chris 'BinGOs' Williams Date : 2011-10-23 19:30:32 +0000 Fluffed the last release ----------------------------------------- version 0.24 at 2011-10-23 18:27:49 +0000 ----------------------------------------- Change: 9c1d3c60d8cbc83b8b3f6c4a06b2c6b1a2b42070 Author: Chris 'BinGOs' Williams Date : 2011-10-23 19:27:49 +0000 Lower the required version of IPC::Cmd ----------------------------------------- version 0.22 at 2011-10-07 20:35:38 +0000 ----------------------------------------- Change: 59df70866c19c4262fa8d72befb0061be270d04f Author: Chris 'BinGOs' Williams Date : 2011-10-07 21:35:38 +0000 Bump to version 0.22 Change: a6a33014c1a4bea5159fe8a305298512d828b784 Author: Kent Fredric Date : 2011-10-08 04:32:23 +0000 Warn when a remote is specified, but is not found. This scenario can cause some rather nasty problems, and have some hidden side effects, especially if the user has other plugins that are relying on GithubMeta to populate the metadata-stash , but it silently does not. Instead of just silently trucking along and failing to populate metadata, it now does: [@Filter/GithubMeta] A remote named 'github' was specified, but does not appear to exist. [@Filter/GithubMeta] skipping meta.resources.repository creation Which will be a bit more helpful if something goes wrong because of this. ( And its incredibly likely that remote names for new clones wont match the remote names used somewhere else ) Have to add an explict `undef` before `next` too. Otherwise, for the last item that fails, "next" jumps past the undef, causing the code to try parsing a user and repo out of the whatever the result of the last call to `_url_for_remote` returned. And this could be either nothing, complete garbage, or the remote name itself, ( the remote name itself appears in the output of `git remote show -n foobar` when that remote doesn't even exist: > git remote show -n foobar * remote foobar Fetch URL: foobar Push URL: foobar HEAD branch: (not queried) Local ref configured for 'git push' (status not queried): (matching) pushes to (matching) This is unessecary effort, and makes further error reporting/diagnostics needlessly noisy. ----------------------------------------- version 0.20 at 2011-08-13 12:50:03 +0000 ----------------------------------------- Change: 3a080347f8fdb4b57f3dd57f664270aa6e86c997 Author: Chris 'BinGOs' Williams Date : 2011-08-13 13:50:03 +0000 Bump to version 0.20, remember to build the release with -Ilib this time ----------------------------------------- version 0.18 at 2011-08-13 12:45:42 +0000 ----------------------------------------- Change: e131e006db3d902f6caa78a3137e04ca3af6b7f1 Author: Chris 'BinGOs' Williams Date : 2011-08-13 13:45:42 +0000 Bumped version to 0.18 Change: 8ca18e5a9de4c694b00c534a9b08c60c4440dbf2 Author: Olivier Mengué Date : 2011-08-13 20:40:40 +0000 .gitignore: Dist-Zilla-... Change: f5a1a81428622523623a0aaea782d1a44e468ef9 Author: Olivier Mengué Date : 2011-08-13 20:40:39 +0000 Add ".git" to repo URL ----------------------------------------- version 0.16 at 2011-07-14 22:13:06 +0000 ----------------------------------------- Change: 2daa340a29e3bf1d281047309d229578076511f2 Author: Chris 'BinGOs' Williams Date : 2011-07-14 23:13:06 +0000 Resolve [rt.cpan.org #69412] "Github URLs are now https" Reported by Olivier 'dolmen' Mengué ----------------------------------------- version 0.14 at 2011-06-28 18:12:05 +0000 ----------------------------------------- Change: 22f613bacc1aac2a8a0b6853b9b7f64764ae5b8c Author: Chris 'BinGOs' Williams Date : 2011-06-28 19:12:05 +0000 Skip the basic tests if 'git' is not installed. ----------------------------------------- version 0.12 at 2011-05-03 11:23:18 +0000 ----------------------------------------- Change: 51b3763c0dff834f10a64a9e38e951e51d2dea1d Author: Chris 'BinGOs' Williams Date : 2011-05-03 12:23:18 +0000 Add POD::Coverage exemption Change: 2041e9982d30681b9b3a2f9bd815e118079d3c9c Author: Chris 'BinGOs' Williams Date : 2011-05-03 12:19:09 +0000 Bumpity version Change: b253fb3122e24a310796c4260397d712fdce1c0f Author: Chris 'BinGOs' Williams Date : 2011-05-03 11:47:04 +0000 Remove trailing whitespace Change: b91e4c56debfddc0fcd89a6bece5b34258d8bc79 Author: Chris 'BinGOs' Williams Date : 2011-05-03 11:45:26 +0000 Updated authors and copyright in dist.ini Change: 9d98e255a295e95e0fe171c177756060ffbcf6d6 Author: Ricardo Signes Date : 2011-05-03 06:29:27 +0000 rename to-be-obsoleted [Prereq] Change: 5fa24d00e674e2344e5d58c6280c63a34cc5a56d Author: Ricardo Signes Date : 2011-05-03 06:29:27 +0000 documentation for the changes Change: 6dfef49bb85848df102485913d888cd2e9c4dff4 Author: Ricardo Signes Date : 2011-05-03 06:29:27 +0000 add a small but non-trivial set of tests Change: bb4c0dcbf6734a150b8a0444a739efd08f109faa Author: Ricardo Signes Date : 2011-05-03 06:28:59 +0000 rework how we figure out urls; add user/repo args Change: b66a1c9b8416815ccce7ea14b5cfdffac0b2f16c Author: Ricardo Signes Date : 2011-05-03 06:28:47 +0000 allow checking multiple remotes; use smart urls Change: c5641f0a7a8a7a446b2b97b8de9eec70ed912f5a Author: Ricardo Signes Date : 2011-05-03 06:28:32 +0000 clean up unneded symbols with namespace::autoclean Change: 165196049f7aff5a953dea0ec6cc74de21b42001 Author: Ricardo Signes Date : 2011-05-03 06:27:24 +0000 keep git status clean with a .gitignore ================================================ Plus 5 releases after 2010-06-22 00:00:00 +0000. ================================================ Dist-Zilla-Plugin-GithubMeta-0.52/lib/0000755000175000017500000000000012541517033016772 5ustar bingosbingosDist-Zilla-Plugin-GithubMeta-0.52/lib/Dist/0000755000175000017500000000000012541517033017675 5ustar bingosbingosDist-Zilla-Plugin-GithubMeta-0.52/lib/Dist/Zilla/0000755000175000017500000000000012541517033020750 5ustar bingosbingosDist-Zilla-Plugin-GithubMeta-0.52/lib/Dist/Zilla/Plugin/0000755000175000017500000000000012541517033022206 5ustar bingosbingosDist-Zilla-Plugin-GithubMeta-0.52/lib/Dist/Zilla/Plugin/GithubMeta.pm0000644000175000017500000001442112541517033024577 0ustar bingosbingospackage Dist::Zilla::Plugin::GithubMeta; $Dist::Zilla::Plugin::GithubMeta::VERSION = '0.52'; # ABSTRACT: Automatically include GitHub meta information in META.yml use strict; use warnings; use Moose; with 'Dist::Zilla::Role::MetaProvider'; use MooseX::Types::URI qw[Uri]; use Cwd; use Try::Tiny; use namespace::autoclean; has 'homepage' => ( is => 'ro', isa => Uri, coerce => 1, ); has 'remote' => ( is => 'ro', isa => 'ArrayRef[Str]', default => sub { [ 'origin' ] }, ); has 'issues' => ( is => 'ro', isa => 'Bool', default => 0, ); has 'user' => ( is => 'rw', isa => 'Str', predicate => '_has_user', ); has 'repo' => ( is => 'rw', isa => 'Str', predicate => '_has_repo', ); sub mvp_multivalue_args { qw(remote) } sub _acquire_repo_info { my ($self) = @_; return if $self->_has_user and $self->_has_repo; return unless _under_git(); require IPC::Cmd; return unless IPC::Cmd::can_run('git'); { my $gitver = `git version`; my ($ver) = $gitver =~ m!git version ([0-9.]+(\.msysgit)?[0-9.]+)!; $ver =~ s![^\d._]!!g; $ver =~ s!\.$!!; chomp $gitver; require version; my $ver_obj = try { version->parse( $ver ) } catch { die "'$gitver' not parsable as '$ver': $_" }; if ( $ver_obj < version->parse('1.5.0') ) { warn "$gitver is too low, 1.5.0 or above is required\n"; return; } } my $git_url; remotelist: for my $remote (@{ $self->remote }) { # Missing remotes expand to the same value as they were input # ( git version 1.7.7 -- kentnl -- 2011-10-08 ) unless ( $git_url = $self->_url_for_remote($remote) and $remote ne $git_url ) { $self->log( ['A remote named \'%s\' was specified, but does not appear to exist.', $remote ] ); undef $git_url; next remotelist; } last if $git_url =~ m!\bgithub\.com[:/]!; # Short Circuit on Github repository # Not a Github Repository? $self->log( [ 'Specified remote \'%s\' expanded to \'%s\', which is not a github repository URL', $remote, $git_url, ] ); undef $git_url; } return unless $git_url; my ($user, $repo) = $git_url =~ m{ github\.com # the domain [:/] ([^/]+) # the username (: for ssh, / for http) / ([^/]+?) (?:\.git)? # the repo name $ }ix; $self->log(['No user could be discerned from URL: \'%s\'', $git_url ]) unless defined $user ; $self->log(['No repository could be discerned from URL: \'%s\'', $git_url ]) unless defined $repo; return unless defined $user and defined $repo; $self->user($user) unless $self->_has_user; $self->repo($repo) unless $self->_has_repo; } sub metadata { my $self = shift; $self->_acquire_repo_info; unless ( $self->_has_user and $self->_has_repo ){ $self->log(['skipping meta.resources.repository creation'] ); return; } my $gh_url = sprintf 'https://github.com/%s/%s', $self->user, $self->repo; my $bug_url = "$gh_url/issues"; my $repo_url = "$gh_url.git"; my $home_url = $self->homepage ? $self->homepage->as_string : $gh_url; return { resources => { homepage => $home_url, repository => { type => 'git', url => $repo_url, web => $gh_url, }, ($self->issues ? (bugtracker => { web => $bug_url }) : ()), } }; } sub _url_for_remote { my ($self, $remote) = @_; local $ENV{LC_ALL}='C'; local $ENV{LANG}='C'; my @remote_info = `git remote show -n $remote`; for my $line (@remote_info) { chomp $line; if ($line =~ /^\s*(?:Fetch)?\s*URL:\s*(.*)/) { return $1; } } return; } sub _under_git { return 1 if -e '.git'; my $cwd = getcwd; my $last = $cwd; my $found = 0; while (1) { chdir '..' or last; my $current = getcwd; last if $last eq $current; $last = $current; if ( -e '.git' ) { $found = 1; last; } } chdir $cwd; return $found; } __PACKAGE__->meta->make_immutable; no Moose; qq[1 is the loneliest number]; __END__ =pod =encoding UTF-8 =head1 NAME Dist::Zilla::Plugin::GithubMeta - Automatically include GitHub meta information in META.yml =head1 VERSION version 0.52 =head1 SYNOPSIS # in dist.ini [GithubMeta] # to override the homepage [GithubMeta] homepage = http://some.sort.of.url/project/ # to override the github remote repo (defaults to 'origin') [GithubMeta] remote = github =head1 DESCRIPTION Dist::Zilla::Plugin::GithubMeta is a L plugin to include GitHub L meta information in C. It automatically detects if the distribution directory is under C version control and whether the C is a GitHub repository and will set the C and C meta in C to the appropriate URLs for GitHub. Based on L which was based on L by Tatsuhiko Miyagawa =head2 ATTRIBUTES =over =item C The GitHub remote repo can be overridden with this attribute. If not provided, it defaults to C. You can provide multiple remotes to inspect. The first one that looks like a GitHub remote is used. =item C You may override the C setting by specifying this attribute. This should be a valid URL as understood by L. =item C If true, a bugtracker URL will be added to the distribution metadata for the project's GitHub issues page. =item C If given, the C parameter overrides the username found in the GitHub repository URL. This is useful if many people might release from their own workstations, but the distribution metadata should always point to one user's repo. =item C If give, the C parameter overrides the repository name found in the GitHub repository URL. =back =head2 METHODS =over =item C Required by L =back =for Pod::Coverage mvp_multivalue_args =head1 SEE ALSO L =head1 AUTHORS =over 4 =item * Chris Williams =item * Ricardo SIGNES =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2015 by Chris Williams, Tatsuhiko Miyagawa and Ricardo SIGNES. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Dist-Zilla-Plugin-GithubMeta-0.52/README0000644000175000017500000000341212541517033017104 0ustar bingosbingosSYNOPSIS # in dist.ini [GithubMeta] # to override the homepage [GithubMeta] homepage = http://some.sort.of.url/project/ # to override the github remote repo (defaults to 'origin') [GithubMeta] remote = github DESCRIPTION Dist::Zilla::Plugin::GithubMeta is a Dist::Zilla plugin to include GitHub https://github.com meta information in META.yml. It automatically detects if the distribution directory is under git version control and whether the origin is a GitHub repository and will set the repository and homepage meta in META.yml to the appropriate URLs for GitHub. Based on Module::Install::GithubMeta which was based on Module::Install::Repository by Tatsuhiko Miyagawa ATTRIBUTES remote The GitHub remote repo can be overridden with this attribute. If not provided, it defaults to origin. You can provide multiple remotes to inspect. The first one that looks like a GitHub remote is used. homepage You may override the homepage setting by specifying this attribute. This should be a valid URL as understood by MooseX::Types::URI. issues If true, a bugtracker URL will be added to the distribution metadata for the project's GitHub issues page. user If given, the user parameter overrides the username found in the GitHub repository URL. This is useful if many people might release from their own workstations, but the distribution metadata should always point to one user's repo. repo If give, the repo parameter overrides the repository name found in the GitHub repository URL. METHODS metadata Required by Dist::Zilla::Role::MetaProvider SEE ALSO Dist::Zilla Dist-Zilla-Plugin-GithubMeta-0.52/META.yml0000644000175000017500000000160412541517033017476 0ustar bingosbingos--- abstract: 'Automatically include GitHub meta information in META.yml' author: - 'Chris Williams ' - 'Ricardo SIGNES ' build_requires: File::Spec: '0' IO::Handle: '0' IPC::Open3: '0' Test::More: '0' configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 0 generated_by: 'Dist::Zilla version 5.036, CPAN::Meta::Converter version 2.150001' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: Dist-Zilla-Plugin-GithubMeta requires: Dist::Zilla: '4.101582' Dist::Zilla::Role::MetaProvider: '4.101582' IPC::Cmd: '0' Moose: '1.07' MooseX::Types::URI: '0.03' Try::Tiny: '0' perl: '5.008005' version: '0' resources: homepage: https://github.com/bingos/dist-zilla-plugin-githubmeta repository: https://github.com/bingos/dist-zilla-plugin-githubmeta.git version: '0.52' Dist-Zilla-Plugin-GithubMeta-0.52/Makefile.PL0000644000175000017500000000321612541517033020200 0ustar bingosbingos# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.036. use strict; use warnings; use 5.008005; use ExtUtils::MakeMaker; my %WriteMakefileArgs = ( "ABSTRACT" => "Automatically include GitHub meta information in META.yml", "AUTHOR" => "Chris Williams , Ricardo SIGNES ", "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => 0 }, "DISTNAME" => "Dist-Zilla-Plugin-GithubMeta", "EXE_FILES" => [], "LICENSE" => "perl", "MIN_PERL_VERSION" => "5.008005", "NAME" => "Dist::Zilla::Plugin::GithubMeta", "PREREQ_PM" => { "Dist::Zilla" => "4.101582", "Dist::Zilla::Role::MetaProvider" => "4.101582", "IPC::Cmd" => 0, "Moose" => "1.07", "MooseX::Types::URI" => "0.03", "Try::Tiny" => 0, "version" => 0 }, "TEST_REQUIRES" => { "File::Spec" => 0, "IO::Handle" => 0, "IPC::Open3" => 0, "Test::More" => 0 }, "VERSION" => "0.52", "test" => { "TESTS" => "t/*.t" } ); my %FallbackPrereqs = ( "Dist::Zilla" => "4.101582", "Dist::Zilla::Role::MetaProvider" => "4.101582", "ExtUtils::MakeMaker" => 0, "File::Spec" => 0, "IO::Handle" => 0, "IPC::Cmd" => 0, "IPC::Open3" => 0, "Moose" => "1.07", "MooseX::Types::URI" => "0.03", "Test::More" => 0, "Try::Tiny" => 0, "version" => 0 ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { delete $WriteMakefileArgs{TEST_REQUIRES}; delete $WriteMakefileArgs{BUILD_REQUIRES}; $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs; } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs);