<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -43,9 +43,9 @@ Otherwise, specify where sphinx has been installed to:
 
     sudo gem install rlibsphinxclient --no-ri --no-rdoc -- --with-libsphinxclient-dir=/opt/sphinx-0.9.9
 
-On Mac OS X you should specify &lt;tt&gt;ARCH&lt;/tt&gt; environment variable:
+On Mac OS X you should specify &lt;tt&gt;ARCHFLAGS&lt;/tt&gt; environment variable:
 
-    env sudo gem install rlibsphinxclient --no-rdoc --no-ri -- --with-libsphinxclient-dir=/opt/sphinx-0.9.9
+    env ARCHFLAGS=&quot;-arch i386&quot; sudo gem install rlibsphinxclient --no-rdoc --no-ri -- --with-libsphinxclient-dir=/opt/sphinx-0.9.9
 
 == Using the rlibsphinxclient gem
 </diff>
      <filename>README.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -1,28 +1,31 @@
-# = client.rb - Sphinx Client API
+# = client.rb - Pure Ruby Sphinx client API
 # 
 # Author::    Dmytro Shteflyuk &lt;mailto:kpumuk@kpumuk.info&gt;.
-# Copyright:: Copyright (c) 2006 - 2008 Dmytro Shteflyuk
-# License::   Distributes under the same terms as Ruby
-# Version::   0.4.0-r1112
+# Copyright:: Copyright (c) 2006 - 2009 Dmytro Shteflyuk
+# License::   Distributes under the GPLv2 license.
+# Version::   0.2.0
 # Website::   http://kpumuk.info/projects/ror-plugins/sphinx
 #
-# This library is distributed under the terms of the Ruby license.
-# You can freely distribute/modify this library.
+# This library is distributed under the terms of the GPLv2 license.
 
-# ==Sphinx Client API
+# == Sphinx Client API
 # 
 # The Sphinx Client API is used to communicate with &lt;tt&gt;searchd&lt;/tt&gt;
 # daemon and get search results from Sphinx.
 # 
-# ===Usage
+# === Usage
 # 
-#   sphinx = Sphinx::Client.new
-#   result = sphinx.Query('test')
-#   ids = result['matches'].map { |match| match['id'] }.join(',')
-#   posts = Post.find :all, :conditions =&gt; &quot;id IN (#{ids})&quot;
+#   begin
+#     sphinx = Sphinx::Client.new
+#     result = sphinx.Query('test')
+#     ids = result['matches'].map { |match| match['id'] }.join(',')
+#     posts = Post.find :all, :conditions =&gt; &quot;id IN (#{ids})&quot;
 #   
-#   docs = posts.map(&amp;:body)
-#   excerpts = sphinx.BuildExcerpts(docs, 'index', 'test')
+#     docs = posts.map(&amp;:body)
+#     excerpts = sphinx.BuildExcerpts(docs, 'index', 'test')
+#   ensure
+#     sphinx.destroy
+#   end
 
 require 'socket'
 
@@ -40,6 +43,7 @@ module Sphinx
 
   # :startdoc:
 
+  # A pure Ruby Sphinx client API.
   class Client
   
     # :stopdoc:</diff>
      <filename>lib/sphinx/client.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,24 +1,60 @@
+# = fast_client.rb - Wrapper for pure C Sphinx client API
+# 
+# Author::    Dmytro Shteflyuk &lt;mailto:kpumuk@kpumuk.info&gt;.
+# Copyright:: Copyright (c) 2009 Dmytro Shteflyuk
+# License::   Distributes under the GPLv2 license.
+# Version::   0.2.0
+# Website::   http://kpumuk.info/projects/ror-plugins/sphinx
+#
+# This library is distributed under the terms of the GPLv2 license.
+
+# == Sphinx Client API
+# 
+# The Sphinx Client API is used to communicate with &lt;tt&gt;searchd&lt;/tt&gt;
+# daemon and get search results from Sphinx.
+# 
+# === Usage
+# 
+#   begin
+#     sphinx = Sphinx::FastClient.new
+#     result = sphinx.Query('test')
+#     ids = result['matches'].map { |match| match['id'] }.join(',')
+#     posts = Post.find :all, :conditions =&gt; &quot;id IN (#{ids})&quot;
+#   
+#     docs = posts.map(&amp;:body)
+#     excerpts = sphinx.BuildExcerpts(docs, 'index', 'test')
+#   ensure
+#     sphinx.destroy
+#   end
+
 module Sphinx
+
+  # A wrapper for pure C Sphinx client API.
   class FastClient
     Lib = Rlibsphinxclient
 
+    # Constructs the &lt;tt&gt;Sphinx::FastClient&lt;/tt&gt; object and sets options to their default values.
     def initialize
       @sphinx = Lib.sphinx_create(true)
     end
-    
+
+    # Destroys all internal memory buffers. Should be called when Sphinx API is no needed.
     def destroy
       Lib.sphinx_destroy(@sphinx)
       @sphinx = nil
     end
     
+    # See Client.GetLastError for details.
     def GetLastError
       Lib.sphinx_error(@sphinx)
     end
 
+    # See Client.GetLastWarning for details.
     def GetLastWarning
       Lib.sphinx_warning(@sphinx)
     end
     
+    # See Client.SetServer for details.
     def SetServer(host, port)
       Lib.sphinx_set_server(@sphinx, host, port)
     end
@@ -27,97 +63,120 @@ module Sphinx
       Lib.sphinx_set_connect_timeout(@sphinx, seconds)
     end
 
