<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -6,6 +6,12 @@ RAILS_ENV = &quot;development&quot; unless defined? RAILS_ENV
 
 require 'active_record'
 require 'ultrasphinx'
+
+module Ambition::Adapters
+  module AmbitiousSphinx
+  end
+end
+
 %w(base page query select sort slice).each do |base|
   require &quot;ambition/adapters/ambitious_sphinx/#{base}&quot;
 end
@@ -22,4 +28,5 @@ end
 # You probably want something like this:
 #
 ActiveRecord::Base.extend Ambition::API
-ActiveRecord::Base.ambition_adapter = Ambition::Adapters::AmbitiousSphinx
\ No newline at end of file
+ActiveRecord::Base.ambition_adapter = Ambition::Adapters::AmbitiousSphinx
+</diff>
      <filename>lib/ambition/adapters/ambitious_sphinx.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,26 +1,22 @@
-module Ambition #:nodoc:
-  module Adapters #:nodoc:
-    module AmbitiousSphinx
-      class Base
-        def has_field? str
-          str =~ /:/
-        end
-        
-        def has_operator? str
-          str =~ /(AND|OR|NOT)/
-        end
-        
-        def needs_quoting? str
-          not (has_operator?(str) or has_field?(str))
-        end
-        
-        def quotify str
-          if needs_quoting?(str)
-            %Q(&quot;#{str}&quot;)
-          else
-            str
-          end
-        end
+module Ambition::Adapters::AmbitiousSphinx
+  class Base
+    def has_field? str
+      str =~ /:/
+    end
+    
+    def has_operator? str
+      str =~ /(AND|OR|NOT)/
+    end
+    
+    def needs_quoting? str
+      not (has_operator?(str) or has_field?(str))
+    end
+    
+    def quotify str
+      if needs_quoting?(str)
+        %Q(&quot;#{str}&quot;)
+      else
+        str
       end
     end
   end</diff>
      <filename>lib/ambition/adapters/ambitious_sphinx/base.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,40 +1,48 @@
-module Ambition #:nodoc:
-  module Adapters #:nodoc:
-    module AmbitiousSphinx
-      # Responsible for taking the clauses that Ambition has generated, and ultimately doing a
-      # Ultrasphinx::Search based on them
-      class Query &lt; Base
-        def kick
-          Ultrasphinx::Search.new(to_hash).results
-        end
+module Ambition::Adapters::AmbitiousSphinx
+  # Responsible for taking the clauses that Ambition has generated, and ultimately doing a
+  # Ultrasphinx::Search based on them
+  class Query &lt; Base
+    def kick
+      Ultrasphinx::Search.new(to_hash).results
+    end
 
-        # Not entirely sure what this is for, so unimplemented so far.
-        def size
-          raise &quot;Not implemented yet.&quot;
-        end
+    # Some magic to add pagination. this gets called if you were to do:
+    #
+    #   Meal.select {'bacon'}.page(5)
+    #
+    # When +page+ is invoked, it's actually being invoked on +Ambition::Context+.
+    # It has +method_missing+? voodoo which will try to pass the method onto
+    # the +Query+. That's this class.
+    def page(number)
+      stash[:page] = number
+      context
+    end
 
-        # Builds a hash of options for Ultrasphinx::Search based on the clauses Ambition has generated.
-        def to_hash
-          hash = {}
+    # Not entirely sure what this is for, so unimplemented so far.
+    def size
+      raise &quot;Not implemented yet.&quot;
+    end
+    
+    # Builds a hash of options for Ultrasphinx::Search based on the clauses Ambition has generated.
+    def to_hash
+      hash = {}
 
-          unless (query = clauses[:select]).blank?
-            query_s = query.join(' ').squeeze(' ').strip 
-            hash[:query] = quotify(query_s)
-          end
-          
-          unless (page = clauses[:page]).blank?
-            hash[:page] = page.first
-          end
+      unless (query = clauses[:select]).blank?
+        query_s = query.join(' ').squeeze(' ').strip 
+        hash[:query] = quotify(query_s)
+      end
+      
+      unless (page = stash[:page]).blank?
+        hash[:page] = page
+      end
 
-          hash
-        end
+      hash
+    end
 
-        # Prints out the query that would be executed.
-        def to_s
-          hash = to_hash
-          hash[:query]
-        end
-      end
+    # Prints out the query that would be executed.
+    def to_s
+      hash = to_hash
+      hash[:query]
     end
   end
 end</diff>
      <filename>lib/ambition/adapters/ambitious_sphinx/query.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,107 +1,103 @@
-module Ambition #:nodoc:
-  module Adapters #:nodoc:
-    module AmbitiousSphinx
-      # Select is responsible for taking pure Ruby, and mangling it until it resembles
-      # the syntax that Ultrasphinx[http://blog.evanweaver.com/files/doc/fauna/ultrasphinx/files/README.html] uses.
-      class Select &lt; Base
-        # method calls
-        # converts
-        def call(method)
-          &quot;#{method.to_s}:&quot;
-        end
+module Ambition::Adapters::AmbitiousSphinx
+  # Select is responsible for taking pure Ruby, and mangling it until it resembles
+  # the syntax that Ultrasphinx[http://blog.evanweaver.com/files/doc/fauna/ultrasphinx/files/README.html] uses.
+  class Select &lt; Base
+    # method calls
+    # converts
+    def call(method)
+      &quot;#{method.to_s}:&quot;
+    end
 
-        # Should we be supporting chained calls like:
-        #
-        #   u.name.downcase
-        #
-        # ?
-        # 
-        # I don't think Sphinx would be able to handle this.
-        def chained_call(*methods)
-          raise &quot;Not implemented yet.&quot;
-        end
+    # Should we be supporting chained calls like:
+    #
+    #   u.name.downcase
+    #
+    # ?
+    # 
+    # I don't think Sphinx would be able to handle this.
+    def chained_call(*methods)
+      raise &quot;Not implemented yet.&quot;
+    end
 
-        # Handles generating an Ultrasphinx query for code like:
-        #
-        #   'foo' &amp;&amp; 'bar'
-        def both(left, right)
-          &quot;#{quotify left} AND #{quotify right}&quot;
-        end
+    # Handles generating an Ultrasphinx query for code like:
+    #
+    #   'foo' &amp;&amp; 'bar'
+    def both(left, right)
+      &quot;#{quotify left} AND #{quotify right}&quot;
+    end
 
-        # Handles generating an Ultrasphinx query for code like:
-        #
-        #   'foo' || 'bar'
-        def either(left, right)
-          &quot;#{quotify left} OR #{quotify right}&quot;
-        end
+    # Handles generating an Ultrasphinx query for code like:
+    #
+    #   'foo' || 'bar'
+    def either(left, right)
+      &quot;#{quotify left} OR #{quotify right}&quot;
+    end
 
-        # Sphinx doesn't support equality.
-        def ==(left, right)
-          raise &quot;Not applicable to sphinx.&quot;
-        end
+    # Sphinx doesn't support equality.
+    def ==(left, right)
+      raise &quot;Not applicable to sphinx.&quot;
+    end
 
-        # Sphinx doesn't support inequality.
-        def not_equal(left, right)
-          raise &quot;Not applicable to sphinx.&quot;
-        end
+    # Sphinx doesn't support inequality.
+    def not_equal(left, right)
+      raise &quot;Not applicable to sphinx.&quot;
+    end
 
-        # Handles generating an Ultrasphinx query for code like:
-        #
-        #   u.name =~ 'bob'
-        #
-        # Some cavaets:
-        #  * left hand side _must_ be a field, like u.name
-        #  * right hand side _must not_ be a regular expression. Pattern matching is generally not
-        #    supported by full text search engines
-        def =~(left, right)
-          raise if right.is_a? Regexp
-          &quot;#{left}#{quotify right}&quot;
-        end
+    # Handles generating an Ultrasphinx query for code like:
+    #
+    #   u.name =~ 'bob'
+    #
+    # Some cavaets:
+    #  * left hand side _must_ be a field, like u.name
+    #  * right hand side _must not_ be a regular expression. Pattern matching is generally not
+    #    supported by full text search engines
+    def =~(left, right)
+      raise if right.is_a? Regexp
+      &quot;#{left}#{quotify right}&quot;
+    end
 
-        # Handles generating an Ultrasphinx query for code like:
-        #
-        #   u.name !~ 'bob'
-        #
-        # Some cavaets:
-        #  * left hand side _must_ be a field, like u.name
-        #  * right hand side _must not_ be a regular expression. Pattern matching is generally not
-        #    supported by full text search engines
-        def not_regexp(left, right)
-          # could be DRYer, but this is more readable than: &quot;NOT #{self.=~(left,right)}&quot;
-          raise if right.is_a? Regexp
-          &quot;NOT #{left}#{quotify right}&quot;
-        end
+    # Handles generating an Ultrasphinx query for code like:
+    #
+    #   u.name !~ 'bob'
+    #
+    # Some cavaets:
+    #  * left hand side _must_ be a field, like u.name
+    #  * right hand side _must not_ be a regular expression. Pattern matching is generally not
+    #    supported by full text search engines
+    def not_regexp(left, right)
+      # could be DRYer, but this is more readable than: &quot;NOT #{self.=~(left,right)}&quot;
+      raise if right.is_a? Regexp
+      &quot;NOT #{left}#{quotify right}&quot;
+    end
 
-        # Not supported by Sphinx. If you need this kind of comparison, you probably should be
-        # using ambitious-activerecord.
-        def &lt;(left, right)
-          raise &quot;Not applicable to sphinx.&quot;
-        end
+    # Not supported by Sphinx. If you need this kind of comparison, you probably should be
+    # using ambitious-activerecord.
+    def &lt;(left, right)
+      raise &quot;Not applicable to sphinx.&quot;
+    end
 
-        # Not supported by Sphinx. If you need this kind of comparison, you probably should be
-        # using ambitious-activerecord.
-        def &gt;(left, right)
-          raise &quot;Not applicable to sphinx.&quot;
-        end
+    # Not supported by Sphinx. If you need this kind of comparison, you probably should be
+    # using ambitious-activerecord.
+    def &gt;(left, right)
+      raise &quot;Not applicable to sphinx.&quot;
+    end
 
-        # Not supported by Sphinx. If you need this kind of comparison, you probably should be
-        # using ambitious-activerecord.
-        def &gt;=(left, right)
-          raise &quot;Not applicable to sphinx.&quot;
-        end
+    # Not supported by Sphinx. If you need this kind of comparison, you probably should be
+    # using ambitious-activerecord.
+    def &gt;=(left, right)
+      raise &quot;Not applicable to sphinx.&quot;
+    end
 
-        # Not supported by Sphinx. If you need this kind of comparison, you probably should be
-        # using ambitious-activerecord.
-        def &lt;=(left, right)
-          raise &quot;Not applicable to sphinx.&quot;
-        end
+    # Not supported by Sphinx. If you need this kind of comparison, you probably should be
+    # using ambitious-activerecord.
+    def &lt;=(left, right)
+      raise &quot;Not applicable to sphinx.&quot;
+    end
 
-        # Not supported by Sphinx. If you need this kind of comparison, you probably should be
-        # using ambitious-activerecord.
-        def include?(left, right)
-          raise &quot;Not applicable to sphinx.&quot;
-        end
-      end
+    # Not supported by Sphinx. If you need this kind of comparison, you probably should be
+    # using ambitious-activerecord.
+    def include?(left, right)
+      raise &quot;Not applicable to sphinx.&quot;
     end
   end
 end</diff>
      <filename>lib/ambition/adapters/ambitious_sphinx/select.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,19 +1,15 @@
-module Ambition #:nodoc:
-  module Adapters #:nodoc:
-    module AmbitiousSphinx
-      class Slice &lt; Base
-        # &gt;&gt; User.first(5)
-        # =&gt; #slice(0, 5)
-        #
-        # &gt;&gt; User.first
-        # =&gt; #slice(0, 1)
-        #
-        # &gt;&gt; User[10, 20]
-        # =&gt; #slice(10, 20)
-        def slice(start, length)
-          raise &quot;Not implemented.&quot;
-        end
-      end
+module Ambition::Adapters::AmbitiousSphinx
+  class Slice &lt; Base
+    # &gt;&gt; User.first(5)
+    # =&gt; #slice(0, 5)
+    #
+    # &gt;&gt; User.first
+    # =&gt; #slice(0, 1)
+    #
+    # &gt;&gt; User[10, 20]
+    # =&gt; #slice(10, 20)
+    def slice(start, length)
+      raise &quot;Not implemented.&quot;
     end
   end
 end</diff>
      <filename>lib/ambition/adapters/ambitious_sphinx/slice.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,43 +1,39 @@
-module Ambition #:nodoc:
-  module Adapters #:nodoc:
-    module AmbitiousSphinx
-      class Sort &lt; Base
-        # &gt;&gt; sort_by { |u| u.age }
-        # =&gt; #sort_by(:age)
-        def sort_by(method)
-          raise &quot;Not implemented.&quot;
-        end
+module Ambition::Adapters::AmbitiousSphinx
+  class Sort &lt; Base
+    # &gt;&gt; sort_by { |u| u.age }
+    # =&gt; #sort_by(:age)
+    def sort_by(method)
+      raise &quot;Not implemented.&quot;
+    end
 
-        # &gt;&gt; sort_by { |u| -u.age }
-        # =&gt; #reverse_sort_by(:age)
-        def reverse_sort_by(method)
-          raise &quot;Not implemented.&quot;
-        end
+    # &gt;&gt; sort_by { |u| -u.age }
+    # =&gt; #reverse_sort_by(:age)
+    def reverse_sort_by(method)
+      raise &quot;Not implemented.&quot;
+    end
 
-        # &gt;&gt; sort_by { |u| u.profile.name }
-        # =&gt; #chained_sort_by(:profile, :name)
-        def chained_sort_by(receiver, method)
-          raise &quot;Not implemented.&quot;
-        end
+    # &gt;&gt; sort_by { |u| u.profile.name }
+    # =&gt; #chained_sort_by(:profile, :name)
+    def chained_sort_by(receiver, method)
+      raise &quot;Not implemented.&quot;
+    end
 
-        # &gt;&gt; sort_by { |u| -u.profile.name }
-        # =&gt; #chained_reverse_sort_by(:profile, :name)
-        def chained_reverse_sort_by(receiver, method)
-          raise &quot;Not implemented.&quot;
-        end
+    # &gt;&gt; sort_by { |u| -u.profile.name }
+    # =&gt; #chained_reverse_sort_by(:profile, :name)
+    def chained_reverse_sort_by(receiver, method)
+      raise &quot;Not implemented.&quot;
+    end
 
-        # &gt;&gt; sort_by(&amp;:name)
-        # =&gt; #to_proc(:name)
-        def to_proc(symbol)
-          raise &quot;Not implemented.&quot;
-        end
+    # &gt;&gt; sort_by(&amp;:name)
+    # =&gt; #to_proc(:name)
+    def to_proc(symbol)
+      raise &quot;Not implemented.&quot;
+    end
 
-        # &gt;&gt; sort_by { rand }
-        # =&gt; #rand
-        def rand
-          raise &quot;Not implemented.&quot;
-        end
-      end
+    # &gt;&gt; sort_by { rand }
+    # =&gt; #rand
+    def rand
+      raise &quot;Not implemented.&quot;
     end
   end
 end</diff>
      <filename>lib/ambition/adapters/ambitious_sphinx/sort.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>lib/ambition/adapters/ambitious_sphinx/page.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>ab233553df8a754d592a0cdf9579aced08b7e5e2</id>
    </parent>
  </parents>
  <author>
    <name>Josh Nichols</name>
    <email>josh@technicalpickles.com</email>
  </author>
  <url>http://github.com/technicalpickles/ambitious-sphinx/commit/c1588c2424dbf9b47f16ef40bde58d34ce0ac6a6</url>
  <id>c1588c2424dbf9b47f16ef40bde58d34ce0ac6a6</id>
  <committed-date>2008-02-29T16:05:54-08:00</committed-date>
  <authored-date>2008-02-29T16:05:54-08:00</authored-date>
  <message>Playing around with modules.</message>
  <tree>07b0a33dde7b3b16498c2a695d11a2ed06e374e9</tree>
  <committer>
    <name>Josh Nichols</name>
    <email>josh@technicalpickles.com</email>
  </committer>
</commit>
