antbird 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -5
- data/lib/antbird/client.rb +12 -4
- data/lib/antbird/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30c4aa27798b70f976246d2412f469dfde04a119a22b917dc18cc394f2ab5830
|
4
|
+
data.tar.gz: ba19671ab58983d9a4e78be6db559bb4705ed5ef661ebd13a462d9c9ae202d0a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6865875e1e21f0d2dbd157f82042dc6927803603c73e0a0c62f3d3b82d9b29d3417500eeb3662323d1963d76fde783e6bd0b6c78abe2631d4a7891598b36603a
|
7
|
+
data.tar.gz: 56b811df20fe6953fc01944e7c8b4ca6941c0849ea73388f5642d8702e1d004521701895c88ae130227ad6cba69617706a37d6660b6b82e5051a411609a4aa4b
|
data/README.md
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
Nearly auto-generated Elasticsearch client
|
4
4
|
|
5
|
+
[![Build Status](https://travis-ci.org/fukayatsu/antbird.svg?branch=master)](https://travis-ci.org/fukayatsu/antbird)
|
6
|
+
|
5
7
|
## Installation
|
6
8
|
|
7
9
|
Add this line to your application's Gemfile:
|
@@ -69,11 +71,13 @@ client = Antbird::Client.new(
|
|
69
71
|
|
70
72
|
client.indices_exists? # => false
|
71
73
|
client.indices_create(
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
74
|
+
body: {
|
75
|
+
settings: { number_of_shards: 1 },
|
76
|
+
mappings: {
|
77
|
+
'test-type': {
|
78
|
+
properties: {
|
79
|
+
field1: { type: :text }
|
80
|
+
}
|
77
81
|
}
|
78
82
|
}
|
79
83
|
}
|
data/lib/antbird/client.rb
CHANGED
@@ -69,14 +69,21 @@ module Antbird
|
|
69
69
|
response =
|
70
70
|
case method
|
71
71
|
when :head
|
72
|
-
connection.head(api_path)
|
72
|
+
connection.head(api_path) do |req|
|
73
|
+
req.params = params unless params.empty?
|
74
|
+
req.options[:timeout] = read_timeout if read_timeout
|
75
|
+
end
|
73
76
|
when :get
|
74
|
-
connection.get(api_path)
|
77
|
+
connection.get(api_path) do |req|
|
78
|
+
req.params = params unless params.empty?
|
75
79
|
req.body = body if body
|
76
80
|
req.options[:timeout] = read_timeout if read_timeout
|
77
|
-
|
81
|
+
end
|
78
82
|
when :put
|
79
|
-
connection.put(api_path, body)
|
83
|
+
connection.put(api_path, body) do |req|
|
84
|
+
req.params = params unless params.empty?
|
85
|
+
req.options[:timeout] = read_timeout if read_timeout
|
86
|
+
end
|
80
87
|
when :post
|
81
88
|
connection.post(api_path, body) do |req|
|
82
89
|
req.params = params unless params.empty?
|
@@ -84,6 +91,7 @@ module Antbird
|
|
84
91
|
end
|
85
92
|
when :delete
|
86
93
|
connection.delete(api_path) do |req|
|
94
|
+
req.params = params unless params.empty?
|
87
95
|
req.body = body if body
|
88
96
|
req.options[:timeout] = read_timeout if read_timeout
|
89
97
|
end
|
data/lib/antbird/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: antbird
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- fukayatsu
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -186,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
186
186
|
version: '0'
|
187
187
|
requirements: []
|
188
188
|
rubyforge_project:
|
189
|
-
rubygems_version: 2.7.
|
189
|
+
rubygems_version: 2.7.6
|
190
190
|
signing_key:
|
191
191
|
specification_version: 4
|
192
192
|
summary: Nearly auto-generated Elasticsearch client
|