+    # See Client.SetLimits for details.
     def SetLimits(offset, limit, max_matches = 0, cutoff = 0)
       Lib.sphinx_set_limits(@sphinx, offset, limit, max_matches, cutoff)
     end
 
+    # See Client.SetMaxQueryTime for details.
     def SetMaxQueryTime(max_query_time)
       Lib.sphinx_set_max_query_time(@sphinx, max_query_time)
     end
 
+    # See Client.SetMatchMode for details.
     def SetMatchMode(mode)
       mode = Lib.const_get(&quot;SPH_MATCH_#{mode.to_s.upcase}&quot;) if mode.is_a? Symbol
       Lib.sphinx_set_match_mode(@sphinx, mode)
     end
     
+    # See Client.SetRankingMode for details.
     def SetRankingMode(ranker)
       ranker = Lib.const_get(&quot;SPH_RANK_#{ranker.to_s.upcase}&quot;) if ranker.is_a? Symbol
       Lib.sphinx_set_ranking_mode(@sphinx, ranker)
     end
     
+    # See Client.SetSortMode for details.
     def SetSortMode(mode, sortby = '')
       mode = Lib.const_get(&quot;SPH_SORT_#{mode.to_s.upcase}&quot;) if mode.is_a? Symbol
       Lib.sphinx_set_sort_mode(@sphinx, mode, sortby)
     end
     
+    # See Client.SetFieldWeights for details.
     def SetFieldWeights(weights)
       Lib.sphinx_set_field_weights(@sphinx, weights.size, weights.keys, weights.values)
     end
     
+    # See Client.SetIndexWeights for details.
     def SetIndexWeights(weights)
       Lib.sphinx_set_index_weights(@sphinx, weights.size, weights.keys, weights.values)
     end
     
+    # See Client.SetIDRange for details.
     def SetIDRange(min, max)
       Lib.sphinx_set_id_range(@sphinx, min, max)
     end
     
+    # See Client.SetFilter for details.
     def SetFilter(attribute, values, exclude = false)
       Lib.sphinx_add_filter(@sphinx, attribute, values.length, values, exclude)
     end
 
+    # See Client.SetFilterRange for details.
     def SetFilterRange(attribute, min, max, exclude = false)
       Lib.sphinx_add_filter_range(@sphinx, attribute, min, max, exclude)
     end
     
+    # See Client.SetFilterFloatRange for details.
     def SetFilterFloatRange(attribute, min, max, exclude = false)
       Lib.sphinx_add_filter_float_range(@sphinx, attribute, min, max, exclude)
     end
     
+    # See Client.SetGeoAnchor for details.
     def SetGeoAnchor(attrlat, attrlong, lat, long)
       Lib.sphinx_set_geoanchor(@sphinx, attrlat, attrlong, lat, long)
     end
     
+    # See Client.SetGroupBy for details.
     def SetGroupBy(attribute, func, groupsort = '@group desc')
       Lib.sphinx_set_groupby(@sphinx, attribute, func, groupsort)
     end
     
+    # See Client.SetGroupDistinct for details.
     def SetGroupDistinct(attribute)
       Lib.sphinx_set_groupby_distinct(@sphinx, attribute)
     end
     
+    # See Client.SetRetries for details.
     def SetRetries(count, delay = 0)
       Lib.sphinx_set_retries(@sphinx, count, delay)
     end
     
+    # See Client.ResetFilters for details.
     def ResetFilters
       Lib.sphinx_reset_filters(@sphinx)
     end
     
+    # See Client.ResetGroupBy for details.
     def ResetGroupBy
       Lib.sphinx_reset_groupby(@sphinx)
     end
     
+    # See Client.Query for details.
     def Query(query, index = '*', comment = '')
       Lib.sphinx_query(@sphinx, query, index, comment)
     end
     
+    # See Client.AddQuery for details.
     def AddQuery(query, index = '*', comment = '')
       Lib.sphinx_add_query(@sphinx, query, index, comment)
     end
     
+    # See Client.RunQueries for details.
     def RunQueries
       Lib.sphinx_run_queries(@sphinx)
     end
     
+    # See Client.BuildExcerpts for details.
     def BuildExcerpts(docs, index, words, opts = {})
       Lib.sphinx_build_excerpts(@sphinx, docs.size, docs, index, words, opts)
     end
     
+    # See Client.BuildKeywords for details.
     def BuildKeywords(query, index, hits)
       Lib.sphinx_build_keywords(@sphinx, query, index, hits)
     end
     
+    # See Client.UpdateAttributes for details.
     def UpdateAttributes(index, attrs, values, mva = false)
       Lib.sphinx_update_attributes(@sphinx, index, attrs.size, attrs, values.size, values.keys, values.values.flatten)
     end</diff>
      <filename>lib/sphinx/fast_client.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>89640455b7c88dc9a134502fc0c0eae703352929</id>
    </parent>
  </parents>
  <author>
    <name>Dmytro Shteflyuk</name>
    <email>kpumuk@kpumuk.info</email>
  </author>
  <url>http://github.com/kpumuk/rlibsphinxclient/commit/6735810f110d9eda9d00d0a575135a310f8b66cf</url>
  <id>6735810f110d9eda9d00d0a575135a310f8b66cf</id>
  <committed-date>2009-01-27T04:02:37-08:00</committed-date>
  <authored-date>2009-01-27T04:02:37-08:00</authored-date>
  <message>Ruby documentation added for the FastClient</message>
  <tree>56777e8fa7cde86aeccba6bc2936852d68c922d8</tree>
  <committer>
    <name>Dmytro Shteflyuk</name>
    <email>kpumuk@kpumuk.info</email>
  </committer>
</commit>
