Permalink
Browse files

Use ref not rev for git since rev is more like revisions. ref works f…

…or branches/tags as well
  • Loading branch information...
1 parent 4ae5718 commit 43371679ee5bb6014ef11f53373d8a1f8fe3268b @miyagawa committed Sep 19, 2013
Showing with 7 additions and 7 deletions.
  1. +2 −2 lib/Module/CPANfile/Requirement.pm
  2. +5 −5 t/requirement.t
@@ -19,14 +19,14 @@ sub new {
name => $args{name},
version => $args{version},
(exists $args{git} ? (git => $args{git}) : ()),
- (exists $args{rev} ? (rev => $args{rev}) : ()),
+ (exists $args{ref} ? (ref => $args{ref}) : ()),
}, $class;
}
sub name { shift->{name} }
sub version { shift->{version} }
sub git { shift->{git} }
-sub rev { shift->{rev} }
+sub ref { shift->{ref} }
1;
View
@@ -6,7 +6,7 @@ use t::Utils;
subtest 'full set' => sub {
my $r = write_cpanfile(<<FILE);
requires 'Plack', '0.9970',
- git => 'git://github.com/plack/Plack.git', rev => '0.9970';
+ git => 'git://github.com/plack/Plack.git', ref => '0.9970';
FILE
my $file = Module::CPANfile->load;
@@ -21,14 +21,14 @@ FILE
is_deeply $file->options_for_module('Plack'), {
git => 'git://github.com/plack/Plack.git',
- rev => '0.9970',
+ ref => '0.9970',
};
};
subtest 'drop version' => sub {
my $r = write_cpanfile(<<FILE);
requires 'Plack', # drop version
- git => 'git://github.com/plack/Plack.git', rev => '0.9970';
+ git => 'git://github.com/plack/Plack.git', ref => '0.9970';
FILE
my $file = Module::CPANfile->load;
@@ -40,11 +40,11 @@ FILE
is_deeply $file->options_for_module('Plack'), {
git => 'git://github.com/plack/Plack.git',
- rev => '0.9970',
+ ref => '0.9970',
};
};
-subtest 'no revision' => sub {
+subtest 'no ref' => sub {
my $r = write_cpanfile(<<FILE);
requires 'Plack', '0.9970', git => 'git://github.com/plack/Plack.git';
FILE

0 comments on commit 4337167

Please sign in to comment.