Skip to content

Commit 645f295

Browse files
committed
Addresses warnings
1 parent 226a5b1 commit 645f295

5 files changed

Lines changed: 7 additions & 7 deletions

File tree

elasticsearch-api/lib/elasticsearch/api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
require 'cgi'
18+
require 'cgi/escape'
1919
require 'multi_json'
2020
require 'elasticsearch/api/version'
2121
require 'elasticsearch/api/utils'

elasticsearch-api/spec/integration/integration_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
CERTS_PATH = File.expand_path('./../../../.buildkite/certs', __dir__)
2323
host = ENV['TEST_ES_SERVER'] || 'http://localhost:9200'
24-
raise URI::InvalidURIError unless host =~ /\A#{URI::DEFAULT_PARSER.make_regexp}\z/
24+
raise URI::InvalidURIError unless host =~ /\A#{URI::RFC2396_PARSER.make_regexp}\z/
2525

2626
password = ENV['ELASTIC_PASSWORD'] || 'changeme'
2727
HOST_URI = URI.parse(host)

elasticsearch/spec/integration/client_integration_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717
ELASTICSEARCH_URL = ENV['TEST_ES_SERVER'] || "http://localhost:#{(ENV['PORT'] || 9200)}"
18-
raise URI::InvalidURIError unless ELASTICSEARCH_URL =~ /\A#{URI::DEFAULT_PARSER.make_regexp}\z/
18+
raise URI::InvalidURIError unless ELASTICSEARCH_URL =~ /\A#{URI::RFC2396_PARSER.make_regexp}\z/
1919

2020
require 'spec_helper'
2121
require 'logger'
@@ -49,7 +49,7 @@
4949
it 'Reports es service name and gem version' do
5050
headers = CLIENT.transport.connections.first.connection.headers
5151
version = Class.new.extend(Elastic::Transport::MetaHeader).send(:client_meta_version, Elasticsearch::VERSION)
52-
expect(headers['x-elastic-client-meta']).to match /^es=#{version}/
52+
expect(headers['x-elastic-client-meta']).to match(/^es=#{version}/)
5353
end
5454
end
5555
end

elasticsearch/spec/integration/helpers/bulk_helper_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
context 'JSON File helper' do
114114
let(:file) { Tempfile.new('test-data.json') }
115115
let(:json) do
116-
json = <<~JSON
116+
<<~JSON
117117
[
118118
{
119119
"character_name": "Anallese Lonie",
@@ -168,7 +168,7 @@
168168

169169
context 'with data not in root of JSON file' do
170170
let(:json) do
171-
json = <<~JSON
171+
<<~JSON
172172
{
173173
"field": "value",
174174
"status": 200,

elasticsearch/spec/spec_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def jruby?
4545

4646
CERTS_PATH = File.expand_path('../../.buildkite/certs', __dir__)
4747
host = ENV['TEST_ES_SERVER'] || 'http://localhost:9200'
48-
raise URI::InvalidURIError unless host =~ /\A#{URI::DEFAULT_PARSER.make_regexp}\z/
48+
raise URI::InvalidURIError unless host =~ /\A#{URI::RFC2396_PARSER.make_regexp}\z/
4949

5050
password = ENV['ELASTIC_PASSWORD'] || 'changeme'
5151
HOST_URI = URI.parse(host)

0 commit comments

Comments
 (0)