logstash-filter-amelia 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 680b9b6fda38878c19861b7be874d5b91a5c4023
4
- data.tar.gz: bbf7977f692a590f4159f4a8a007d582ba3f47cc
3
+ metadata.gz: cd435670f8f2aee480687c2686578dbc4a392707
4
+ data.tar.gz: ffa0447bc5ddac59b0e2faa7a2c819dbbac4add5
5
5
  SHA512:
6
- metadata.gz: 7a3f51a287e6c0184abc8742b5b6799f68820223501bace8777bbdae3b8f3fa586749138c9543d12d36582b7dd09d6e97dd55c2ad3abd2e6c34eb49dd5068e6d
7
- data.tar.gz: bf36a1df5ad21fa34a5f0f6ffd23fc3c77cdb5dd8dc8d3d99b34982f47a431caefe4b877a49fad39c33ce51f401f7fc442b0c1e918384a425fa4494516a627b1
6
+ metadata.gz: 8414cbe3e5303eb6d562a253d71566662ad2956fe8b89e6bc06e1ee043e20db9fb2df1d3224f01d31f345088dc0edb6da1a28959eeb843c581e080448b33866d
7
+ data.tar.gz: cdcd45529f6dede475a67a2cb547808110af19e26a4626692e8930703a9ace07890bb3e4dfe19c6b0ae7efcce8e7989b09ad2cc65c223c96db37e03e91dc5246
@@ -103,10 +103,10 @@ class LogStash::Filters::Amelia < LogStash::Filters::Base
103
103
  retour = []
104
104
  list_length = data[position, 4].to_i
105
105
  position += 4
106
- args_length = data[position, 4].to_i
107
- position += 4
108
106
 
109
107
  list_length.times do |i|
108
+ args_length = data[position, 4].to_i
109
+ position += 4
110
110
  current_args = {}
111
111
  args_length.times do
112
112
  key_length = data[position, 4].to_i
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-filter-amelia'
3
- s.version = '1.0.1'
3
+ s.version = '1.0.2'
4
4
  s.licenses = ['Apache License (2.0)']
5
5
  s.summary = "This filter extracts data based on the homegrown AMELIA serialisation"
6
6
  s.description = "This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone program. The aim is to parse non standard serialization format, see spec for format descitpion"
@@ -76,5 +76,11 @@ describe LogStash::Filters::Amelia do
76
76
  expect(subject['result']['parameters'][0]['timeTxt']).to eql '0'
77
77
  expect(subject['result']['parameters'][0].keys.length).to eql 17
78
78
  end
79
+
80
+ sample("payload" => "00010001000000026002300040004TIZO&SYS00100034EMAIL_USERFlorian.BRICOT@lisi-automotive.com00040014NAMEBRICOT FLORIAN00040001DCFM.00040003DFMNLSO00040001DIVIB00090003WHLO_USER10200040007USIDFBRICOT00040000DEPT00090003FACI_USER00100040036CONMLISI AUTOMOTIVE FORMER SAS 16/02/1300040003FACI00000050001ADMIN100040000CUNO00040003CONO09000090002CONO_USER9000040018FACNGRANDVILLARS SIEGE00040003WHLO10000040015TX40LISI AUTOMOTIVE00040002LANCFR00040003DTFMDMY00040000MNVR00060009PROFILEXPERT-M3000300040003FACI00100040011FACNDELLE SIEGE00040003WHLO101000300040003FACI00200040010FACNDELLE AUTO00040003WHLO102000300040003FACI00300040008FACNDELLE VE00040003WHLO103000300040003FACI00400040005FACNDASLE00040003WHLO104000300040003FACI00500040007FACNMELISEY00040003WHLO105000300040003FACI00600040009FACNPRECITURN00040003WHLO106000300040003FACI00700040010FACNST FLORENT00040003WHLO107000300040003FACI00800040006FACNTHIANT00040003WHLO108000300040003FACI00900040007FACNPUISEUX00040003WHLO109000300040003FACI01000040010FACNHEIDELBERG00040003WHLO110000300040003FACI01100040013FACNMELLRICHSTADT00040003WHLO111000300040003FACI01200040011FACNVOEHRENBACH00040003WHLO112000300040003FACI01300040011FACNMISSISSAUGA00040003WHLO113000300040003FACI01400040022FACNPROTOTYPES DELLE SIEGE00040003WHLO114000300040003FACI01500040015FACNGRANDVILLARS PM00040003WHLO115000300040003FACI01600040008FACNFORM A.S00040003WHLO116000300040003FACI01700040007FACNKIERSPE00040003WHLO117000300040003FACI01800040006FACNMADRID00040003WHLO118000300040003FACI01900040018FACNBONNEUIL SUR MARNE00040003WHLO119000300040003FACI02000040016FACNLA FERTE - DREUX00040003WHLO120000300040003FACI02200040011FACNGUMMERSBACH00040003WHLO122000300040003FACI02700040007FACNKIERSPE00040003WHLO127000300040003FACI02800040006FACNMADRID00040003WHLO128000300040003FACI02900040009FACNMONTERREY00040003WHLO129000300040003FACI99900040022FACNPOUR ARTICLE REFERENCE00040003WHLOREF") do
81
+ expect(subject).to include("result")
82
+ expect(subject['result']['parameters']).to be_a Array
83
+ expect(subject['result']['parameters'].size).to eql 26
84
+ end
79
85
  end
80
86
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-filter-amelia
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - LISI Automotive