elastics-client 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9dbd5f470bc28f67a8174b4a116b26266eabc09f
4
- data.tar.gz: c407a63ae3709f164bdd09732e4a704d1ef77dfd
3
+ metadata.gz: 42fe0a300e2db6c68a380ad3b0880646efba33c9
4
+ data.tar.gz: aeba9db2501e7f475ee8f852175596dae17dba28
5
5
  SHA512:
6
- metadata.gz: 1f3f9226dd4be94ca78e070156941f82deaf0f07b3a9c88aa3b4a89467a3819ce4361512eb833ed75e5bf149ad427de6d7bccdbf00cdacc2ffe70de84735dba1
7
- data.tar.gz: e79c9e3ac2242766f554be110b851a550c89f9872e6e17be5f29a5aba1ff8597e1a33254514ccf7e28a6cbf80bc654f0524aa1682e251d0b17f4ff12050b5d20
6
+ metadata.gz: b7d21b5fe274def208c206497bb475584776d46fb49d34a0a0950106372037313ce36244d4b963e97b83d00711ae4bc3a24c0cbea76663b7d0c2635bf497e62c
7
+ data.tar.gz: cfed5fcb9165a086e1cc0da83d8cec9bac1bb6a2aa87b2dd330c55d378dd17714c8a7912884aefd8149acde11370ae4ca75d23f0ad1e0d719b4742ac9fd57299
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.0
1
+ 1.3.1
@@ -4,11 +4,11 @@ module Elastics
4
4
  attr_reader :template, :response
5
5
  attr_accessor :variables
6
6
 
7
- def initialize(template, variables, response, result=nil)
7
+ def initialize(template, variables, response, raw_result=nil)
8
8
  @template = template
9
9
  @variables = variables
10
10
  @response = response
11
- replace result || !response.body.empty? && MultiJson.decode(response.body) || return
11
+ replace raw_result || !response.body.empty? && MultiJson.decode(response.body) || return
12
12
  Conf.result_extenders.each do |ext|
13
13
  next if ext.respond_to?(:should_extend?) && !ext.should_extend?(self)
14
14
  extend ext
@@ -34,7 +34,9 @@ module Elastics
34
34
  h[:request].delete(:data) if h[:request][:data].nil?
35
35
  end
36
36
  if logger.debug_result
37
- h[:result] = result if result
37
+ if result
38
+ h[:result] = result.respond_to?(:raw_result) ? result.raw_result : result
39
+ end
38
40
  end
39
41
  logger.debug logger.curl_format ? curl_format(h[:request]) : yaml_format(h)
40
42
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elastics-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Domizio Demichelis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-21 00:00:00.000000000 Z
11
+ date: 2016-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json
@@ -156,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
156
156
  version: 1.3.6
157
157
  requirements: []
158
158
  rubyforge_project:
159
- rubygems_version: 2.4.5.1
159
+ rubygems_version: 2.5.1
160
160
  signing_key:
161
161
  specification_version: 4
162
162
  summary: Client gem for elasticsearch