Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

use faraday 0.8

  • Loading branch information...
commit 7f9bfb70b87a99b310e04a4abf0afb2bc182da74 1 parent 9a59b4a
Corey Donohoe authored June 12, 2012
3  elasticsearch-client.gemspec
@@ -18,7 +18,8 @@ Gem::Specification.new do |s|
18 18
   s.executables   = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19 19
   s.require_paths = ["lib"]
20 20
 
21  
-  s.add_dependency 'faraday', '~> 0.7.6'
  21
+  s.add_dependency 'faraday', '~> 0.8'
  22
+  s.add_dependency 'faraday_middleware', '~> 0.8.7'
22 23
   s.add_dependency 'excon', '~> 0.6.6'
23 24
   s.add_dependency 'yajl-ruby', '~> 1.1.0'
24 25
 
4  lib/elasticsearch.rb
... ...
@@ -1,5 +1,6 @@
1 1
 require "elasticsearch/version"
2 2
 require 'faraday'
  3
+require 'faraday_middleware'
3 4
 require 'yajl'
4 5
 require 'time'
5 6
 
@@ -20,7 +21,8 @@ def self.get_connection(server)
20 21
       # TODO: add timeout middleware
21 22
       builder.request  :json
22 23
       # builder.response :logger
23  
-      builder.use JSONResponse
  24
+      builder.response :json, :content_type => /\bjson$/
  25
+
24 26
       builder.adapter :excon
25 27
     end
26 28
   end
2  lib/elasticsearch/version.rb
... ...
@@ -1,3 +1,3 @@
1 1
 module ElasticSearch
2  
-  VERSION = "0.0.6"
  2
+  VERSION = "0.1.0"
3 3
 end

0 notes on commit 7f9bfb7

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