Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
event_source (0.5.5)
event_source (0.5.7)
addressable (>= 2.8.0)
bunny (>= 2.14)
deep_merge (~> 1.2.0)
Expand Down Expand Up @@ -108,12 +108,12 @@ GEM
database_cleaner-core (2.0.1)
deep_merge (1.2.1)
diff-lcs (1.4.4)
dry-configurable (0.12.1)
dry-configurable (0.13.0)
concurrent-ruby (~> 1.0)
dry-core (~> 0.5, >= 0.5.0)
dry-container (0.8.0)
dry-core (~> 0.6)
dry-container (0.9.0)
concurrent-ruby (~> 1.0)
dry-configurable (~> 0.1, >= 0.1.3)
dry-configurable (~> 0.13, >= 0.13.0)
dry-core (0.7.1)
concurrent-ruby (~> 1.0)
dry-equalizer (0.3.0)
Expand Down Expand Up @@ -153,13 +153,13 @@ GEM
dry-initializer (~> 3.0)
dry-schema (~> 1.5, >= 1.5.2)
erubi (1.10.0)
et-orbi (1.2.4)
et-orbi (1.2.5)
tzinfo
ethon (0.14.0)
ethon (0.15.0)
ffi (>= 1.15.0)
faker (2.18.0)
i18n (>= 1.6, < 2)
faraday (1.4.2)
faraday (1.4.3)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
Expand All @@ -171,11 +171,11 @@ GEM
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.1.0)
faraday_middleware (1.0.0)
faraday-net_http_persistent (1.2.0)
faraday_middleware (1.2.0)
faraday (~> 1.0)
ffi (1.15.4)
fugit (1.5.0)
fugit (1.5.2)
et-orbi (~> 1.1, >= 1.1.8)
raabro (~> 1.4)
globalid (0.5.2)
Expand All @@ -197,7 +197,7 @@ GEM
method_source (1.0.0)
mime-types (3.3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2021.0225)
mime-types-data (3.2021.0901)
mini_mime (1.1.2)
mini_portile2 (2.6.1)
minitest (5.14.4)
Expand All @@ -215,7 +215,7 @@ GEM
nokogiri (1.12.5)
mini_portile2 (~> 2.6.1)
racc (~> 1.4)
oj (3.13.1)
oj (3.13.9)
ox (2.14.5)
parallel (1.20.1)
parser (3.0.1.1)
Expand All @@ -227,7 +227,7 @@ GEM
byebug (~> 11.0)
pry (~> 0.10)
public_suffix (4.0.6)
queue-bus (0.11.0)
queue-bus (0.12.0)
multi_json
redis
raabro (1.4.0)
Expand Down Expand Up @@ -266,7 +266,7 @@ GEM
rainbow (3.0.0)
rake (13.0.6)
rbtree (0.4.4)
redis (4.3.1)
redis (4.5.1)
redis-namespace (1.8.1)
redis (>= 3.0.4)
regexp_parser (2.1.1)
Expand All @@ -281,14 +281,14 @@ GEM
resque (>= 1.10.0, < 2.0)
resque-retry
resque-scheduler (>= 2.0.1)
resque-retry (1.7.4)
resque-retry (1.7.6)
resque (>= 1.25, < 3.0)
resque-scheduler (~> 4.0)
resque-scheduler (4.4.0)
resque-scheduler (4.5.0)
mono_logger (~> 1.0)
redis (>= 3.3)
resque (>= 1.26)
rufus-scheduler (~> 3.2)
resque (>= 1.27)
rufus-scheduler (~> 3.2, < 3.7)
rexml (3.2.5)
rspec-core (3.10.1)
rspec-support (~> 3.10.0)
Expand Down Expand Up @@ -320,7 +320,7 @@ GEM
parser (>= 3.0.1.1)
ruby-progressbar (1.11.0)
ruby2_keywords (0.0.4)
rufus-scheduler (3.7.0)
rufus-scheduler (3.6.0)
fugit (~> 1.1, >= 1.1.6)
set (1.0.1)
sinatra (2.1.0)
Expand Down
2 changes: 2 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# CHANGELOG

## 0.5.5

Add support for prefetch count in the configuration
Expand Down
5 changes: 2 additions & 3 deletions lib/event_source/async_api/types.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ module Types

# UriKind =
# Types.Constructor(::URI) do |val|
# binding.pry
# (val.is_a? ::URI) ? val : ::URI.parse(val)
# end
UriKind =
Expand Down Expand Up @@ -68,8 +67,8 @@ module Types
Vhost = Types::Coercible::String.default('/')
ChannelTypeKind =
Types::Coercible::Symbol
.default(:routing_key)
.enum(:routing_key, :queue)
.default(:routing_key)
.enum(:routing_key, :queue)
ExchangeTypeKind =
Types::Coercible::Symbol.enum(
:topic,
Expand Down
2 changes: 1 addition & 1 deletion lib/event_source/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module EventSource
VERSION = "0.5.5"
VERSION = '0.5.7'
end
1 change: 0 additions & 1 deletion spec/event_source/command_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ def call
after(:all) do
connection_manager = EventSource::ConnectionManager.instance
connection_manager.drop_connections_for(:amqp)
# binding.pry
end

context '.event' do
Expand Down
13 changes: 8 additions & 5 deletions spec/event_source/protocols/amqp/bunny_consumer_handler_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
require 'config_helper'
require 'shared_contexts/amqp/connection.rb'
require 'shared_contexts/amqp/channel_item.rb'
require 'pry'

class LogService
include EventSource::Logging
Expand All @@ -15,7 +14,9 @@ class ExampleSubscriber
include ::EventSource::Subscriber[amqp: 'spec.crm_contact_created']
extend EventSource::Logging

subscribe(:on_crm_sugarcrm_contacts_contact_created) do |delivery_info, _metadata, response|
subscribe(
:on_crm_sugarcrm_contacts_contact_created
) do |delivery_info, _metadata, response|
def method_one(msg)
method_one(msg)
end
Expand Down Expand Up @@ -75,7 +76,6 @@ def method_one(msg)
end

context 'when stack level too deep exception raised in the subscriber' do

let(:logger) { LogService.new.logger }

let(:add_consumer) do
Expand All @@ -89,12 +89,15 @@ def method_one(msg)

it 'should reject message after logging exception' do
expect(bunny_queue.subject.channel).to receive(:reject)
operation_to_publish.call("Hello world!!")
operation_to_publish.call('Hello world!!')
sleep 1

match_found = false
while true
match_found = @log_output.readline&.match(/ERROR EventSource : Consumer processed message. Failed and message rejected with exception/)
match_found =
@log_output.readline&.match(
/ERROR EventSource : Consumer processed message. Failed and message rejected with exception/
)
break if match_found
end

Expand Down