logstash-mixin-validator_support 1.1.0-java → 1.1.1-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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 159f311b4e84d43448ee190e79e43a7cb357e8428375e2a0a4df1c8d9410b4c3
|
4
|
+
data.tar.gz: 3ccacc4edcd70fe348ef64e5881149568dbe472bfec9cf932fc731f6440cc776
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0599cb15cf09c700a401d14bc023aec8afee421a1d169654fa396e479544a0fec6a6a7bd754d0e503afb020f4f3b30eec144298be1910c900f1c258bedb34fc
|
7
|
+
data.tar.gz: d251678e6c755bc20887fc94fe9cdc51b11e8a5a6415169599b4554e9d47dfce3fc949ad3a5151c37e84c8b9625287a5887705dc9368c53a859101356d921812
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
## 1.1.1
|
2
|
+
- allow single word host names [#7](https://github.com/logstash-plugins/logstash-mixin-validator_support/pull/7)
|
3
|
+
|
1
4
|
## 1.1.0
|
2
5
|
- Introduces `:required_host_optional_port` validator [#4](https://github.com/logstash-plugins/logstash-mixin-validator_support/pull/4)
|
3
6
|
|
data/lib/logstash/plugin_mixins/validator_support/required_host_optional_port_validation_adapter.rb
CHANGED
@@ -13,7 +13,9 @@ module LogStash
|
|
13
13
|
is_valid_ipv4 = ->(candidate) { Resolv::IPv4::Regex.match?(candidate) && Resolv::IPv4.create(candidate) rescue false}
|
14
14
|
is_valid_ipv6 = ->(candidate) { Resolv::IPv6::Regex.match?(candidate) && Resolv::IPv6.create(candidate) rescue false}
|
15
15
|
|
16
|
-
|
16
|
+
# RFC1123 validated at https://regexr.com/7n2ce
|
17
|
+
rfc1123_hostname_pattern = %r{\A(?=.{1,255}\z)(?:(?=[^.]{1,63}(?:[.]|\z))[a-z0-9]+(?:[a-z0-9\-]+[a-z0-9])?(?:[.]|\z))+\z}i
|
18
|
+
is_valid_hostname = ->(candidate) { rfc1123_hostname_pattern.match?(candidate) }
|
17
19
|
|
18
20
|
# the normalized tuple from valid values
|
19
21
|
host_port_pair = Struct.new(:host, :port)
|
@@ -12,6 +12,7 @@ describe LogStash::PluginMixins::ValidatorSupport::RequiredHostOptionalPortValid
|
|
12
12
|
{
|
13
13
|
"127.0.0.1:1234" => {:host => "127.0.0.1", :port => 1234},
|
14
14
|
"82.31.1.3:9800" => {:host => "82.31.1.3", :port => 9800},
|
15
|
+
"localhost:1234" => {:host => "localhost", :port => 1234},
|
15
16
|
"foo.com:1234" => {:host => "foo.com", :port => 1234},
|
16
17
|
"foo-bar-domain.com:9800" => {:host => "foo-bar-domain.com", :port => 9800},
|
17
18
|
"[::1]:1234" => {:host => "::1", :port => 1234},
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-mixin-validator_support
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-11-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|