Skip to content
Browse files

ruby clients support public_search-enabled index creation

  • Loading branch information...
1 parent 4641486 commit 498596e69fde7ccca7250d665e98f5e28daef98b Leandro Oniszczuk committed Jun 21, 2011
Showing with 10 additions and 5 deletions.
  1. +1 −1 VERSION
  2. +1 −1 indextank.gemspec
  3. +1 −1 lib/indextank.rb
  4. +7 −2 lib/indextank/index.rb
View
2 VERSION
@@ -1 +1 @@
-1.0.10
+1.0.11
View
2 indextank.gemspec
@@ -2,7 +2,7 @@
Gem::Specification.new do |s|
s.name = %q{indextank}
- s.version = "1.0.10"
+ s.version = "1.0.11"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Santiago Perez", "Terence Lee", "Diego Buthay"]
View
2 lib/indextank.rb
@@ -5,7 +5,7 @@
require File.join(directory, 'indextank', 'client')
module IndexTank
- VERSION = "1.0.10"
+ VERSION = "1.0.11"
def self.setup_connection(url)
@conn = Faraday::Connection.new(:url => url) do |builder|
View
9 lib/indextank/index.rb
@@ -11,8 +11,13 @@ def initialize(index_url, metadata = nil)
@metadata = metadata
end
- def add
- response = @conn.put('')
+ def add( options = {} )
+ options = {:public_search => false}.merge(options)
+
+ response = @conn.put do |req|
+ req.url ""
+ req.body = options.to_json
+ end
case response.status
when 201
true

0 comments on commit 498596e

Please sign in to comment.
Something went wrong with that request. Please try again.