logstash-filter-mutate 3.5.9 → 3.6.0

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: 9fd4fb3b414af0266ba7a62e6ef72b00ad1b109200d8da6b54ee7910a1ba561b
4
- data.tar.gz: 6368b980d3d5c1b32f139bfc007341cafff738a2db055df8c3534436c836b729
3
+ metadata.gz: 9d1d58066e7668e4417a16a9c9e0960af87dd6501d0ed994af6d62bc002be3c5
4
+ data.tar.gz: 4a2f2bec08bfc29a60d89ccdd18cda2573ad24409f100dbcb9525c2777cad3cf
5
5
  SHA512:
6
- metadata.gz: 6ba63632430477006fc77d5d27e3ee14c72f4e1bc5bd9557ba886c31b95b34636fd1ed7869dfc77c3a95d02355b04f0afa1e4a4c6053b715d8769c7c5fc1895b
7
- data.tar.gz: b971f7880a0a98ee89545b5775fcde5c67adb48b624c5b6885b6a70476352950c246d1577d9e133b82b1979b89f7f1500b156a27ed5f6ca3a4fa016e327767e0
6
+ metadata.gz: 4ef305ade3e754f31824151d6404a3d2f4ed62c8366d8c1fa313723427543739408ca3080aaebf3ce271f5c1c5175203e54ed204bdd593e206c268cee6b36aba
7
+ data.tar.gz: 9027aaba222005b5fff435cca19dc01d531c06ad8e4eb3eea8d9db07bcbbada140cc07e4866093d2abd458c2ee32493fe8bb8679bda40588e495d2f115829eab
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 3.6.0
2
+ - Add JRuby 10 support: fix integer conversion precision loss beyond 2^53 caused by `parse_signed_hex_str` routing all strings through `Float()` [#178](https://github.com/logstash-plugins/logstash-filter-mutate/pull/178)
3
+
1
4
  ## 3.5.9
2
5
  - Fix `convert` to covert hexadecimal float notation and scientific notation string to float and integer [#175](https://github.com/logstash-plugins/logstash-filter-mutate/pull/175)
3
6
 
@@ -365,7 +365,7 @@ class LogStash::Filters::Mutate < LogStash::Filters::Base
365
365
  # scientific notation. BigDecimal() can't parse hex string
366
366
  return BigDecimal(value).to_i if value.include?("e")
367
367
  # maybe a float string
368
- return value.to_i
368
+ return BigDecimal(value).to_i
369
369
  end
370
370
 
371
371
  Integer(value)
@@ -414,7 +414,10 @@ class LogStash::Filters::Mutate < LogStash::Filters::Base
414
414
  # @param value [String] the string to parse
415
415
  # @return [Float, nil] the signed float value if hex, or nil if not a hex string
416
416
  def parse_signed_hex_str(value)
417
- return Float(value) if @support_signed_hex
417
+ if @support_signed_hex
418
+ return Float(value) if value.match?(/^[+-]?0x/i)
419
+ return nil
420
+ end
418
421
 
419
422
  if value.match?(/^[+-]?0x/i)
420
423
  sign = value.start_with?('-') ? -1 : 1
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-filter-mutate'
4
- s.version = '3.5.9'
4
+ s.version = '3.6.0'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "Performs mutations on fields"
7
7
  s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
@@ -21,6 +21,7 @@ Gem::Specification.new do |s|
21
21
 
22
22
  # Gem dependencies
23
23
  s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99"
24
+ s.add_runtime_dependency "bigdecimal"
24
25
  s.add_development_dependency "logstash-patterns-core"
25
26
  s.add_development_dependency "logstash-filter-grok"
26
27
  s.add_development_dependency "logstash-codec-plain"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-filter-mutate
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.9
4
+ version: 3.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-10-31 00:00:00.000000000 Z
10
+ date: 2026-03-26 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: logstash-core-plugin-api
@@ -29,6 +29,20 @@ dependencies:
29
29
  - - "<="
30
30
  - !ruby/object:Gem::Version
31
31
  version: '2.99'
32
+ - !ruby/object:Gem::Dependency
33
+ name: bigdecimal
34
+ requirement: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - ">="
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
39
+ type: :runtime
40
+ prerelease: false
41
+ version_requirements: !ruby/object:Gem::Requirement
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
32
46
  - !ruby/object:Gem::Dependency
33
47
  name: logstash-patterns-core
34
48
  requirement: !ruby/object:Gem::Requirement