elastics-client 1.0.10 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +1 -1
- data/VERSION +1 -1
- data/elastics-client.gemspec +3 -2
- data/lib/elastics/api_stubs.rb +18 -0
- data/lib/elastics/api_templates/core_api.yml +4 -0
- data/lib/elastics/api_templates/indices_api.yml +1 -0
- data/lib/elastics/http_clients/patron.rb +1 -1
- data/lib/elastics-client.rb +0 -1
- metadata +4 -4
data/README.md
CHANGED
@@ -25,4 +25,4 @@ Special thanks for their sponsorship to [Escalate Media](http://www.escalatemedi
|
|
25
25
|
## Copyright
|
26
26
|
|
27
27
|
Copyright (c) 2012-2013 by [Domizio Demichelis](mailto://dd.nexus@gmail.com)<br>
|
28
|
-
See [LICENSE](https://github.com/elastics/elastics/blob/master/elastics
|
28
|
+
See [LICENSE](https://github.com/elastics/elastics/blob/master/elastics/LICENSE) for details.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0
|
1
|
+
1.1.0
|
data/elastics-client.gemspec
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'date'
|
2
|
-
|
2
|
+
version_path = %w[../VERSION ../../VERSION].detect{|v| File.exist?(File.expand_path(v, __FILE__))}
|
3
|
+
version = File.read(File.expand_path(version_path, __FILE__)).strip
|
3
4
|
|
4
5
|
Gem::Specification.new do |s|
|
5
6
|
s.name = 'elastics-client'
|
@@ -10,7 +11,7 @@ Elasticsearch API Methods, Templating System, Cascading Variables Management, Re
|
|
10
11
|
s.authors = ['Domizio Demichelis']
|
11
12
|
s.email = 'dd.nexus@gmail.com'
|
12
13
|
s.require_paths = %w[lib]
|
13
|
-
s.files = `git ls-files -z`.split("\0")
|
14
|
+
s.files = `git ls-files -z`.split("\0") + %w[VERSION LICENSE]
|
14
15
|
s.version = version
|
15
16
|
s.date = Date.today.to_s
|
16
17
|
s.required_rubygems_version = '>= 1.3.6'
|
data/lib/elastics/api_stubs.rb
CHANGED
@@ -176,6 +176,24 @@ module Elastics
|
|
176
176
|
super
|
177
177
|
end
|
178
178
|
|
179
|
+
# ########## Elastics.suggest ##########
|
180
|
+
# ------------------
|
181
|
+
# Elastics::Template
|
182
|
+
# ---
|
183
|
+
# suggest:
|
184
|
+
# - POST
|
185
|
+
# - /<<index>>/<<type>>/_suggest
|
186
|
+
#
|
187
|
+
#
|
188
|
+
# Usage:
|
189
|
+
# Elastics.suggest :index => "elastics_test_index",
|
190
|
+
# :type => nil
|
191
|
+
#
|
192
|
+
def Elastics.suggest(*vars)
|
193
|
+
## this is a stub, used for reference
|
194
|
+
super
|
195
|
+
end
|
196
|
+
|
179
197
|
# ########## Elastics.percolate ##########
|
180
198
|
# --------------
|
181
199
|
# Elastics::Template
|
@@ -76,6 +76,10 @@ update:
|
|
76
76
|
### Search ###
|
77
77
|
# The search api is covered by the templating system
|
78
78
|
|
79
|
+
# you must pass the suggest structure as the :data variable
|
80
|
+
suggest:
|
81
|
+
- POST
|
82
|
+
- /<<index>>/<<type>>/_suggest
|
79
83
|
|
80
84
|
|
81
85
|
#-----------------------------------------------------------------------------#
|
@@ -18,7 +18,7 @@ module Elastics
|
|
18
18
|
def session
|
19
19
|
Thread.current[:elastics_patron_session] ||= begin
|
20
20
|
sess = ::Patron::Session.new
|
21
|
-
sess.headers['User-Agent'] = "elastics
|
21
|
+
sess.headers['User-Agent'] = "elastics-client"
|
22
22
|
sess.base_url = base_uri
|
23
23
|
sess
|
24
24
|
end
|
data/lib/elastics-client.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elastics-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-09-
|
12
|
+
date: 2013-09-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: multi_json
|
@@ -85,9 +85,7 @@ executables: []
|
|
85
85
|
extensions: []
|
86
86
|
extra_rdoc_files: []
|
87
87
|
files:
|
88
|
-
- LICENSE
|
89
88
|
- README.md
|
90
|
-
- VERSION
|
91
89
|
- elastics-client.gemspec
|
92
90
|
- lib/elastics-client.rb
|
93
91
|
- lib/elastics/api_stubs.rb
|
@@ -130,6 +128,8 @@ files:
|
|
130
128
|
- lib/elastics/utils.rb
|
131
129
|
- lib/elastics/variables.rb
|
132
130
|
- lib/tasks.rake
|
131
|
+
- VERSION
|
132
|
+
- LICENSE
|
133
133
|
homepage: http://elastics.github.io/elastics
|
134
134
|
licenses:
|
135
135
|
- MIT
|