File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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+ raise URI ::InvalidURIError unless host =~ /\A #{ URI ::RFC2396_PARSER . make_regexp } \z /
2525
2626password = ENV [ 'ELASTIC_PASSWORD' ] || 'changeme'
2727HOST_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+ raise URI ::InvalidURIError unless ELASTICSEARCH_URL =~ /\A #{ URI ::RFC2396_PARSER . make_regexp } \z /
1919
2020require 'spec_helper'
2121require 'logger'
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
5555end
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,7 @@ 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+ raise URI ::InvalidURIError unless host =~ /\A #{ URI ::RFC2396_PARSER . make_regexp } \z /
4949
5050password = ENV [ 'ELASTIC_PASSWORD' ] || 'changeme'
5151HOST_URI = URI . parse ( host )
You can’t perform that action at this time.
0 commit comments