elastictastic 0.10.2 → 0.10.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/elastictastic/client.rb +3 -0
- data/lib/elastictastic/middleware.rb +6 -4
- data/lib/elastictastic/version.rb +1 -1
- metadata +69 -24
data/lib/elastictastic/client.rb
CHANGED
@@ -27,6 +27,9 @@ module Elastictastic
|
|
27
27
|
connection = Middleware::JsonDecodeResponse.new(connection)
|
28
28
|
connection = Middleware::JsonEncodeBody.new(connection)
|
29
29
|
connection = Middleware::RaiseServerErrors.new(connection)
|
30
|
+
config.extra_middlewares.each do |middleware_class, *args|
|
31
|
+
connection = middleware_class.new(connection, *args)
|
32
|
+
end
|
30
33
|
@connection = connection
|
31
34
|
end
|
32
35
|
|
@@ -87,10 +87,12 @@ module Elastictastic
|
|
87
87
|
def request(method, path, body = nil)
|
88
88
|
now = Time.now
|
89
89
|
super.tap do
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
90
|
+
@logger.debug do
|
91
|
+
time = ((Time.now - now) * 1000).to_i
|
92
|
+
message = "ElasticSearch #{method.to_s.upcase} (#{time}ms) #{path}"
|
93
|
+
message << ' ' << body if body
|
94
|
+
message
|
95
|
+
end
|
94
96
|
end
|
95
97
|
end
|
96
98
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elastictastic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,11 +11,11 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2012-
|
14
|
+
date: 2012-09-04 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activesupport
|
18
|
-
requirement:
|
18
|
+
requirement: !ruby/object:Gem::Requirement
|
19
19
|
none: false
|
20
20
|
requirements:
|
21
21
|
- - ~>
|
@@ -23,10 +23,15 @@ dependencies:
|
|
23
23
|
version: '3.0'
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
|
-
version_requirements:
|
26
|
+
version_requirements: !ruby/object:Gem::Requirement
|
27
|
+
none: false
|
28
|
+
requirements:
|
29
|
+
- - ~>
|
30
|
+
- !ruby/object:Gem::Version
|
31
|
+
version: '3.0'
|
27
32
|
- !ruby/object:Gem::Dependency
|
28
33
|
name: activemodel
|
29
|
-
requirement:
|
34
|
+
requirement: !ruby/object:Gem::Requirement
|
30
35
|
none: false
|
31
36
|
requirements:
|
32
37
|
- - ~>
|
@@ -34,10 +39,15 @@ dependencies:
|
|
34
39
|
version: '3.0'
|
35
40
|
type: :runtime
|
36
41
|
prerelease: false
|
37
|
-
version_requirements:
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
none: false
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
38
48
|
- !ruby/object:Gem::Dependency
|
39
49
|
name: hashie
|
40
|
-
requirement:
|
50
|
+
requirement: !ruby/object:Gem::Requirement
|
41
51
|
none: false
|
42
52
|
requirements:
|
43
53
|
- - ! '>='
|
@@ -45,10 +55,15 @@ dependencies:
|
|
45
55
|
version: '0'
|
46
56
|
type: :runtime
|
47
57
|
prerelease: false
|
48
|
-
version_requirements:
|
58
|
+
version_requirements: !ruby/object:Gem::Requirement
|
59
|
+
none: false
|
60
|
+
requirements:
|
61
|
+
- - ! '>='
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '0'
|
49
64
|
- !ruby/object:Gem::Dependency
|
50
65
|
name: i18n
|
51
|
-
requirement:
|
66
|
+
requirement: !ruby/object:Gem::Requirement
|
52
67
|
none: false
|
53
68
|
requirements:
|
54
69
|
- - ! '>='
|
@@ -56,10 +71,15 @@ dependencies:
|
|
56
71
|
version: '0'
|
57
72
|
type: :runtime
|
58
73
|
prerelease: false
|
59
|
-
version_requirements:
|
74
|
+
version_requirements: !ruby/object:Gem::Requirement
|
75
|
+
none: false
|
76
|
+
requirements:
|
77
|
+
- - ! '>='
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: '0'
|
60
80
|
- !ruby/object:Gem::Dependency
|
61
81
|
name: multi_json
|
62
|
-
requirement:
|
82
|
+
requirement: !ruby/object:Gem::Requirement
|
63
83
|
none: false
|
64
84
|
requirements:
|
65
85
|
- - ! '>='
|
@@ -67,10 +87,15 @@ dependencies:
|
|
67
87
|
version: '0'
|
68
88
|
type: :runtime
|
69
89
|
prerelease: false
|
70
|
-
version_requirements:
|
90
|
+
version_requirements: !ruby/object:Gem::Requirement
|
91
|
+
none: false
|
92
|
+
requirements:
|
93
|
+
- - ! '>='
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0'
|
71
96
|
- !ruby/object:Gem::Dependency
|
72
97
|
name: rspec
|
73
|
-
requirement:
|
98
|
+
requirement: !ruby/object:Gem::Requirement
|
74
99
|
none: false
|
75
100
|
requirements:
|
76
101
|
- - ~>
|
@@ -78,10 +103,15 @@ dependencies:
|
|
78
103
|
version: '2.0'
|
79
104
|
type: :development
|
80
105
|
prerelease: false
|
81
|
-
version_requirements:
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
none: false
|
108
|
+
requirements:
|
109
|
+
- - ~>
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '2.0'
|
82
112
|
- !ruby/object:Gem::Dependency
|
83
113
|
name: fakeweb
|
84
|
-
requirement:
|
114
|
+
requirement: !ruby/object:Gem::Requirement
|
85
115
|
none: false
|
86
116
|
requirements:
|
87
117
|
- - ~>
|
@@ -89,21 +119,31 @@ dependencies:
|
|
89
119
|
version: '1.3'
|
90
120
|
type: :development
|
91
121
|
prerelease: false
|
92
|
-
version_requirements:
|
93
|
-
- !ruby/object:Gem::Dependency
|
94
|
-
name: ruby-debug19
|
95
|
-
requirement: &6876480 !ruby/object:Gem::Requirement
|
122
|
+
version_requirements: !ruby/object:Gem::Requirement
|
96
123
|
none: false
|
97
124
|
requirements:
|
98
125
|
- - ~>
|
99
126
|
- !ruby/object:Gem::Version
|
100
|
-
version: '
|
127
|
+
version: '1.3'
|
128
|
+
- !ruby/object:Gem::Dependency
|
129
|
+
name: debugger
|
130
|
+
requirement: !ruby/object:Gem::Requirement
|
131
|
+
none: false
|
132
|
+
requirements:
|
133
|
+
- - ! '>='
|
134
|
+
- !ruby/object:Gem::Version
|
135
|
+
version: '0'
|
101
136
|
type: :development
|
102
137
|
prerelease: false
|
103
|
-
version_requirements:
|
138
|
+
version_requirements: !ruby/object:Gem::Requirement
|
139
|
+
none: false
|
140
|
+
requirements:
|
141
|
+
- - ! '>='
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: '0'
|
104
144
|
- !ruby/object:Gem::Dependency
|
105
145
|
name: yard
|
106
|
-
requirement:
|
146
|
+
requirement: !ruby/object:Gem::Requirement
|
107
147
|
none: false
|
108
148
|
requirements:
|
109
149
|
- - ~>
|
@@ -111,7 +151,12 @@ dependencies:
|
|
111
151
|
version: '0.6'
|
112
152
|
type: :development
|
113
153
|
prerelease: false
|
114
|
-
version_requirements:
|
154
|
+
version_requirements: !ruby/object:Gem::Requirement
|
155
|
+
none: false
|
156
|
+
requirements:
|
157
|
+
- - ~>
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0.6'
|
115
160
|
description: ! 'Elastictastic is an object-document mapper and lightweight API adapter
|
116
161
|
for
|
117
162
|
|
@@ -221,7 +266,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
221
266
|
requirements:
|
222
267
|
- ElasticSearch
|
223
268
|
rubyforge_project:
|
224
|
-
rubygems_version: 1.8.
|
269
|
+
rubygems_version: 1.8.24
|
225
270
|
signing_key:
|
226
271
|
specification_version: 3
|
227
272
|
summary: Object-document mapper for ElasticSearch
|