<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,6 +1,6 @@
 Gem::Specification.new do |s|
   s.name = &quot;delsolr&quot;
-  s.version = &quot;0.0.3&quot;
+  s.version = &quot;0.0.4&quot;
   s.authors = [&quot;Ben VandenBos&quot;]
   s.date = %q{2009-11-02}
   s.description = &quot;Ruby wrapper for Lucene Solr&quot;</diff>
      <filename>delsolr.gemspec</filename>
    </modified>
    <modified>
      <diff>@@ -37,7 +37,7 @@ module DelSolr
     # [&lt;b&gt;&lt;tt&gt;:shortcuts&lt;/tt&gt;&lt;/b&gt;]
     #   (options) a list of values in the doc fields to generate short cuts for (ie: [:scores, :id], you will be able to call &lt;tt&gt;rsp.scores&lt;/tt&gt; and have it return an array of scores, likewise for &lt;tt&gt;ids&lt;/tt&gt;.) Defaults to [:id, :unique_id, :score]
     def initialize(options = {})
-      @configuration = DelSolr::Client::Configuration.new(options[:server], options[:port], options[:timeout])
+      @configuration = DelSolr::Client::Configuration.new(options[:server], options[:port], options[:timeout], options[:path])
       @cache = options[:cache]
       @shortcuts = options[:shortcuts]
     end
@@ -157,7 +157,7 @@ module DelSolr
       end
 
       if body.blank? # cache miss (or wasn't enabled)
-        header, body = connection.get(query_builder.request_string)
+        header, body = connection.get(configuration.path + query_builder.request_string)
 
         # add to the cache if caching
         if enable_caching
@@ -253,7 +253,7 @@ module DelSolr
     
     # helper for posting data to solr
     def post(buffer)
-      connection.post('/solr/update', buffer, {'Content-type' =&gt; 'text/xml;charset=utf-8'})
+      connection.post(&quot;#{configuration.path}/update&quot;, buffer, {'Content-type' =&gt; 'text/xml;charset=utf-8'})
     end
     
     def success?(response_body)</diff>
      <filename>lib/delsolr.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,12 +1,13 @@
 module DelSolr
   class Client
     class Configuration
-      attr_accessor :server, :port, :timeout
+      attr_accessor :server, :port, :timeout, :path
 
-      def initialize(server, port, timeout = 120)
+      def initialize(server, port, timeout = nil, path = nil)
         @server = server
         @port = port.to_i
         @timeout = timeout || 120
+        @path = path || '/solr'
       end
 
     end</diff>
      <filename>lib/delsolr/configuration.rb</filename>
    </modified>
    <modified>
      <diff>@@ -109,7 +109,7 @@ module DelSolr
           end
         end
         
-        &quot;/solr/select?#{param_strings.join('&amp;')}&quot;
+        &quot;/select?#{param_strings.join('&amp;')}&quot;
       end
       
       # returns the query param</diff>
      <filename>lib/delsolr/query_builder.rb</filename>
    </modified>
    <modified>
      <diff>@@ -177,26 +177,40 @@ class ClientTest &lt; Test::Unit::TestCase
     assert_equal(0, c.pending_documents.length)
   end
   
-  def test_query
-    c = setup_client
+  def test_query_with_path
+    c = setup_client(:path =&gt; '/abcsolr')
     
     mock_query_builder = DelSolr::Client::QueryBuilder
-    mock_query_builder.stubs(:request_string).returns('/solr/select?some_query') # mock the query builder
+    mock_query_builder.stubs(:request_string).returns('/select?some_query') # mock the query builder
+    DelSolr::Client::QueryBuilder.stubs(:new).returns(mock_query_builder)
+    c.connection.expects(:get).with(&quot;/abcsolr&quot; + mock_query_builder.request_string).returns([nil, @@response_buffer]) # mock the connection
+    r = c.query('standard', :query =&gt; '123')
+    assert(r)
+    assert_equal([1,3,4,5,7,8,9,10,11,12], r.ids.sort)
+    assert(!r.from_cache?, 'should not be from cache')
+  end
+
+  def test_query_with_default_path
+    c = setup_client
+
+    mock_query_builder = DelSolr::Client::QueryBuilder
+    mock_query_builder.stubs(:request_string).returns('/select?some_query') # mock the query builder
     DelSolr::Client::QueryBuilder.stubs(:new).returns(mock_query_builder)
-    c.connection.expects(:get).with(mock_query_builder.request_string).returns([nil, @@response_buffer]) # mock the connection
+    c.connection.expects(:get).with(&quot;/solr&quot; + mock_query_builder.request_string).returns([nil, @@response_buffer]) # mock the connection
     r = c.query('standard', :query =&gt; '123')
     assert(r)
     assert_equal([1,3,4,5,7,8,9,10,11,12], r.ids.sort)
     assert(!r.from_cache?, 'should not be from cache')
   end
+
   
   def test_query_from_cache
     c = setup_client(:cache =&gt; TestCache.new)
     
     mock_query_builder = DelSolr::Client::QueryBuilder
-    mock_query_builder.stubs(:request_string).returns('/solr/select?some_query') # mock the query builder
+    mock_query_builder.stubs(:request_string).returns('/select?some_query') # mock the query builder
     DelSolr::Client::QueryBuilder.stubs(:new).returns(mock_query_builder)
-    c.connection.expects(:get).with(mock_query_builder.request_string).returns([nil, @@response_buffer]) # mock the connection
+    c.connection.expects(:get).with(&quot;/solr&quot; + mock_query_builder.request_string).returns([nil, @@response_buffer]) # mock the connection
     r = c.query('standard', :query =&gt; '123', :enable_caching =&gt; true)
     assert(r)
     assert_equal([1,3,4,5,7,8,9,10,11,12], r.ids.sort)</diff>
      <filename>test/test_client.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>5f4aeef5ad60e6c0f7f51a788f34e46dcb8610df</id>
    </parent>
  </parents>
  <author>
    <name>Ben VandenBos</name>
    <email>ben@ben-01.local</email>
  </author>
  <url>http://github.com/avvo/delsolr/commit/2648cbc415c0d2293a2c623cc903f40639632e99</url>
  <id>2648cbc415c0d2293a2c623cc903f40639632e99</id>
  <committed-date>2009-11-03T09:16:20-08:00</committed-date>
  <authored-date>2009-11-03T09:16:20-08:00</authored-date>
  <message>Adding an option :path option to DelSolr::Client for non-standard solr installs</message>
  <tree>9af6b603c5d6366ece7527c5969467b67e5456eb</tree>
  <committer>
    <name>Ben VandenBos</name>
    <email>ben@ben-01.local</email>
  </committer>
</commit>
