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 +4 -4
- data/lib/logstash/filters/center-client.rb +2 -1
- data/logstash-filter-empowclassifier.gemspec +1 -1
- data/spec/filters/assaf_spec.rb +13 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0ab2f3813891f929cc0fcc4adf2e0a516353ae624354f042e722ed0168cb7e6
|
4
|
+
data.tar.gz: 37efadbbe48fc883b7f9d261937a8d7f21608bdbc352407fae5c8e5cce3b31ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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?
|
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.
|
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.'
|
data/spec/filters/assaf_spec.rb
CHANGED
@@ -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
|
-
|
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.
|
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-
|
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
|