mihari 0.8.1 → 0.8.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
  SHA256:
3
- metadata.gz: ced23a972f1bf15c0d379cebbb11c303b3819d09ec56cf7f3f8936f6376cdd43
4
- data.tar.gz: 3bef1fa391842b63d005cd75041def63dbba8ec473de4b8f56adfdf1e7119ab6
3
+ metadata.gz: 2be8fa691c300847f8986ad6f89f23360ae32c3c42865c9da439bf8ea966e698
4
+ data.tar.gz: d2ad505e1fb086d334c232cf4811effcff2109593cac150779eda415e672a4c9
5
5
  SHA512:
6
- metadata.gz: 7e3a6503831ca7dbdd54fb28861d51e9fe7b8e622db4dd1843a69780ae14be8bf28f81ccf7fb93ed09af33ea2d4af89a82b85de14b420e55ada42c5bb564a7e4
7
- data.tar.gz: 07fbc1dd07f0cf38f071482e6c28062719e417c3b1e544373a61e4cf692d32d7b14c2512382350d43f7612d276996e5d8cdbe61e614edd3358de5b28aa14987f
6
+ metadata.gz: 032e012ae1ed2999bd626b7d3f4c7f6a06df58789ea3a885e3efb3e6b51c172d4868d6f1eee45af60a4ed430bb9967f6d27288f4a62a8cf051747c71811cb83d
7
+ data.tar.gz: 938f80eed835fa6a671e23f079c9f60b061b0006bec7281b8e0f8161dbebda1039fd2e066f8dd587df1bc2ab2e5ffe673737a24c04124cd5dc7066432b53bb54
@@ -35,8 +35,6 @@ module Mihari
35
35
 
36
36
  run_emitter emitter
37
37
  end
38
-
39
- save_as_cache unique_artifacts.map(&:data)
40
38
  end
41
39
 
42
40
  def run_emitter(emitter)
@@ -66,10 +64,6 @@ module Mihari
66
64
 
67
65
  @unique_artifacts ||= @the_hive.artifact.find_non_existing_artifacts(uncached_artifacts)
68
66
  end
69
-
70
- def save_as_cache(data)
71
- @cache.save data
72
- end
73
67
  end
74
68
  end
75
69
  end
@@ -7,6 +7,7 @@ module Mihari
7
7
 
8
8
  def initialize
9
9
  @the_hive = Mihari::TheHive.new
10
+ @cache = Cache.new
10
11
  end
11
12
 
12
13
  # @return [true, false]
@@ -23,6 +24,14 @@ module Mihari
23
24
  artifacts: artifacts.map(&:to_h),
24
25
  tags: tags
25
26
  )
27
+
28
+ save_as_cache artifacts.map(&:data)
29
+ end
30
+
31
+ private
32
+
33
+ def save_as_cache(data)
34
+ @cache.save data
26
35
  end
27
36
  end
28
37
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Mihari
4
- VERSION = "0.8.1"
4
+ VERSION = "0.8.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mihari
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manabu Niseki