antbird 0.0.3 → 0.0.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b4c5039ccff974fe57df1991a32faec3f4c6ff5e42ff564bc54e4e2541a65c2f
4
- data.tar.gz: c27abf56cb4429a89a9577b5f29e44df00e5b5d081d94a4292725697c69f8334
3
+ metadata.gz: 30c4aa27798b70f976246d2412f469dfde04a119a22b917dc18cc394f2ab5830
4
+ data.tar.gz: ba19671ab58983d9a4e78be6db559bb4705ed5ef661ebd13a462d9c9ae202d0a
5
5
  SHA512:
6
- metadata.gz: b39414eacac5c6fab86828ea7f62ef9be11b7f9e74143876d2a551812ea544cba03b5b18aa9f814f632eebe60b20b038461e0c52ef5a556fb071d07ab30a13bf
7
- data.tar.gz: e55b1cd638bf572c87b304e9a81fecdbf1c6763893788eecfee1a82daf73b0ffe9bb9d4fa72aa164aac660e31030f9699a3750a763cabad8c44ac9b4f79e530d
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
- settings: { number_of_shards: 1 },
73
- mappings: {
74
- 'test-type': {
75
- properties: {
76
- field1: { type: :text }
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
  }
@@ -69,14 +69,21 @@ module Antbird
69
69
  response =
70
70
  case method
71
71
  when :head
72
- connection.head(api_path) { |req| req.options[:timeout] = read_timeout if read_timeout }
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) { |req|
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) { |req| req.options[:timeout] = read_timeout if read_timeout }
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
@@ -1,3 +1,3 @@
1
1
  module Antbird
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
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.3
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-04-25 00:00:00.000000000 Z
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.3
189
+ rubygems_version: 2.7.6
190
190
  signing_key:
191
191
  specification_version: 4
192
192
  summary: Nearly auto-generated Elasticsearch client