Skip to content

Commit b0c82dc

Browse files
authored
Update .travis.yml to ajust to new release cadence (#148)
Also change uri parser regexp due to uri gem change From ruby/uri#107: ``` This pull-request switched URI::DEFAULT_PARSER to URI::RFC3986_Parser. And I added switch-back feature for URI::RFC2396_Parser. URI.parser = URI::RFC2396_PARSER ``` Introduce check so that if the `URI::RFC2396_PARSER` constant is not defined (using an older URI lib) then fall back to using the default.
1 parent 1e5b86f commit b0c82dc

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

.travis.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import:
22
- logstash-plugins/.ci:travis/[email protected]
33

4-
env:
5-
jobs: # test with old scheduler version (3.0 was locked in LS 7.x)
6-
- ELASTIC_STACK_VERSION=7.x RUFUS_SCHEDULER_VERSION=3.0.9 LOG_LEVEL=info
7-
- ELASTIC_STACK_VERSION=8.2.0 RUFUS_SCHEDULER_VERSION=3.0.9
4+
jobs:
5+
exclude:
6+
- env: ELASTIC_STACK_VERSION=7.current
7+
- env: SNAPSHOT=true ELASTIC_STACK_VERSION=7.current
8+
include:
9+
- env: ELASTIC_STACK_VERSION=7.current RUFUS_SCHEDULER_VERSION=3.0.9 SNAPSHOT=true
10+
- env: ELASTIC_STACK_VERSION=7.current RUFUS_SCHEDULER_VERSION=3.0.9

lib/logstash/inputs/http_poller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ def normalize_request(url_or_spec)
154154
private
155155
def validate_request!(url_or_spec, request)
156156
method, url, spec = request
157-
158-
raise LogStash::ConfigurationError, "Invalid URL #{url}" unless URI::DEFAULT_PARSER.regexp[:ABS_URI].match(url)
157+
parser = defined?(URI::RFC2396_PARSER) ? URI::RFC2396_PARSER : URI::DEFAULT_PARSER
158+
raise LogStash::ConfigurationError, "Invalid URL #{url}" unless parser.regexp[:ABS_URI].match(url)
159159

160160
raise LogStash::ConfigurationError, "No URL provided for request! #{url_or_spec}" unless url
161161
if spec && spec[:auth]

0 commit comments

Comments
 (0)