freddy 2.5.1 → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6d1f9939bd9e7f0a172fc7a4d33a75e7fc8c2ca0f5d955efcdb7a650fba7799d
4
- data.tar.gz: 06e3027b141fd5416d2e875f8fce78b1b7e969db3e5f8990821c6b5fea03d6ef
3
+ metadata.gz: 74c044f881fa44748647d92c0bb450755b69d3d1da6cbe23c87ff15e6724f415
4
+ data.tar.gz: f7b80d3bebfa4240727b1cdf1f6ef84449c3e91d5db1de81dd3a6a8cb4acc0df
5
5
  SHA512:
6
- metadata.gz: c4624e65aaa2837868783c660dbd1ed8e6d51618c8c062a26812bd873b8f95464a8cd0df39c33220c1ee21f0b485dbf2d9e9b4d8337c22af0821e2f58c156c7e
7
- data.tar.gz: 48c0e50064604225a46bb2060cf1c9e7a9bd92da221189eac1b2c902ab1ca6b7ef2c78290827142d263ea71fd624e9df602572bbef455929d88971196ba8c16a
6
+ metadata.gz: ba8c640285852bec4f9d318ccc8278137401152a14580be46a9ec281aca5bec6c7ca6cfd674161afd7124d0c936c103513acd14283cc24310cc03d2a1572d5f9
7
+ data.tar.gz: d4abff33f63da251866dc5fb9dce48a088738aa88dc70d0351bd2b633742d118d05bc8de02e5d2274da14bbbe15d225673e90870a885157334f4f5d47d77f704
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- freddy (2.5.1)
4
+ freddy (2.6.0)
5
5
  bunny (~> 2.11)
6
6
  concurrent-ruby (~> 1.0)
7
7
  oj (~> 3.6)
@@ -3,8 +3,8 @@
3
3
  class Freddy
4
4
  module Consumers
5
5
  class RespondToConsumer
6
- def self.consume(*attrs, &block)
7
- new(*attrs).consume(&block)
6
+ def self.consume(**attrs, &block)
7
+ new(**attrs).consume(&block)
8
8
  end
9
9
 
10
10
  def initialize(thread_pool:, destination:, channel:, handler_adapter_factory:)
@@ -3,8 +3,8 @@
3
3
  class Freddy
4
4
  module Consumers
5
5
  class TapIntoConsumer
6
- def self.consume(*attrs, &block)
7
- new(*attrs).consume(&block)
6
+ def self.consume(**attrs, &block)
7
+ new(**attrs).consume(&block)
8
8
  end
9
9
 
10
10
  def initialize(thread_pool:, patterns:, channel:, options:)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Freddy
4
- VERSION = '2.5.1'
4
+ VERSION = '2.6.0'
5
5
  end
data/lib/freddy.rb CHANGED
@@ -85,10 +85,12 @@ class Freddy
85
85
  handler_adapter_factory = MessageHandlerAdapters::Factory.new(producer)
86
86
 
87
87
  Consumers::RespondToConsumer.consume(
88
- thread_pool: Concurrent::FixedThreadPool.new(@prefetch_buffer_size),
89
- destination: destination,
90
- channel: channel,
91
- handler_adapter_factory: handler_adapter_factory,
88
+ **{
89
+ thread_pool: Concurrent::FixedThreadPool.new(@prefetch_buffer_size),
90
+ destination: destination,
91
+ channel: channel,
92
+ handler_adapter_factory: handler_adapter_factory
93
+ },
92
94
  &callback
93
95
  )
94
96
  end
@@ -128,10 +130,12 @@ class Freddy
128
130
  @logger.debug "Tapping into messages that match #{pattern_or_patterns}"
129
131
 
