• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ninoseki / mihari / 7248022748

18 Dec 2023 12:25PM UTC coverage: 93.908% (-0.6%) from 94.504%
7248022748

push

github

web-flow
Merge pull request #880 from ninoseki/renew-service-classess-commands

refactor: renew service classes & comamnds

73 of 100 new or added lines in 12 files covered. (73.0%)

1 existing line in 1 file now uncovered.

3376 of 3595 relevant lines covered (93.91%)

84.14 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

90.91
/lib/mihari/services/getters.rb
1
module Mihari
4✔
2
  module Services
4✔
3
    class ArtifactGetter < Service
4✔
4
      #
5
      # @param [Integer] id
6
      #
7
      # @return [Mihari::Models::Artifact]
8
      #
9
      def call(id)
4✔
10
        Mihari::Models::Artifact.eager_load(
16✔
11
          :autonomous_system,
12
          :geolocation,
13
          :whois_record,
14
          :dns_records,
15
          :reverse_dns_names
16
        ).find id
17
      end
18
    end
19

20
    class AlertGetter < Service
4✔
21
      #
22
      # @param [Integer] id
23
      #
24
      # @return [Mihari::Models::Artifact]
25
      #
26
      def call(id)
4✔
NEW
27
        Mihari::Models::Alert.eager_load(
×
28
          :artifacts,
29
          rule: :tags
30
        ).find id
31
      end
32
    end
33

34
    class RuleGetter < Service
4✔
35
      #
36
      # @params [String] id
37
      #
38
      # @return [Mihari::Models::Rule]
39
      #
40
      def call(id)
4✔
41
        Mihari::Models::Rule.find id
8✔
42
      end
43
    end
44
  end
45
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc