File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,8 +32,8 @@ group :development do
3232 else
3333 gem 'debug'
3434 end
35- # Related to https://github.com/ruby-i18n/i18n/issues/735
36- # Keeping here for compatiblity with JRuby 9.x
35+ # TODO: Related to https://github.com/ruby-i18n/i18n/issues/735
36+ # TODO: Keeping here for compatiblity with JRuby 9.x
3737 if Gem ::Version . new ( RUBY_VERSION ) < Gem ::Version . new ( '3.2' ) &&
3838 Gem ::Version . new ( RUBY_VERSION ) > Gem ::Version . new ( '2.6' )
3939 gem 'i18n' , '1.14'
Original file line number Diff line number Diff line change 1515# specific language governing permissions and limitations
1616# under the License.
1717
18- require 'cgi'
18+ require 'cgi/escape '
1919require 'multi_json'
2020require 'elasticsearch/api/version'
2121require 'elasticsearch/api/utils'
Original file line number Diff line number Diff line change 2121
2222CERTS_PATH = File . expand_path ( './../../../.buildkite/certs' , __dir__ )
2323host = ENV [ 'TEST_ES_SERVER' ] || 'http://localhost:9200'
24- raise URI ::InvalidURIError unless host =~ /\A #{ URI ::DEFAULT_PARSER . make_regexp } \z /
24+ # TODO: For compatiblity with JRuby 9.3
25+ parser = defined? ( URI ::RFC2396_PARSER ) ? URI ::RFC2396_PARSER : URI ::DEFAULT_PARSER
26+ raise URI ::InvalidURIError unless host =~ /\A #{ parser . make_regexp } \z /
2527
2628password = ENV [ 'ELASTIC_PASSWORD' ] || 'changeme'
2729HOST_URI = URI . parse ( host )
Original file line number Diff line number Diff line change 1515# specific language governing permissions and limitations
1616# under the License.
1717ELASTICSEARCH_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+ # TODO: For compatiblity with JRuby 9.3
19+ parser = defined? ( URI ::RFC2396_PARSER ) ? URI ::RFC2396_PARSER : URI ::DEFAULT_PARSER
20+ raise URI ::InvalidURIError unless ELASTICSEARCH_URL =~ /\A #{ parser . make_regexp } \z /
1921
2022require 'spec_helper'
2123require 'logger'
4951 it 'Reports es service name and gem version' do
5052 headers = CLIENT . transport . connections . first . connection . headers
5153 version = Class . new . extend ( Elastic ::Transport ::MetaHeader ) . send ( :client_meta_version , Elasticsearch ::VERSION )
52- expect ( headers [ 'x-elastic-client-meta' ] ) . to match /^es=#{ version } /
54+ expect ( headers [ 'x-elastic-client-meta' ] ) . to match ( /^es=#{ version } / )
5355 end
5456 end
5557end
Original file line number Diff line number Diff line change 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",
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,
Original file line number Diff line number Diff line change @@ -45,7 +45,9 @@ def jruby?
4545
4646CERTS_PATH = File . expand_path ( '../../.buildkite/certs' , __dir__ )
4747host = ENV [ 'TEST_ES_SERVER' ] || 'http://localhost:9200'
48- raise URI ::InvalidURIError unless host =~ /\A #{ URI ::DEFAULT_PARSER . make_regexp } \z /
48+ # TODO: For compatiblity with JRuby 9.3
49+ parser = defined? ( URI ::RFC2396_PARSER ) ? URI ::RFC2396_PARSER : URI ::DEFAULT_PARSER
50+ raise URI ::InvalidURIError unless host =~ /\A #{ parser . make_regexp } \z /
4951
5052password = ENV [ 'ELASTIC_PASSWORD' ] || 'changeme'
5153HOST_URI = URI . parse ( host )
You can’t perform that action at this time.
0 commit comments