Sha256: aa9e328548fcec2a6ffaf910023a2bac75b9adff16134aa08cf22939324dbd67

Contents?: true

Size: 648 Bytes

Versions: 11

Compression:

Stored size: 648 Bytes

Contents

# frozen_string_literal: true

module Eventboss
  class Topic
    class << self
      def build_arn(event_name:, source_app: nil)
        [
          'arn:aws:sns',
          Eventboss.configuration.eventboss_region,
          Eventboss.configuration.eventboss_account_id,
          build_name(
            event_name: event_name,
            source_app: source_app
          )
        ].join(':')
      end

      def build_name(event_name:, source_app: nil)
        [
          Eventboss.configuration.sns_sqs_name_infix,
          source_app,
          event_name,
          Eventboss.env
        ].compact.join('-')
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
eventboss-1.9.1 lib/eventboss/topic.rb
eventboss-1.9.0 lib/eventboss/topic.rb
eventboss-1.8.1 lib/eventboss/topic.rb
eventboss-1.8.0 lib/eventboss/topic.rb
eventboss-1.7.0 lib/eventboss/topic.rb
eventboss-1.5.0 lib/eventboss/topic.rb
eventboss-1.4.1 lib/eventboss/topic.rb
eventboss-1.3.5 lib/eventboss/topic.rb
eventboss-1.3.4 lib/eventboss/topic.rb
eventboss-1.3.3 lib/eventboss/topic.rb
eventboss-1.3.2 lib/eventboss/topic.rb