diff --git a/.github/workflows/rspec.yml b/.github/workflows/rspec.yml index 0f1b2a03..ae20d2dc 100644 --- a/.github/workflows/rspec.yml +++ b/.github/workflows/rspec.yml @@ -22,7 +22,7 @@ jobs: strategy: fail-fast: false matrix: - ruby_version: ['2.7.5', '3.0.5', '3.1.4', '3.2.2', '3.3.8', '3.4.4'] + ruby_version: ['2.7.5', '3.0.5', '3.1.4', '3.2.2', '3.3.8', '3.4.4', '3.4.7'] runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -51,7 +51,7 @@ jobs: strategy: fail-fast: false matrix: - ruby_version: ['2.7.5', '3.0.5', '3.1.4', '3.2.2', '3.3.8', '3.4.4'] + ruby_version: ['2.7.5', '3.0.5', '3.1.4', '3.2.2', '3.3.8', '3.4.4', '3.4.7'] runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 diff --git a/.ruby-version b/.ruby-version index 0444f320..81f1b89f 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.2.1 \ No newline at end of file +3.4.7 \ No newline at end of file diff --git a/lib/event_source.rb b/lib/event_source.rb index 7597298e..ced79b12 100644 --- a/lib/event_source.rb +++ b/lib/event_source.rb @@ -11,6 +11,7 @@ require 'dry-struct' require 'oj' require 'active_support/all' # TODO: Remove ActiveSupport dependency +require 'deep_merge/rails_compat' require 'event_source/version' require 'event_source/ruby_versions' diff --git a/lib/event_source/configure/config.rb b/lib/event_source/configure/config.rb index f5cd74f6..42ece278 100644 --- a/lib/event_source/configure/config.rb +++ b/lib/event_source/configure/config.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require 'deep_merge' +require 'deep_merge/rails_compat' module EventSource module Configure diff --git a/lib/event_source/configure/servers.rb b/lib/event_source/configure/servers.rb index efab5baa..657bd9ec 100644 --- a/lib/event_source/configure/servers.rb +++ b/lib/event_source/configure/servers.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require 'deep_merge' +require 'deep_merge/rails_compat' module EventSource module Configure diff --git a/lib/event_source/protocols/http/faraday_queue_proxy.rb b/lib/event_source/protocols/http/faraday_queue_proxy.rb index e290909a..7465165e 100644 --- a/lib/event_source/protocols/http/faraday_queue_proxy.rb +++ b/lib/event_source/protocols/http/faraday_queue_proxy.rb @@ -49,7 +49,8 @@ def actions # @param [Object] subscriber_klass Subscriber class # @return [Queue] Queue instance def subscribe(subscriber_klass, _options) - unique_key = [app_name, formatted_exchange_name].join(delimiter) + subscriber_suffix = subscriber_klass.name.downcase.gsub('::', '_') + unique_key = [app_name, formatted_exchange_name].join(delimiter) + "_#{subscriber_suffix}" subscription_key = [app_name, formatted_exchange_name].join(delimiter) subscriber_suffix = subscriber_klass.name.downcase.gsub('::', '_') unique_key = subscription_key + "_#{subscriber_suffix}" diff --git a/spec/event_source/channel_spec.rb b/spec/event_source/channel_spec.rb index ada8f37e..0303f462 100644 --- a/spec/event_source/channel_spec.rb +++ b/spec/event_source/channel_spec.rb @@ -96,7 +96,7 @@ context '.cancel_consumers' do before do subject.subscribe_operations.values.each do |sub_op| - subscriber_klass = double('SubscriberKlass') + subscriber_klass = double('SubscriberKlass', name: "SubscriberKlass") sub_op.subscribe(subscriber_klass) end end diff --git a/spec/event_source/connection_manager_spec.rb b/spec/event_source/connection_manager_spec.rb index 3d6f14bb..72fac27b 100644 --- a/spec/event_source/connection_manager_spec.rb +++ b/spec/event_source/connection_manager_spec.rb @@ -116,7 +116,7 @@ connection.start unless connection.active? connection.add_channels(async_api_channels) channel.subscribe_operations.values.each do |sub_op| - subscriber_klass = double('SubscriberKlass') + subscriber_klass = double('SubscriberKlass', name: "SubscriberKlass") sub_op.subscribe(subscriber_klass) end end diff --git a/spec/rails_app/spec/railtie_spec.rb b/spec/rails_app/spec/railtie_spec.rb index ce6c8a1f..67172917 100644 --- a/spec/rails_app/spec/railtie_spec.rb +++ b/spec/rails_app/spec/railtie_spec.rb @@ -58,7 +58,7 @@ connection.add_channels(async_api_channels) channel.subscribe_operations.each_value do |subscribe_operation| - subscriber_klass = double('SubscriberKlass') + subscriber_klass = double('SubscriberKlass', name: "SubscriberKlass") subscribe_operation.subscribe(subscriber_klass) end