<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,14 +1,17 @@
 module RPH
   module EasySearch
-    # module to hold any regexp constants when dealing with
-    # search terms
-    module RegExp
-      EMAIL = /(\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,6})/
-    end
+    require 'ostruct'
     
-    # these keywords will be removed from any search terms, as they
-    # provide no value and just increase the size of the query.
-    # (the idea is a small attempt to be as efficient as possible)
-    DEFAULT_DULL_KEYWORDS = ['a', 'the', 'and', 'or']
+    # holds any regexp constants when dealing with search terms
+    Regex = OpenStruct.new(
+      :email =&gt; /(\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,6})/
+    )
+    
+    Defaults = OpenStruct.new(
+      # these keywords will be removed from any search terms, as they
+      # provide no value and just increase the size of the query.
+      # (the idea is a small attempt to be as efficient as possible)
+      :dull_keywords =&gt; ['a', 'the', 'and', 'or']
+    )
   end
 end
\ No newline at end of file</diff>
      <filename>lib/easy_search/constants.rb</filename>
    </modified>
    <modified>
      <diff>@@ -108,13 +108,13 @@ module RPH
         #
         # TODO: refactor this method to be less complex for such a simple problem.
         def extract(terms, options={})
-          return [terms] if options[:exact]
+          return [terms] if options.delete(:exact)
           
           terms.gsub!(&quot;'&quot;, &quot;&quot;)
           emails = strip_emails_from(terms)
           
           keywords = unless emails.blank?            
-            emails.inject(terms.gsub(RegExp::EMAIL, '').scan(/\w+/)) { |t, email| t &lt;&lt; email }
+            emails.inject(terms.gsub(Regex.email, '').scan(/\w+/)) { |t, email| t &lt;&lt; email }
           else
             terms.scan(/\w+/)
           end
@@ -124,7 +124,7 @@ module RPH
              
         # extracts the emails from the keywords
         def strip_emails_from(text)
-      	  text.split.reject { |t| t.match(RegExp::EMAIL) == nil }
+      	  text.split.reject { |t| t.match(Regex.email) == nil }
       	end
       	
       	# converts the symbol representation of a table to an actual ActiveRecord model</diff>
      <filename>lib/easy_search/core.rb</filename>
    </modified>
    <modified>
      <diff>@@ -18,7 +18,7 @@ module RPH
         #   $&gt; Setup.dull_keywords
         #   $&gt; =&gt; ['a', 'and', 'but', 'the', ...]
         def dull_keywords
-          (@@dull_keywords ||= DEFAULT_DULL_KEYWORDS).flatten.uniq
+          (@@dull_keywords ||= Defaults.dull_keywords).flatten.uniq
         end
         
         # accepts a block that specifies the columns</diff>
      <filename>lib/easy_search/setup.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>d75fdfd54c88c9692f8b09de8fb04171287486fc</id>
    </parent>
  </parents>
  <author>
    <name>rpheath</name>
    <email>rpheath@gmail.com</email>
  </author>
  <url>http://github.com/rpheath/easy_search/commit/d70faff6cb0845d39d3e50cbf17374d62dfedf89</url>
  <id>d70faff6cb0845d39d3e50cbf17374d62dfedf89</id>
  <committed-date>2008-10-27T07:10:58-07:00</committed-date>
  <authored-date>2008-10-27T07:10:58-07:00</authored-date>
  <message>OpenStruct access to constants</message>
  <tree>d614dd6af85ba3601248ab97dce46ed77496f7a7</tree>
  <committer>
    <name>rpheath</name>
    <email>rpheath@gmail.com</email>
  </committer>
</commit>
