Author: bob Date: 2012-04-12 15:45:15 +0100 (Thu, 12 Apr 2012) New Revision: 1328
Modified: trunk/ trunk/Build.PL trunk/Changes trunk/MANIFEST trunk/lib/OpenGuides.pm trunk/lib/OpenGuides/CGI.pm trunk/lib/OpenGuides/Search.pm trunk/lib/OpenGuides/Template.pm trunk/t/25_write_geo_data.t trunk/t/26_geo_data_search_form.t trunk/t/27_geo_data_edit_form.t trunk/t/33_search_advanced_search.t trunk/t/33_search_advanced_search_utm.t trunk/t/34_search_paging.t trunk/t/35_search_two_searches.t trunk/t/38_search_params.t trunk/t/39_search_form.t trunk/t/62_bug_trailing_whitespace.t trunk/t/66_bug_latlong_representation.t trunk/t/69_bug_zero_geo.t trunk/t/91_username_in_templates.t trunk/wiki.cgi Log: merge 0.66 release branch
Property changes on: trunk ___________________________________________________________________ Added: svn:mergeinfo + /branches/rel_0_66:1319-1327
Modified: trunk/Build.PL =================================================================== --- trunk/Build.PL 2012-04-12 14:31:41 UTC (rev 1327) +++ trunk/Build.PL 2012-04-12 14:45:15 UTC (rev 1328) @@ -297,7 +297,6 @@ $drivers{$dbtype} => 0, 'File::Spec::Functions' => 0, 'File::Temp' => 0, - 'Geo::Coordinates::UTM' => 0, 'HTML::Entities' => 0, 'LWP::Simple' => 0, 'MIME::Lite' => 0, @@ -311,6 +310,9 @@ 'Data::Validate::URI' => 0, 'Net::Netmask' => 0, 'List::Util' => 0, + 'Geo::Coordinates::UTM' => 0, + 'Geo::Coordinates::OSGB' => 0, + 'Geo::Coordinates::ITM' => 0, }, build_requires => { 'Module::Build' => '0.26', # API change for accessing config data @@ -356,6 +358,7 @@ "delete_password_wrong.tt", "differences.tt", "display_metadata.tt", + "metadata.tt", "edit_form.tt", "edit_form_actions.tt", "error.tt",
Modified: trunk/Changes =================================================================== --- trunk/Changes 2012-04-12 14:31:41 UTC (rev 1327) +++ trunk/Changes 2012-04-12 14:45:15 UTC (rev 1328) @@ -3,7 +3,7 @@ More detailed changelogs can be found at http://dev.openguides.org/log/trunk.
-0.66 ? +0.66 12 April 2012 All templates now have access to the "username" TT variable. Node name parameters in URLs are now accepted with spaces instead of underscores, to take account of people typing manually - these will
Modified: trunk/MANIFEST =================================================================== --- trunk/MANIFEST 2012-04-12 14:31:41 UTC (rev 1327) +++ trunk/MANIFEST 2012-04-12 14:45:15 UTC (rev 1328) @@ -46,6 +46,7 @@ templates/home_node.tt templates/map_index.tt templates/missing_metadata.tt +templates/metadata.tt templates/moderate_confirm.tt templates/moderate_password_wrong.tt templates/navbar.tt
Modified: trunk/lib/OpenGuides/CGI.pm =================================================================== --- trunk/lib/OpenGuides/CGI.pm 2012-04-12 14:31:41 UTC (rev 1327) +++ trunk/lib/OpenGuides/CGI.pm 2012-04-12 14:45:15 UTC (rev 1328) @@ -1,7 +1,7 @@ package OpenGuides::CGI; use strict; use vars qw( $VERSION ); -$VERSION = '0.09'; +$VERSION = '0.10';
use Carp qw( croak ); use CGI::Cookie; @@ -443,7 +443,7 @@
=head1 COPYRIGHT
- Copyright (C) 2003-2008 The OpenGuides Project. All Rights Reserved. + Copyright (C) 2003-2012 The OpenGuides Project. All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Modified: trunk/lib/OpenGuides/Search.pm =================================================================== --- trunk/lib/OpenGuides/Search.pm 2012-04-12 14:31:41 UTC (rev 1327) +++ trunk/lib/OpenGuides/Search.pm 2012-04-12 14:45:15 UTC (rev 1328) @@ -1,6 +1,6 @@ package OpenGuides::Search; use strict; -our $VERSION = '0.13'; +our $VERSION = '0.14';
use CGI qw( :standard ); use Wiki::Toolkit::Plugin::Locator::Grid; @@ -827,7 +827,7 @@
=head1 COPYRIGHT
- Copyright (C) 2003-2008 The OpenGuides Project. All Rights Reserved. + Copyright (C) 2003-2012 The OpenGuides Project. All Rights Reserved.
The OpenGuides distribution is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Modified: trunk/lib/OpenGuides/Template.pm =================================================================== --- trunk/lib/OpenGuides/Template.pm 2012-04-12 14:31:41 UTC (rev 1327) +++ trunk/lib/OpenGuides/Template.pm 2012-04-12 14:45:15 UTC (rev 1328) @@ -2,7 +2,7 @@
use strict; use vars qw( $VERSION ); -$VERSION = '0.15'; +$VERSION = '0.16';
use Carp qw( croak ); use CGI; # want to get rid of this and put the burden on the templates @@ -649,7 +649,7 @@
=head1 COPYRIGHT
- Copyright (C) 2003-2009 The OpenGuides Project. All Rights Reserved. + Copyright (C) 2003-2012 The OpenGuides Project. All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Modified: trunk/lib/OpenGuides.pm =================================================================== --- trunk/lib/OpenGuides.pm 2012-04-12 14:31:41 UTC (rev 1327) +++ trunk/lib/OpenGuides.pm 2012-04-12 14:45:15 UTC (rev 1328) @@ -14,7 +14,7 @@
use vars qw( $VERSION );
-$VERSION = '0.65'; +$VERSION = '0.66';
=head1 NAME
@@ -2338,7 +2338,7 @@
=head1 COPYRIGHT
- Copyright (C) 2003-2010 The OpenGuides Project. All Rights Reserved. + Copyright (C) 2003-2012 The OpenGuides Project. All Rights Reserved.
The OpenGuides distribution is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Modified: trunk/t/25_write_geo_data.t =================================================================== --- trunk/t/25_write_geo_data.t 2012-04-12 14:31:41 UTC (rev 1327) +++ trunk/t/25_write_geo_data.t 2012-04-12 14:45:15 UTC (rev 1328) @@ -16,25 +16,6 @@ plan skip_all => "Plucene not installed"; }
-# Strictly speaking we don't need to skip _all_ tests if we don't have -# the modules below. Revisit this when not in a hurry. -# We only actually need the former two for the National Grid tests and the -# latter for the UTM tests. -eval { require Geo::Coordinates::OSGB; }; -if ( $@ ) { - plan skip_all => "Geo::Coordinates::OSGB not installed"; -} - -eval { require Geo::Coordinates::ITM; }; -if ( $@ ) { - plan skip_all => "Geo::Coordinates::ITM not installed"; -} - -eval { require Geo::Coordinates::UTM; }; -if ( $@ ) { - plan skip_all => "Geo::Coordinates::UTM not installed"; -} - plan tests => 53;
# Clear out the database from any previous runs.
Modified: trunk/t/26_geo_data_search_form.t =================================================================== --- trunk/t/26_geo_data_search_form.t 2012-04-12 14:31:41 UTC (rev 1327) +++ trunk/t/26_geo_data_search_form.t 2012-04-12 14:45:15 UTC (rev 1328) @@ -20,25 +20,6 @@ plan skip_all => "Test::HTML::Content not installed"; }
-# Strictly speaking we don't need to skip _all_ tests if we don't have -# the modules below. Revisit this when not in a hurry. -# We only actually need the former two for the National Grid tests and the -# latter for the UTM tests. -eval { require Geo::Coordinates::OSGB; }; -if ( $@ ) { - plan skip_all => "Geo::Coordinates::OSGB not installed"; -} - -eval { require Geo::Coordinates::ITM; }; -if ( $@ ) { - plan skip_all => "Geo::Coordinates::ITM not installed"; -} - -eval { require Geo::Coordinates::UTM; }; -if ( $@ ) { - plan skip_all => "Geo::Coordinates::UTM not installed"; -} - plan tests => 12;
# Clear out the database from any previous runs.
Modified: trunk/t/27_geo_data_edit_form.t =================================================================== --- trunk/t/27_geo_data_edit_form.t 2012-04-12 14:31:41 UTC (rev 1327) +++ trunk/t/27_geo_data_edit_form.t 2012-04-12 14:45:15 UTC (rev 1328) @@ -20,25 +20,6 @@ plan skip_all => "Test::HTML::Content not installed"; }
-# Strictly speaking we don't need to skip _all_ tests if we don't have -# the modules below. Revisit this when not in a hurry. -# We only actually need the former two for the National Grid tests and the -# latter for the UTM tests. -eval { require Geo::Coordinates::OSGB; }; -if ( $@ ) { - plan skip_all => "Geo::Coordinates::OSGB not installed"; -} - -eval { require Geo::Coordinates::ITM; }; -if ( $@ ) { - plan skip_all => "Geo::Coordinates::ITM not installed"; -} - -eval { require Geo::Coordinates::UTM; }; -if ( $@ ) { - plan skip_all => "Geo::Coordinates::UTM not installed"; -} - plan tests => 18;
# Clear out the database from any previous runs.
Modified: trunk/t/33_search_advanced_search.t =================================================================== --- trunk/t/33_search_advanced_search.t 2012-04-12 14:31:41 UTC (rev 1327) +++ trunk/t/33_search_advanced_search.t 2012-04-12 14:45:15 UTC (rev 1328) @@ -17,10 +17,6 @@ plan skip_all => "Plucene not installed"; }
-eval { require Geo::Coordinates::OSGB; }; -if ( $@ ) { - plan skip_all => "Geo::Coordinates::OSGB not installed"; -}
plan tests => 8;
Modified: trunk/t/33_search_advanced_search_utm.t =================================================================== --- trunk/t/33_search_advanced_search_utm.t 2012-04-12 14:31:41 UTC (rev 1327) +++ trunk/t/33_search_advanced_search_utm.t 2012-04-12 14:45:15 UTC (rev 1328) @@ -16,11 +16,6 @@ plan skip_all => "Plucene not installed"; }
-eval { require Geo::Coordinates::UTM; }; -if ( $@ ) { - plan skip_all => "Geo::Coordinates::UTM not installed"; -} - plan tests => 4;
# Clear out the database from any previous runs.
Modified: trunk/t/34_search_paging.t =================================================================== --- trunk/t/34_search_paging.t 2012-04-12 14:31:41 UTC (rev 1327) +++ trunk/t/34_search_paging.t 2012-04-12 14:45:15 UTC (rev 1328) @@ -28,9 +28,6 @@ my $guide = OpenGuides->new( config => $config );
# Test with OS co-ords. -eval { require Geo::Coordinates::OSGB; }; -SKIP: { - skip "Geo::Coordinates::OSGB not installed", 6 if $@; $config->geo_handler( 1 );
foreach my $i ( 1 .. 50 ) { @@ -64,12 +61,8 @@ "os_y retained in previous page link" ); like( $output, qr/search.cgi?.*os_dist=1500.*Previous.*results/s, "os_dist retained in previous page link" ); -}
# Test with OSIE co-ords. -eval { require Geo::Coordinates::ITM; }; -SKIP: { - skip "Geo::Coordinates::ITM not installed", 6 if $@;
# We must create a new search object after changing the geo_handler # in order to force it to create a fresh locator. @@ -106,12 +99,8 @@ "osie_y retained in previous page link" ); like( $output, qr/search.cgi?.*osie_dist=1500.*Previous.*results/s, "osie_dist retained in previous page link" ); -}
# Test with UTM. -eval { require Geo::Coordinates::UTM; }; -SKIP: { - skip "Geo::Coordinates::UTM not installed", 6 if $@;
# We must create a new search object after changing the geo_handler # in order to force it to create a fresh locator. @@ -148,4 +137,3 @@ "longitude retained in previous page link" ); like( $output, qr/search.cgi?.*latlong_dist=1500.*Previous.*results/s, "latlong_dist retained in previous page link" ); -}
Modified: trunk/t/35_search_two_searches.t =================================================================== --- trunk/t/35_search_two_searches.t 2012-04-12 14:31:41 UTC (rev 1327) +++ trunk/t/35_search_two_searches.t 2012-04-12 14:45:15 UTC (rev 1328) @@ -16,25 +16,7 @@ plan skip_all => "Plucene not installed"; }
-# Strictly speaking we don't need to skip _all_ tests if we don't have -# the modules below. Revisit this when not in a hurry. -# We only actually need the former two for the National Grid tests and the -# latter for the UTM tests. -eval { require Geo::Coordinates::OSGB; }; -if ( $@ ) { - plan skip_all => "Geo::Coordinates::OSGB not installed"; -}
-eval { require Geo::Coordinates::ITM; }; -if ( $@ ) { - plan skip_all => "Geo::Coordinates::ITM not installed"; -} - -eval { require Geo::Coordinates::UTM; }; -if ( $@ ) { - plan skip_all => "Geo::Coordinates::UTM not installed"; -} - plan tests => 10;
# Clear out the database from any previous runs.
Modified: trunk/t/38_search_params.t =================================================================== --- trunk/t/38_search_params.t 2012-04-12 14:31:41 UTC (rev 1327) +++ trunk/t/38_search_params.t 2012-04-12 14:45:15 UTC (rev 1328) @@ -17,25 +17,6 @@ plan skip_all => "Plucene not installed"; }
-# Strictly speaking we don't need to skip _all_ tests if we don't have -# the modules below. Revisit this when not in a hurry. -# We only actually need the former two for the National Grid tests and the -# latter for the UTM tests. -eval { require Geo::Coordinates::OSGB; }; -if ( $@ ) { - plan skip_all => "Geo::Coordinates::OSGB not installed"; -} - -eval { require Geo::Coordinates::ITM; }; -if ( $@ ) { - plan skip_all => "Geo::Coordinates::ITM not installed"; -} - -eval { require Geo::Coordinates::UTM; }; -if ( $@ ) { - plan skip_all => "Geo::Coordinates::UTM not installed"; -} - plan tests => 19;
# Clear out the database from any previous runs.
Modified: trunk/t/39_search_form.t =================================================================== --- trunk/t/39_search_form.t 2012-04-12 14:31:41 UTC (rev 1327) +++ trunk/t/39_search_form.t 2012-04-12 14:45:15 UTC (rev 1328) @@ -20,25 +20,6 @@ plan skip_all => "Test::HTML::Content not installed"; }
-# Strictly speaking we don't need to skip _all_ tests if we don't have -# the modules below. Revisit this when not in a hurry. -# We only actually need the former two for the National Grid tests and the -# latter for the UTM tests. -eval { require Geo::Coordinates::OSGB; }; -if ( $@ ) { - plan skip_all => "Geo::Coordinates::OSGB not installed"; -} - -eval { require Geo::Coordinates::ITM; }; -if ( $@ ) { - plan skip_all => "Geo::Coordinates::ITM not installed"; -} - -eval { require Geo::Coordinates::UTM; }; -if ( $@ ) { - plan skip_all => "Geo::Coordinates::UTM not installed"; -} - plan tests => 27;
# Clear out the database from any previous runs.
Modified: trunk/t/62_bug_trailing_whitespace.t =================================================================== --- trunk/t/62_bug_trailing_whitespace.t 2012-04-12 14:31:41 UTC (rev 1327) +++ trunk/t/62_bug_trailing_whitespace.t 2012-04-12 14:45:15 UTC (rev 1328) @@ -21,10 +21,6 @@ my $config = OpenGuides::Test->make_basic_config; my $guide = OpenGuides->new( config => $config );
-SKIP: { - eval { require Geo::Coordinates::OSGB; }; - skip "Geo::Coordinates::OSGB not installed", 2 if $@; - my $q = CGI->new( "" ); $q->param( -name => "os_x", -value => " 123456 " ); $q->param( -name => "os_y", -value => " 654321 " ); @@ -40,12 +36,9 @@ is( $metadata_vars{os_x}, "123456", "leading and trailing spaces stripped from os_x when processed" ); is( $metadata_vars{os_y}, "654321", "...and os_y" ); -}
-SKIP: { - eval { require Geo::Coordinates::ITM; }; - skip "Geo::Coordinates::ITM not installed", 2 if $@;
+ $config->geo_handler( 2 ); my $q = CGI->new( "" ); $q->param( -name => "osie_x", -value => " 100000 " ); @@ -62,12 +55,7 @@ is( $metadata_vars{osie_x}, "100000", "leading and trailing spaces stripped from osie_x when processed" ); is( $metadata_vars{osie_y}, "200000", "...and osie_y" ); -}
-SKIP: { - eval { require Geo::Coordinates::UTM; }; - skip "Geo::Coordinates::UTM not installed", 2 if $@; - $config->geo_handler( 3 ); my $q = CGI->new( "" ); $q->param( -name => "latitude", -value => " 1.463113 " ); @@ -84,7 +72,6 @@ is( $metadata_vars{latitude}, "1.463113", "leading and trailing spaces stripped from latitude when processed" ); is( $metadata_vars{longitude}, "-0.215293", "...and longitude" ); -}
OpenGuides::Test->write_data( guide => $guide,
Modified: trunk/t/66_bug_latlong_representation.t =================================================================== --- trunk/t/66_bug_latlong_representation.t 2012-04-12 14:31:41 UTC (rev 1327) +++ trunk/t/66_bug_latlong_representation.t 2012-04-12 14:45:15 UTC (rev 1328) @@ -13,10 +13,6 @@ plan skip_all => "DBD::SQLite could not be used - no database to test with ($error)"; }
-eval { require Geo::Coordinates::UTM; }; -if ( $@ ) { - plan skip_all => "Geo::Coordinates::UTM not installed"; -}
plan tests => 4;
Modified: trunk/t/69_bug_zero_geo.t =================================================================== --- trunk/t/69_bug_zero_geo.t 2012-04-12 14:31:41 UTC (rev 1327) +++ trunk/t/69_bug_zero_geo.t 2012-04-12 14:45:15 UTC (rev 1328) @@ -74,7 +74,6 @@
is( @{$details{metadata}->{osie_x}}[0], 0, "Zero osie_x saved" ); is( @{$details{metadata}->{osie_y}}[0], 0, "Zero osie_y saved" ); - $config->{geo_handler} = 3;
Wiki::Toolkit::Setup::SQLite::cleardb( { dbname => "t/node.db" } );
Modified: trunk/t/91_username_in_templates.t =================================================================== --- trunk/t/91_username_in_templates.t 2012-04-12 14:31:41 UTC (rev 1327) +++ trunk/t/91_username_in_templates.t 2012-04-12 14:45:15 UTC (rev 1328) @@ -27,7 +27,10 @@ node => "Ship Of Fools", return_output => 1, ); - +# Make sure the tmp directory exists +eval { + mkdir cwd . "/t/templates/tmp"; +}; # Write a custom banner template that includes the username. eval { unlink cwd . "/t/templates/tmp/custom_banner.tt";
Modified: trunk/wiki.cgi =================================================================== --- trunk/wiki.cgi 2012-04-12 14:31:41 UTC (rev 1327) +++ trunk/wiki.cgi 2012-04-12 14:45:15 UTC (rev 1328) @@ -4,7 +4,7 @@ use warnings; use sigtrap die => 'normal-signals'; use vars qw( $VERSION ); -$VERSION = '0.65'; +$VERSION = '0.66';
use CGI qw/:standard/; use CGI::Carp qw(croak);
openguides-commits@lists.openguides.org