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

payrollhero / dispatch-rider / #3015

02 Sep 2022 11:22PM UTC coverage: 0.409% (-84.7%) from 85.154%
#3015

push

web-flow
Layout/SpaceInsideStringInterpolation-20220901233630 (#89)

* :police_car: regenerate rubocop todo

* :police_car: Layout/SpaceInsideStringInterpolation

* :police_car: regenerate rubocop todo

Co-authored-by: Rubocop Challenger <rubocop@payrollhero.com>

0 of 1 new or added line in 1 file covered. (0.0%)

1529 existing lines in 63 files now uncovered.

7 of 1711 relevant lines covered (0.41%)

0.0 hits per line

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

0.0
/lib/dispatch-rider/notification_services/aws_sns.rb
1
# This is a basic implementation of the Notification service using Amazon SNS.
2
# The expected usage is as follows :
3
#   notification_service = DispatchRider::NotificationServices::AwsSns.new
4
#   notification_service.publish(:to => [:foo, :oof], :message => {:subject => "bar", :body => "baz"})
UNCOV
5
module DispatchRider
×
UNCOV
6
  module NotificationServices
×
UNCOV
7
    class AwsSns < Base
×
UNCOV
8
      def notifier_builder
×
UNCOV
9
        Aws::SNS::Client
×
UNCOV
10
      rescue NameError
×
11
        raise AdapterNotFoundError.new(self.class.name, 'aws-sdk')
×
UNCOV
12
      end
×
13

UNCOV
14
      def channel_registrar_builder
×
UNCOV
15
        Registrars::SnsChannel
×
UNCOV
16
      end
×
17

UNCOV
18
      def publish_to_channel(channel, message:)
×
UNCOV
19
        Retriable.retriable(tries: 10, on: Aws::Errors::MissingCredentialsError) { super }
×
UNCOV
20
      end
×
21

22
      # not really happy with this, but the notification service registrar system is way too rigid to do this cleaner
23
      # since you only can have one notifier for the whole service, but you need to create a new one for each region
UNCOV
24
      def channel(name)
×
UNCOV
25
        arn = self.fetch(name)
×
26
        # in v1, the Topic object was fetched from API, in v3 it's basically just an arn wrapper
UNCOV
27
        Aws::SNS::Topic.new(arn)
×
UNCOV
28
      end
×
UNCOV
29
    end
×
UNCOV
30
  end
×
UNCOV
31
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