Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLIENT] Meta header: support unknown faraday adapters #1206

Merged
merged 3 commits into from
Feb 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 7.11.1

### Client

* Bug fix in meta header, adds support for unknown Faraday adapters. [Pull Request](https://github.com/elastic/elasticsearch-ruby/pull/1204).

## 7.11.0

### Client
Expand Down
15 changes: 14 additions & 1 deletion docs/release_notes/711.asciidoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
[[release_notes_710]]
[[release_notes_711]]
=== 7.11 Release notes

[discrete]
[[release_notes_7111]]
=== 7.11.1 Release notes

[discrete]
==== Client

* Bug fix in meta header, adds support for unknown Faraday adapters. https://github.com/elastic/elasticsearch-ruby/pull/1204[Pull Request].

[discrete]
[[release_notes_7110]]
=== 7.11.0 Release notes

[discrete]
==== Client

Expand Down
2 changes: 1 addition & 1 deletion elasticsearch-api/lib/elasticsearch/api/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@

module Elasticsearch
module API
VERSION = '7.11.0'.freeze
VERSION = '7.11.1'.freeze
end
end
2 changes: 2 additions & 0 deletions elasticsearch-transport/lib/elasticsearch/transport/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ def meta_header_adapter
{hc: HTTPClient::VERSION}
when :net_http_persistent
{np: Net::HTTP::Persistent::VERSION}
else
{}
end
)
elsif defined?(Transport::HTTP::Curb) && @transport_class == Transport::HTTP::Curb
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@

module Elasticsearch
module Transport
VERSION = '7.11.0'.freeze
VERSION = '7.11.1'.freeze
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,17 @@ def meta_version
end
end
end

context 'using other' do
let(:adapter) { :some_other_adapter }

it 'sets adapter in the meta header' do
require 'net/http/persistent'
Faraday::Adapter.register_middleware some_other_adapter: Faraday::Adapter::NetHttpPersistent
expect(headers['x-elastic-client-meta']).to match(regexp)
expect(headers).to include('x-elastic-client-meta' => meta_header)
end
end
end

if defined?(JRUBY_VERSION)
Expand Down
2 changes: 1 addition & 1 deletion elasticsearch-xpack/lib/elasticsearch/xpack/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@

module Elasticsearch
module XPack
VERSION = '7.11.0'.freeze
VERSION = '7.11.1'.freeze
end
end
4 changes: 2 additions & 2 deletions elasticsearch/elasticsearch.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ Gem::Specification.new do |s|

s.required_ruby_version = '>= 2.4'

s.add_dependency 'elasticsearch-transport', '7.11.0'
s.add_dependency 'elasticsearch-api', '7.11.0'
s.add_dependency 'elasticsearch-transport', '7.11.1'
s.add_dependency 'elasticsearch-api', '7.11.1'

s.add_development_dependency 'bundler'

Expand Down
2 changes: 1 addition & 1 deletion elasticsearch/lib/elasticsearch/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
# under the License.

module Elasticsearch
VERSION = '7.11.0'.freeze
VERSION = '7.11.1'.freeze
end