[Jifty-commit] r729 - jifty/trunk/lib jifty/trunk/t
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Tue Mar 21 18:03:59 EST 2006
Author: jesse
Date: Tue Mar 21 18:03:56 2006
New Revision: 729
Modified:
/ (props changed)
jifty/trunk/lib/Jifty.pm
jifty/trunk/lib/Jifty/Util.pm
jifty/trunk/t/Jifty.pm
Log:
r30267 at truegrounds: jesse | 2006-03-21 18:00:39 -0500
* Work around Module::ShareDir brokeness (and a bit of our own)
Modified: jifty/trunk/lib/Jifty.pm
==============================================================================
--- jifty/trunk/lib/Jifty.pm (original)
+++ jifty/trunk/lib/Jifty.pm Tue Mar 21 18:03:56 2006
@@ -3,7 +3,7 @@
package Jifty;
-our $VERSION = '0.60221';
+our $VERSION = '0.60321';
=head1 NAME
Modified: jifty/trunk/lib/Jifty/Util.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Util.pm (original)
+++ jifty/trunk/lib/Jifty/Util.pm Tue Mar 21 18:03:56 2006
@@ -65,7 +65,16 @@
sub share_root {
my $self = shift;
- return $SHARE_ROOT ||= File::Spec->rel2abs( File::ShareDir::module_dir('Jifty') );
+ $SHARE_ROOT ||= eval { File::Spec->rel2abs( File::ShareDir::module_dir('Jifty') )};
+ if (not $SHARE_ROOT or not -d $SHARE_ROOT) {
+ # XXX TODO: This is a bloody hack
+ # Module::Install::ShareDir and File::ShareDir don't play nicely
+ # together
+ my @root = File::Spec->splitdir($self->jifty_root); # lib
+ pop @root; # Jifty-version
+ $SHARE_ROOT = File::Spec->catdir(@root,"share");
+ }
+ return ($SHARE_ROOT);
}
=head2 app_root
@@ -127,7 +136,13 @@
sub default_app_name {
my $self = shift;
my @root = File::Spec->splitdir( Jifty::Util->app_root);
- return pop @root;
+ my $name = pop @root;
+ # Jifty-0.10211 should become Jifty
+ if ($name =~ /^(.*?)-(.*\..*)$/) {
+ $name = $1;
+
+ }
+ return $name;
}
=head2 make_path PATH
Modified: jifty/trunk/t/Jifty.pm
==============================================================================
--- jifty/trunk/t/Jifty.pm (original)
+++ jifty/trunk/t/Jifty.pm Tue Mar 21 18:03:56 2006
@@ -3,6 +3,7 @@
BEGIN { $ENV{'JIFTY_VENDOR_CONFIG'} = 't/test_config.yml' }
use Jifty::Everything;
+
filters {
form => [qw< yaml request_from_webform >],
request => [qw< yaml >],
More information about the Jifty-commit
mailing list