logstash-filter-empowclassifier 0.3.20 → 0.3.21

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
  SHA256:
3
- metadata.gz: 5719f7baac23ecb7508c9797d2165d9cbdceba32aaf8e4de242ceab87172769b
4
- data.tar.gz: 0e01d111116b79895a0cbf6444d641c58adbeb787c9bce3dc33634bedbbe21b2
3
+ metadata.gz: c0ab2f3813891f929cc0fcc4adf2e0a516353ae624354f042e722ed0168cb7e6
4
+ data.tar.gz: 37efadbbe48fc883b7f9d261937a8d7f21608bdbc352407fae5c8e5cce3b31ad
5
5
  SHA512:
6
- metadata.gz: 2709a8a10ad9c3a750413123f025a4a59927f293426e33c49437118f86e285437cac398e29ed2efd2ecc03d6f491a5bfeaac97737e55bf83965939e98854edf5
7
- data.tar.gz: 697116ff115703cc46f40522dff9697a3848a6126451542141dfde85c54085e61b234408b649b4636d9435d3ef6a1c7d5789572d7776b63d22fd1dd966934265
6
+ metadata.gz: f7ff052743c972acbb8d325d6dce6037444f73adcd99ecf3147b53611c8d95723b5a3468ec40485357e4c7a43eaeae3791f7dd329dec926c13d01bba71fc7378
7
+ data.tar.gz: beec683cb760250887cace06f9c572db3c491a682f31fb72794fa274403d17aeea31b435df4c9ed8eff7d098111030bdcba5c7e099180ffc0cbfa8e6b4379a04
@@ -114,7 +114,8 @@ module LogStash
114
114
 
115
115
  private
116
116
  def rescue_http_error_result(http_error)
117
- if http_error.nil? or LogStash::Filters::Empow::Utils.is_blank_string(http_error.http_body)
117
+ if (http_error.nil? \
118
+ or (!defined?(http_error.http_body) or LogStash::Filters::Empow::Utils.is_blank_string(http_error.http_body)))
118
119
  return http_error.to_s
119
120
  else
120
121
  err = http_error.http_body
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-filter-empowclassifier'
3
- s.version = '0.3.20'
3
+ s.version = '0.3.21'
4
4
  s.licenses = ['Apache-2.0']
5
5
  s.summary = 'Logstash intent classification plugin client for accessing empow''s classifiction cloud'
6
6
  #s.description = 'Write a longer description or delete this line.'
@@ -27,7 +27,19 @@ describe LogStash::Filters::Empow::ClassificationCenterClient do
27
27
  term[:malware_name] = 'assaf.clicker'
28
28
  req1 = LogStash::Filters::Empow::ClassificationRequest.new('AM', 'lastline', term)
29
29
 
30
- results = client.classify([req1])
30
+ i = 0
31
+ while true do
32
+ i += 1
33
+ results = client.classify([req1])
34
+
35
+ results.each do |k,v|
36
+ p i
37
+ if !v.is_successful
38
+ p v
39
+ break
40
+ end
41
+ end
42
+ end
31
43
 
32
44
  #p results
33
45
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-filter-empowclassifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.20
4
+ version: 0.3.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - empow
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2019-02-05 00:00:00.000000000 Z
13
+ date: 2019-02-07 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  requirement: !ruby/object:Gem::Requirement