From a7971e3249235ea28accdecea554a7eb63d8a1b3 Mon Sep 17 00:00:00 2001 From: Manabu Niseki Date: Sun, 21 Jan 2024 11:23:21 +0900 Subject: [PATCH 1/2] refactor: small refactoring --- lib/mihari/rule.rb | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/lib/mihari/rule.rb b/lib/mihari/rule.rb index 5cf3e4e2..2d6a925a 100644 --- a/lib/mihari/rule.rb +++ b/lib/mihari/rule.rb @@ -33,9 +33,9 @@ def initialize(**data) # @return [Boolean] # def errors? - return false if @errors.nil? + return false if errors.nil? - !@errors.empty? + !errors.empty? end def [](key) @@ -163,9 +163,7 @@ def normalized_artifacts # @return [Array] # def unique_artifacts - normalized_artifacts.select do |artifact| - artifact.unique?(base_time: base_time, artifact_ttl: artifact_ttl) - end + normalized_artifacts.select { |artifact| artifact.unique?(base_time: base_time, artifact_ttl: artifact_ttl) } end # @@ -337,9 +335,10 @@ def serial_analyzers # @return [Array>, Dry::Monads::Result::Failure>] def analyzer_results - parallel_results = Parallel.map(parallel_analyzers, &:result) - serial_results = serial_analyzers.map(&:result) - parallel_results + serial_results + [].tap do |out| + out << Parallel.map(parallel_analyzers, &:result) + out << serial_analyzers.map(&:result) + end.flatten end # From 9763b9b98167fd965b8e8f8a8b2ad2d714cb53c2 Mon Sep 17 00:00:00 2001 From: Manabu Niseki Date: Sun, 21 Jan 2024 11:23:28 +0900 Subject: [PATCH 2/2] v7.3.1 --- lib/mihari/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mihari/version.rb b/lib/mihari/version.rb index 7cfe5b06..77d427bc 100644 --- a/lib/mihari/version.rb +++ b/lib/mihari/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Mihari - VERSION = "7.3.0" + VERSION = "7.3.1" end