Skip to content

Commit f0b6a6a

Browse files
authored
Fix referencing Gem classes from global lexical scope instead of open Logstash scope. (#1044)
1 parent 3a170cf commit f0b6a6a

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 11.2.1
2+
- Fix referencing Gem classes from global lexical scope [#1044](https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/1044)
3+
14
## 11.2.0
25
- Added preflight checks on Elasticsearch [#1026](https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/1026)
36

lib/logstash/outputs/elasticsearch/http_client/pool.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ def message
3737
ROOT_URI_PATH = '/'.freeze
3838
LICENSE_PATH = '/_license'.freeze
3939

40-
VERSION_6_TO_7 = Gem::Requirement.new([">= 6.0.0", "< 7.0.0"])
41-
VERSION_7_TO_7_14 = Gem::Requirement.new([">= 7.0.0", "< 7.14.0"])
40+
VERSION_6_TO_7 = ::Gem::Requirement.new([">= 6.0.0", "< 7.0.0"])
41+
VERSION_7_TO_7_14 = ::Gem::Requirement.new([">= 7.0.0", "< 7.14.0"])
4242

4343
DEFAULT_OPTIONS = {
4444
:healthcheck_path => ROOT_URI_PATH,
@@ -275,8 +275,8 @@ def elasticsearch?(url)
275275
version_info = LogStash::Json.load(response.body)
276276
return false if version_info['version'].nil?
277277

278-
version = Gem::Version.new(version_info["version"]['number'])
279-
return false if version < Gem::Version.new('6.0.0')
278+
version = ::Gem::Version.new(version_info["version"]['number'])
279+
return false if version < ::Gem::Version.new('6.0.0')
280280

281281
if VERSION_6_TO_7.satisfied_by?(version)
282282
return valid_tagline?(version_info)

logstash-output-elasticsearch.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Gem::Specification.new do |s|
22
s.name = 'logstash-output-elasticsearch'
3-
s.version = '11.2.0'
3+
s.version = '11.2.1'
44

55
s.licenses = ['apache-2.0']
66
s.summary = "Stores logs in Elasticsearch"

0 commit comments

Comments
 (0)