logstash-core 5.6.14-java → 5.6.15-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 846a8f95ca9c915eadc9704ae09edc275f4383c6
4
- data.tar.gz: 1ae6d513bde1f0ca0015780e6cc8a7451492fe37
3
+ metadata.gz: e68ba6fa0739dfe292bc782d79d303c5bc1d7aeb
4
+ data.tar.gz: fb599314938b1ffcfead95e62ae05faa2d84bbe0
5
5
  SHA512:
6
- metadata.gz: fa22764bdec6c65e1e39884e45c09160d97c16df5655c3d171cd06184370b505cd58497ed8521ba6b448d5dec5d02f1f1d387878a3671c4ca5b297400ebef382
7
- data.tar.gz: 44a5c1e403ad7fc01ba24beacc65df3101e76b571f7de25a4b9ce114cb04d45ed4b9bcc0cd2ed24eb88b111e142b0d915cc23166cd2c7ce9ee1fc7ea997b66c5
6
+ metadata.gz: 856bc505c204555882d71a3b27f8b230593a41ad78321f428a2d80469e54b26b6c6f05e5b7a04778dfe06706de7400fe728993d93e40e1172deaa49afe46a80a
7
+ data.tar.gz: af15ca3cc86fc8f9acc55c1072aa8c6a0edcf2864e8c04a0a86b3702dfa527d13516f7488a210b46c00c59cd16aa92f5bc65fe180c54f71714a18d9e9181a996
@@ -15,7 +15,7 @@ class LogStash::Util::SafeURI
15
15
  attr_reader :uri
16
16
 
17
17
  public
18
- def initialize(arg)
18
+ def initialize(arg)
19
19
  @uri = case arg
20
20
  when String
21
21
  arg = "//#{arg}" if HOSTNAME_PORT_REGEX.match(arg)
@@ -27,6 +27,7 @@ class LogStash::Util::SafeURI
27
27
  else
28
28
  raise ArgumentError, "Expected a string, java.net.URI, or URI, got a #{arg.class} creating a URL"
29
29
  end
30
+ raise ArgumentError, "URI is not valid - host is not specified" if @uri.host.nil?
30
31
  end
31
32
 
32
33
  def to_s
Binary file
@@ -53,7 +53,7 @@ Gem::Specification.new do |gem|
53
53
 
54
54
  gem.add_runtime_dependency "sinatra", '~> 1.4', '>= 1.4.6'
55
55
  gem.add_runtime_dependency 'puma', '~> 2.16'
56
- gem.add_runtime_dependency "jruby-openssl", "0.9.19" # >= 0.9.13 Required to support TLSv1.2
56
+ gem.add_runtime_dependency "jruby-openssl", "~> 0.10.1" # >= 0.9.13 Required to support TLSv1.2
57
57
  gem.add_runtime_dependency "chronic_duration", "0.10.6"
58
58
 
59
59
  # TODO(sissel): Treetop 1.5.x doesn't seem to work well, but I haven't
@@ -32,5 +32,45 @@ module LogStash module Util
32
32
  end
33
33
  end
34
34
  end
35
+
36
+ describe "#initialize" do
37
+ context 'when host is required' do
38
+ MALFORMED_URIS = ['http:/user:pass@localhost:9600', 'http:/localhost', 'http:/localhost:9600', 'h;localhost', 'http:://localhost']
39
+
40
+ context 'malformed uris via string' do
41
+ MALFORMED_URIS.each do |arg|
42
+ it "#{arg}: should raise an error" do
43
+ expect{LogStash::Util::SafeURI.new(arg)}.to raise_error(ArgumentError)
44
+ end
45
+ end
46
+ end
47
+
48
+ context 'malformed uris via java.net.URI' do
49
+ MALFORMED_URIS.each do |arg|
50
+ it "#{arg}: should raise an error" do
51
+ java_uri = java.net.URI.new(arg)
52
+ expect{LogStash::Util::SafeURI.new(java_uri)}.to raise_error(ArgumentError)
53
+ end
54
+ end
55
+ end
56
+
57
+ context 'malformed uris via Ruby URI' do
58
+ MALFORMED_URIS.each do |arg|
59
+ it "#{arg}: should raise an error" do
60
+ ruby_uri = URI.parse(arg)
61
+ expect{LogStash::Util::SafeURI.new(ruby_uri)}.to raise_error(ArgumentError)
62
+ end
63
+ end
64
+ end
65
+
66
+ context 'uris with a valid host' do
67
+ ['http://user:pass@notlocalhost:9600', 'http://notlocalhost', 'https://notlocalhost:9600', '//notlocalhost', 'notlocalhost', 'notlocalhost:9200'].each do |arg|
68
+ it "#{arg}: should resolve host correctly" do
69
+ expect(LogStash::Util::SafeURI.new(arg).host).to eq('notlocalhost')
70
+ end
71
+ end
72
+ end
73
+ end
74
+ end
35
75
  end
36
76
  end end
@@ -1,6 +1,6 @@
1
1
  ---
2
- logstash: 5.6.14
3
- logstash-core: 5.6.14
2
+ logstash: 5.6.15
3
+ logstash-core: 5.6.15
4
4
  logstash-core-plugin-api: 2.1.29
5
5
 
6
6
  # Note: this file is copied to the root of logstash-core because its gemspec needs it when
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.6.14
4
+ version: 5.6.15
5
5
  platform: java
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-05 00:00:00.000000000 Z
11
+ date: 2019-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -151,17 +151,17 @@ dependencies:
151
151
  - !ruby/object:Gem::Dependency
152
152
  requirement: !ruby/object:Gem::Requirement
153
153
  requirements:
154
- - - '='
154
+ - - "~>"
155
155
  - !ruby/object:Gem::Version
156
- version: 0.9.19
156
+ version: 0.10.1
157
157
  name: jruby-openssl
158
158
  prerelease: false
159
159
  type: :runtime
160
160
  version_requirements: !ruby/object:Gem::Requirement
161
161
  requirements:
162
- - - '='
162
+ - - "~>"
163
163
  - !ruby/object:Gem::Version
164
- version: 0.9.19
164
+ version: 0.10.1
165
165
  - !ruby/object:Gem::Dependency
166
166
  requirement: !ruby/object:Gem::Requirement
167
167
  requirements: