[Rt-commit] rt branch, 4.2/rename-googleish, created. rt-4.1.6-226-gef31343

Kevin Falcone falcone at bestpractical.com
Fri Feb 8 19:07:40 EST 2013


The branch, 4.2/rename-googleish has been created
        at  ef31343c458345e112bddd55562dd30ba9fd375b (commit)

- Log -----------------------------------------------------------------
commit ef31343c458345e112bddd55562dd30ba9fd375b
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Fri Feb 8 18:44:55 2013 -0500

    Rename the Googleish search to Simple
    
    It really isn't that googleish and it's always been confusing that the
    Simple search is backed by the Googleish module.  This is effectively
    just a few well placed s/Googleish/Simple/ and some git moves.

diff --git a/docs/UPGRADING-4.2 b/docs/UPGRADING-4.2
index d7a1484..9257929 100644
--- a/docs/UPGRADING-4.2
+++ b/docs/UPGRADING-4.2
@@ -71,3 +71,8 @@ UPGRADING FROM RT 4.0.0 and greater
   result of a queue change.  Scrips with conditions relying on Status changes
   may start to trigger on these transitions; previously these Status changes
   never triggered scrips.
+
+* The Googleish search has been renamed to Simple. If you were
+  using this in an rt-crontool cronjob or had used a
+  Googleish_Local.pm to add features, you will need to convert to
+  using RT::Search::Simple instead.
diff --git a/lib/RT/Search/Googleish.pm b/lib/RT/Search/Simple.pm
similarity index 98%
rename from lib/RT/Search/Googleish.pm
rename to lib/RT/Search/Simple.pm
index f8465f0..83dc6c6 100644
--- a/lib/RT/Search/Googleish.pm
+++ b/lib/RT/Search/Simple.pm
@@ -48,19 +48,19 @@
 
 =head1 NAME
 
-  RT::Search::Googleish
+  RT::Search::Simple
 
 =head1 SYNOPSIS
 
 =head1 DESCRIPTION
 
-Use the argument passed in as a "Google-style" set of keywords
+Use the argument passed in as a simple set of keywords
 
 =head1 METHODS
 
 =cut
 
-package RT::Search::Googleish;
+package RT::Search::Simple;
 
 use strict;
 use warnings;
diff --git a/share/html/Search/Simple.html b/share/html/Search/Simple.html
index cb56c83..ddaf944 100644
--- a/share/html/Search/Simple.html
+++ b/share/html/Search/Simple.html
@@ -98,7 +98,7 @@
 
 <%INIT>
 my $title = loc("Search for tickets");
-use RT::Search::Googleish;
+use RT::Search::Simple;
 
 if ($q) {
     my $tickets = RT::Tickets->new( $session{'CurrentUser'} );
@@ -115,7 +115,7 @@ if ($q) {
 
     $m->callback( %ARGS, CallbackName => 'SearchArgs', args => \%args);
 
-    my $search = RT::Search::Googleish->new(%args);
+    my $search = RT::Search::Simple->new(%args);
 
     $m->comp( "Results.html", Query => $search->QueryToSQL() );
     $m->comp( "/Elements/Footer" );
diff --git a/share/html/m/tickets/search b/share/html/m/tickets/search
index 55d187b..b5ae8e4 100644
--- a/share/html/m/tickets/search
+++ b/share/html/m/tickets/search
@@ -52,7 +52,7 @@ $order => 'desc'
 $name => undef
 </%args>
 <%init>
-use RT::Search::Googleish;
+use RT::Search::Simple;
 my $query = $ARGS{'query'};
 if ($ARGS{'q'}) {
     my $tickets = RT::Tickets->new( $session{'CurrentUser'} );
@@ -60,7 +60,7 @@ if ($ARGS{'q'}) {
         Argument   => $ARGS{q},
         TicketsObj => $tickets,
     );
-    my $search = RT::Search::Googleish->new(%args);
+    my $search = RT::Search::Simple->new(%args);
     $query = $search->QueryToSQL();
 
 }
diff --git a/t/ticket/googleish_search.t b/t/ticket/simple_search.t
similarity index 94%
rename from t/ticket/googleish_search.t
rename to t/ticket/simple_search.t
index d372801..d9dd354 100644
--- a/t/ticket/googleish_search.t
+++ b/t/ticket/simple_search.t
@@ -20,12 +20,12 @@ my ( $id, undef, $msg ) = $t1->Create(
 );
 ok( $id, $msg );
 
-use_ok("RT::Search::Googleish");
+use_ok("RT::Search::Simple");
 
 my $active_statuses = join( " OR ", map "Status = '$_'", RT::Queue->ActiveStatusArray());
 
 my $tickets = RT::Tickets->new(RT->SystemUser);
-my $quick = RT::Search::Googleish->new(Argument => "",
+my $quick = RT::Search::Simple->new(Argument => "",
                                  TicketsObj => $tickets);
 my @tests = (
     "General new open root"     => "( Owner = 'root' ) AND ( Queue = 'General' ) AND ( Status = 'new' OR Status = 'open' )", 
diff --git a/t/web/googleish_search.t b/t/web/simple_search.t
similarity index 99%
rename from t/web/googleish_search.t
rename to t/web/simple_search.t
index eb5bdcf..17930c8 100644
--- a/t/web/googleish_search.t
+++ b/t/web/simple_search.t
@@ -21,8 +21,8 @@ ok $two_words_queue && $two_words_queue->id, 'loaded or created a queue';
     my $active = "( ".join( " OR ", map "Status = '$_'", RT::Queue->ActiveStatusArray())." )";
     my $inactive = "( ".join( " OR ", map "Status = '$_'", RT::Queue->InactiveStatusArray())." )";
 
-    require RT::Search::Googleish;
-    my $parser = RT::Search::Googleish->new(
+    require RT::Search::Simple;
+    my $parser = RT::Search::Simple->new(
         TicketsObj => $tickets,
         Argument   => '',
     );

-----------------------------------------------------------------------


More information about the Rt-commit mailing list