Commit 7c44e865 authored by Alex Vandiver's avatar Alex Vandiver
Browse files

Bump Module::Install::RTx version, to fix META.yml

parent 814e8312
......@@ -25,7 +25,8 @@ requires:
resources:
license: http://opensource.org/licenses/gpl-license.php
version: '0.04'
x_module_install_rtx_version: 0.34_04
x_module_install_rtx_version: '0.36'
x_requires_rt: 4.0.0
x_requires_rt_plugins:
- RT::Extension::LDAPImport
- RT::Extension::MergeUsers
......@@ -8,7 +8,7 @@ no warnings 'once';
use Module::Install::Base;
use base 'Module::Install::Base';
our $VERSION = '0.34_04';
our $VERSION = '0.36';
use FindBin;
use File::Glob ();
......@@ -18,7 +18,8 @@ my @DIRS = qw(etc lib html static bin sbin po var);
my @INDEX_DIRS = qw(lib bin sbin);
sub RTx {
my ( $self, $name ) = @_;
my ( $self, $name, $extra_args ) = @_;
$extra_args ||= {};
# Set up names
my $fname = $name;
......@@ -30,12 +31,16 @@ sub RTx {
unless $self->version;
$self->abstract("$name Extension")
unless $self->abstract;
$self->readme_from( "lib/$fname.pm",
{ options => [ quotes => "none" ] } );
unless ( $extra_args->{no_readme_generation} ) {
$self->readme_from( "lib/$fname.pm",
{ options => [ quotes => "none" ] } );
}
$self->add_metadata("x_module_install_rtx_version", $VERSION );
# Try to find RT.pm
my @prefixes = qw( /opt /usr/local /home /usr /sw );
my @prefixes = qw( /opt /usr/local /home /usr /sw /usr/share/request-tracker4);
$ENV{RTHOME} =~ s{/RT\.pm$}{} if defined $ENV{RTHOME};
$ENV{RTHOME} =~ s{/lib/?$}{} if defined $ENV{RTHOME};
my @try = $ENV{RTHOME} ? ($ENV{RTHOME}, "$ENV{RTHOME}/lib") : ();
while (1) {
my @look = @INC;
......@@ -46,9 +51,10 @@ sub RTx {
warn
"Cannot find the location of RT.pm that defines \$RT::LocalPath in: @look\n";
$_ = $self->prompt("Path to directory containing your RT.pm:") or exit;
$_ =~ s{(/lib)?/RT\.pm$}{};
@try = ("$_/rt4/lib", "$_/lib/rt4", "$_/lib");
my $given = $self->prompt("Path to directory containing your RT.pm:") or exit;
$given =~ s{/RT\.pm$}{};
$given =~ s{/lib/?$}{};
@try = ($given, "$given/lib");
}
print "Using RT configuration from $INC{'RT.pm'}:\n";
......@@ -59,7 +65,9 @@ sub RTx {
unshift @INC, $lib_path;
# Set a baseline minimum version
$self->requires_rt('4.0.0');
unless ( $extra_args->{deprecated_rt} ) {
$self->requires_rt('4.0.0');
}
# Installation locations
my %path;
......@@ -190,7 +198,7 @@ sub requires_rt_plugin {
my ( $plugin ) = @_;
if ($self->is_admin) {
my $plugins = $self->{values}{"x_requires_rt_plugins"} || [];
my $plugins = $self->Meta->{values}{"x_requires_rt_plugins"} || [];
push @{$plugins}, $plugin;
$self->add_metadata("x_requires_rt_plugins", $plugins);
}
......@@ -250,4 +258,4 @@ sub _load_rt_handle {
__END__
#line 369
#line 390
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment