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 +4 -4
- data/VERSION +1 -1
- data/lib/elastics/result.rb +2 -2
- data/lib/elastics/template/logger.rb +3 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 42fe0a300e2db6c68a380ad3b0880646efba33c9
|
4
|
+
data.tar.gz: aeba9db2501e7f475ee8f852175596dae17dba28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7d21b5fe274def208c206497bb475584776d46fb49d34a0a0950106372037313ce36244d4b963e97b83d00711ae4bc3a24c0cbea76663b7d0c2635bf497e62c
|
7
|
+
data.tar.gz: cfed5fcb9165a086e1cc0da83d8cec9bac1bb6a2aa87b2dd330c55d378dd17714c8a7912884aefd8149acde11370ae4ca75d23f0ad1e0d719b4742ac9fd57299
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.3.
|
1
|
+
1.3.1
|
data/lib/elastics/result.rb
CHANGED
@@ -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,
|
7
|
+
def initialize(template, variables, response, raw_result=nil)
|
8
8
|
@template = template
|
9
9
|
@variables = variables
|
10
10
|
@response = response
|
11
|
-
replace
|
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
|
-
|
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.
|
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-
|
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.
|
159
|
+
rubygems_version: 2.5.1
|
160
160
|
signing_key:
|
161
161
|
specification_version: 4
|
162
162
|
summary: Client gem for elasticsearch
|