130
132
  Consumers::TapIntoConsumer.consume(
131
- thread_pool: Concurrent::FixedThreadPool.new(@prefetch_buffer_size),
132
- patterns: Array(pattern_or_patterns),
133
- channel: @connection.create_channel(prefetch: @prefetch_buffer_size),
134
- options: options,
133
+ **{
134
+ thread_pool: Concurrent::FixedThreadPool.new(@prefetch_buffer_size),
135
+ patterns: Array(pattern_or_patterns),
136
+ channel: @connection.create_channel(prefetch: @prefetch_buffer_size),
137
+ options: options
138
+ },
135
139
  &callback
136
140
  )
137
141
  end
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Freddy do
4
- let(:freddy) { described_class.build(logger, config) }
4
+ let(:freddy) { described_class.build(logger, **config) }
5
5
 
6
6
  let(:destination) { random_destination }
7
7
  let(:destination2) { random_destination }
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Freddy::ResponderHandler do
4
- let(:freddy) { Freddy.build(logger, config) }
4
+ let(:freddy) { Freddy.build(logger, **config) }
5
5
 
6
6
  let(:destination) { random_destination }
7
7
  let(:payload) { { pay: 'load' } }
@@ -2,9 +2,9 @@ require 'spec_helper'
2
2
  require 'hamster/experimental/mutable_set'
3
3
 
4
4
  describe 'Concurrency' do
5
- let(:freddy1) { Freddy.build(logger, config) }
6
- let(:freddy2) { Freddy.build(logger, config) }
7
- let(:freddy3) { Freddy.build(logger, config) }
5
+ let(:freddy1) { Freddy.build(logger, **config) }
6
+ let(:freddy2) { Freddy.build(logger, **config) }
7
+ let(:freddy3) { Freddy.build(logger, **config) }
8
8
 
9
9
  after { [freddy1, freddy2, freddy3].each(&:close) }
10
10
 
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe 'Reply' do
4
- let(:freddy) { Freddy.build(logger, config) }
4
+ let(:freddy) { Freddy.build(logger, **config) }
5
5
 
6
6
  let(:destination) { random_destination }
7
7
  let(:request_payload) { { req: 'load' } }
@@ -2,9 +2,9 @@ require 'spec_helper'
2
2
  require 'hamster/experimental/mutable_set'
3
3
 
4
4
  describe 'Tapping into with group identifier' do
5
- let(:deliverer) { Freddy.build(logger, config) }
6
- let(:responder1) { Freddy.build(logger, config) }
7
- let(:responder2) { Freddy.build(logger, config) }
5
+ let(:deliverer) { Freddy.build(logger, **config) }
6
+ let(:responder1) { Freddy.build(logger, **config) }
7
+ let(:responder2) { Freddy.build(logger, **config) }
8
8
 
9
9
  let(:destination) { random_destination }
10
10
 
@@ -8,8 +8,8 @@ describe 'Tracing' do
8
8
  end
9
9
 
10
10
  context 'when receiving a traced request' do
11
- let(:freddy) { Freddy.build(logger, config) }
12
- let(:freddy2) { Freddy.build(logger, config) }
11
+ let(:freddy) { Freddy.build(logger, **config) }
12
+ let(:freddy2) { Freddy.build(logger, **config) }
13
13
 
14
14
  let(:destination) { random_destination }
15
15
  let(:destination2) { random_destination }
@@ -63,9 +63,9 @@ describe 'Tracing' do
63
63
  end
64
64
 
65
65
  context 'when receiving a nested traced request' do
66
- let(:freddy) { Freddy.build(logger, config) }
67
- let(:freddy2) { Freddy.build(logger, config) }
68
- let(:freddy3) { Freddy.build(logger, config) }
66
+ let(:freddy) { Freddy.build(logger, **config) }
67
+ let(:freddy2) { Freddy.build(logger, **config) }
68
+ let(:freddy3) { Freddy.build(logger, **config) }
69
69
 
70
70
  let(:destination) { random_destination }
71
71
  let(:destination2) { random_destination }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: freddy
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.1
4
+ version: 2.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Glia TechMovers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-29 00:00:00.000000000 Z
11
+ date: 2023-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler