logstash-filter-fingerprint 3.2.3 → 3.2.4

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: 5985afeb097946794b24fa48da9e78f4a4146e39b7a39b4be98f11c2b74cd7f8
4
- data.tar.gz: 1e6ba943dbae9448dacf4bcf8f4d268aa48381d816be73630f6594358090c8d4
3
+ metadata.gz: 5525ff933ff4bd23a530926cbe02de0305a5516e4ddcd6e5e070ba145e17bbe2
4
+ data.tar.gz: 7bab5438407ba87a4540ff9011edaa49373af4c0d7c05eab8ea0cf0e4118e060
5
5
  SHA512:
6
- metadata.gz: 63d38e83879e80b301af57fd82fbf60630ace866b6f102425e8d3ae97467b5384b17268215e52854c35bf1c24e7dfe8f6bd448fa9821f7289610c794232d7a48
7
- data.tar.gz: 566ef91a8e6d67abf113bdd07621f65d47a290d0b12f7278d881d3eb13cdaf8c6346147eee3d4534a4184ec70544440177b9821b54e61f58ace71a84ae821669
6
+ metadata.gz: 3e3b49516ae015fe0d9e9fcf03aae19eb74b3fcc5c812a5184ef34e783653f54342077d54743a6b7239dbd0c7af8b8fb0af9264297a16cd379ac268a6855da5d
7
+ data.tar.gz: 19a1ad9caad856601bcdd4cbe2ad0028645068e6627a09ac505b47a482a22bb7839537af7976982dcc8f932d3bbbe52db34bb5c374b66b6bd43fcdd430127c0d
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 3.2.4
2
+ - Fixed the error in Murmur3 with Integer [#61](https://github.com/logstash-plugins/logstash-filter-fingerprint/pull/61)
3
+
1
4
  ## 3.2.3
2
5
  - [DOC] Expanded description for concatenate_sources behavior and provided examples [#60](https://github.com/logstash-plugins/logstash-filter-fingerprint/pull/60)
3
6
 
data/docs/index.asciidoc CHANGED
@@ -156,7 +156,7 @@ the cryptographic hash function with the same name will be used to generate
156
156
  the fingerprint. When a key set, the keyed-hash (HMAC) digest function will
157
157
  be used.
158
158
 
159
- If set to `MURMUR3` the non-cryptographic MurmurHash function will be used.
159
+ If set to `MURMUR3` the non-cryptographic 64 bit MurmurHash function will be used.
160
160
 
161
161
  If set to `IPV4_NETWORK` the input data needs to be a IPv4 address and
162
162
  the hash value will be the masked-out address using the number of bits
@@ -193,8 +193,8 @@ class LogStash::Filters::Fingerprint < LogStash::Filters::Base
193
193
 
194
194
  def fingerprint_murmur3(value)
195
195
  case value
196
- when Fixnum
197
- MurmurHash3::V32.int_hash(value)
196
+ when Integer
197
+ MurmurHash3::V32.int64_hash(value)
198
198
  else
199
199
  MurmurHash3::V32.str_hash(value.to_s)
200
200
  end
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-filter-fingerprint'
4
- s.version = '3.2.3'
4
+ s.version = '3.2.4'
5
5
  s.licenses = ['Apache-2.0']
6
6
  s.summary = "Fingerprints fields by replacing values with a consistent hash"
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"
@@ -32,8 +32,18 @@ describe LogStash::Filters::Fingerprint do
32
32
  describe "the MURMUR3 method" do
33
33
  let(:fingerprint_method) { "MURMUR3" }
34
34
 
35
- it "fingerprints the value" do
36
- expect(fingerprint).to eq(4013733395)
35
+ context "string" do
36
+ it "fingerprints the value" do
37
+ expect(fingerprint).to eq(4013733395)
38
+ end
39
+ end
40
+
41
+ context "number" do
42
+ let(:data) { {"clientip" => 123 } }
43
+
44
+ it "fingerprints the value" do
45
+ expect(fingerprint).to eq(823512154)
46
+ end
37
47
  end
38
48
  end
39
49
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-filter-fingerprint
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.3
4
+ version: 3.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-11 00:00:00.000000000 Z
11
+ date: 2021-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement