Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

use faraday 0.8

  • Loading branch information...
commit 7f9bfb70b87a99b310e04a4abf0afb2bc182da74 1 parent 9a59b4a
@atmos authored
View
3  elasticsearch-client.gemspec
@@ -18,7 +18,8 @@ Gem::Specification.new do |s|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]
- s.add_dependency 'faraday', '~> 0.7.6'
+ s.add_dependency 'faraday', '~> 0.8'
+ s.add_dependency 'faraday_middleware', '~> 0.8.7'
s.add_dependency 'excon', '~> 0.6.6'
s.add_dependency 'yajl-ruby', '~> 1.1.0'
View
4 lib/elasticsearch.rb
@@ -1,5 +1,6 @@
require "elasticsearch/version"
require 'faraday'
+require 'faraday_middleware'
require 'yajl'
require 'time'
@@ -20,7 +21,8 @@ def self.get_connection(server)
# TODO: add timeout middleware
builder.request :json
# builder.response :logger
- builder.use JSONResponse
+ builder.response :json, :content_type => /\bjson$/
+
builder.adapter :excon
end
end
View
2  lib/elasticsearch/version.rb
@@ -1,3 +1,3 @@
module ElasticSearch
- VERSION = "0.0.6"
+ VERSION = "0.1.0"
end
Please sign in to comment.
Something went wrong with that request. Please try again.