<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -18,7 +18,14 @@ h3. Usage
 		...
 	end
 	
-The plugin populates the @@referring_search@ variable which can then be passed to a keyword highlighter or internal site search engine to pull related content.
-
-
-Copyright (c) 2008 Wynn Netherland, Squeejee, released under the MIT license
+The plugin populates the @@referring_search@ object containing info that can be passed to a keyword highlighter or internal site search engine to pull related content.
+ 
+  # http://www.google.com/search?q=ruby+on+rails+houston&amp;ie=utf-8&amp;oe=utf-8&amp;aq=t&amp;rls=org.mozilla:en-US:official&amp;client=firefox-a
+	@referring_search.search_terms
+	 =&gt; &quot;ruby rails houston&quot; 
+	@referring_search.raw
+	 =&gt; &quot;ruby on rails houston&quot;
+	@referring_search.engine
+	 =&gt; &quot;google&quot;
+
+Copyright (c) 2008 Squeejee, released under the MIT license</diff>
      <filename>README.textile</filename>
    </modified>
    <modified>
      <diff>@@ -16,9 +16,7 @@ module Squeejee  #:nodoc:
         # uncomment out the line below to test
     		# request.env[&quot;HTTP_REFERER&quot;] = &quot;http://www.google.com/search?q=ruby+on+rails+houston&amp;ie=utf-8&amp;oe=utf-8&amp;aq=t&amp;rls=org.mozilla:en-US:official&amp;client=firefox-a&quot;
         referer = request.env[&quot;HTTP_REFERER&quot;]
-        rs = ReferringSearch.new(referer)
-        @referring_search = rs.referring_search
-        @referring_search_raw = rs.raw
+        @referring_search = ReferringSearch.new(referer)
         true
       end # sniff_referring_search
     end # Module Controller Methods
@@ -26,16 +24,12 @@ module Squeejee  #:nodoc:
       
       class ReferringSearch
         
-        attr_accessor :search_referers
-        attr_accessor :stop_words
-        
-        attr_reader :referring_search
-        attr_reader :raw
+        attr_reader :search_terms # sanitized search terms
+        attr_reader :raw # original terms as typed by user
+        attr_reader :engine # search engine
       
         def initialize(referer)
-          # stop words is a variable
-          # .raw .original as they typed to_s, including blacklisted stuff
-          # .ref
+          
           @search_referers = {
                 :google     =&gt; [/^http:\/\/(www\.)?google.*/, 'q'],
                 :yahoo      =&gt; [/^http:\/\/search\.yahoo.*/, 'p'],
@@ -64,8 +58,8 @@ module Squeejee  #:nodoc:
               # Check if the referrer is a search engine we are targetting
               if (reg.match(referer))
 
-                # Highlight the Search Term Keywords on the page
-                #@javascripts.push('keyword_highlighter')
+                # set the search engine
+                @engine = k 
 
                 unless query_args.empty?
                   query_args.split(&quot;&amp;&quot;).each do |arg|
@@ -73,8 +67,8 @@ module Squeejee  #:nodoc:
                     if pieces.length == 2 &amp;&amp; pieces.first == query_param_name
                       unstopped_keywords = CGI.unescape(pieces.last)
                       @raw = unstopped_keywords
-                      @referring_search = unstopped_keywords.gsub(@stop_words, '').squeeze(' ')
-                      #logger.info(&quot;Referring Search Keywords: #{referring_search}&quot;)
+                      @search_terms = unstopped_keywords.gsub(@stop_words, '').squeeze(' ')
+                      #logger.info(&quot;Referring Search Keywords: #{search_terms}&quot;)
                       return true
                     end
                   end
@@ -88,7 +82,7 @@ module Squeejee  #:nodoc:
         
         # Return the referring search string instead of the object serialized into a string
         def to_s
-          return @referring_search
+          @search_terms
         end
         
       end # ReferringSearch</diff>
      <filename>lib/search_sniffer.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>a17b6a15433cc060fd2599f56ec8cbd9af555661</id>
    </parent>
  </parents>
  <author>
    <name>Wynn Netherland</name>
    <email>wynn@squeejee.com</email>
  </author>
  <url>http://github.com/squeejee/search_sniffer/commit/408d5a814f082ee09d7f3ab3d7dd072bdfd3f2a8</url>
  <id>408d5a814f082ee09d7f3ab3d7dd072bdfd3f2a8</id>
  <committed-date>2008-07-17T18:35:13-07:00</committed-date>
  <authored-date>2008-07-17T18:35:13-07:00</authored-date>
  <message>Updated README.textile, commented lib</message>
  <tree>7c74458696a8b853772c967c8c2ccf58b5f562ca</tree>
  <committer>
    <name>Wynn Netherland</name>
    <email>wynn@squeejee.com</email>
  </committer>
</commit>
