lib/rabbit.rb in rabbit_messaging-0.8.1 vs lib/rabbit.rb in rabbit_messaging-0.9.0

- old
+ new

@@ -23,10 +23,11 @@ attribute :queue_name_conversion attribute :receiving_job_class_callable attribute :exception_notifier, default: -> { default_exception_notifier } attribute :before_receiving_hooks, default: [] attribute :after_receiving_hooks, default: [] + attribute :skip_publishing_in, default: %i[test development] attribute :receive_logger, default: lambda { Logger.new(Rails.root.join("log", "incoming_rabbit_messages.log")) } @@ -43,9 +44,13 @@ raise InvalidConfig, "mising group_id" unless group_id unless environment.in? %i[test development production] raise "environment should be one of (test, development, production)" end + end + + def skip_publish? + skip_publishing_in.include?(environment) end def app_name [group_id, project_id].join(".") end