freddy 2.5.0 → 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: 395a8eab66f9ff57ce7f4703033598596c67ffb8febb2198c7bfed24c0579ad0
4
- data.tar.gz: 5645a94b8e077a8f6a01ce96e6a5e546a1885abaf73b239804e9aab84a222789
3
+ metadata.gz: 74c044f881fa44748647d92c0bb450755b69d3d1da6cbe23c87ff15e6724f415
4
+ data.tar.gz: f7b80d3bebfa4240727b1cdf1f6ef84449c3e91d5db1de81dd3a6a8cb4acc0df
5
5
  SHA512:
6
- metadata.gz: 02a7990035a849971f4b68b1f52c15df2643334132b5d7a53aca33373c6e64c6b1cc1a46d28cdc32f83ab16199112e5de389ac05fde2d6a4b57303e64512073a
7
- data.tar.gz: 8865375d8f5576e6b3303cf9ecdea515356df8b8219e16b4f4a76faf45437c1f8adab0d172f24671931d0841314f5d766e8b4a69d9f21381c28abb2a03ec3943
6
+ metadata.gz: ba8c640285852bec4f9d318ccc8278137401152a14580be46a9ec281aca5bec6c7ca6cfd674161afd7124d0c936c103513acd14283cc24310cc03d2a1572d5f9
7
+ data.tar.gz: d4abff33f63da251866dc5fb9dce48a088738aa88dc70d0351bd2b633742d118d05bc8de02e5d2274da14bbbe15d225673e90870a885157334f4f5d47d77f704
data/Gemfile CHANGED
@@ -1,7 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'hamster', '~> 3.0'
4
- gem 'opentelemetry-sdk', '~> 1.0.0.rc3'
4
+ gem 'opentelemetry-sdk', '~> 1.0'
5
5
  gem 'pry'
6
6
  gem 'rspec'
7
7
  gem 'rubocop', '~> 1.30'
data/Gemfile.lock CHANGED
@@ -1,11 +1,11 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- freddy (2.5.0)
4
+ freddy (2.6.0)
5
5
  bunny (~> 2.11)
6
6
  concurrent-ruby (~> 1.0)
7
7
  oj (~> 3.6)
8
- opentelemetry-api (~> 1.0.0.rc3)
8
+ opentelemetry-api (~> 1.0)
9
9
  opentelemetry-semantic_conventions (~> 1.0)
10
10
  zlib (~> 1.1)
11
11
 
@@ -23,19 +23,19 @@ GEM
23
23
  hamster (3.0.0)
24
24
  concurrent-ruby (~> 1.0)
25
25
  method_source (1.0.0)
26
- oj (3.13.14)
27
- opentelemetry-api (1.0.0.rc3)
28
- opentelemetry-common (0.19.1)
29
- opentelemetry-api (~> 1.0.0.rc3)
30
- opentelemetry-instrumentation-base (0.18.2)
31
- opentelemetry-api (~> 1.0.0.rc3)
32
- opentelemetry-sdk (1.0.0.rc3)
33
- opentelemetry-api (~> 1.0.0.rc3)
34
- opentelemetry-common (~> 0.19.1)
35
- opentelemetry-instrumentation-base (~> 0.18.2)
26
+ oj (3.13.21)
27
+ opentelemetry-api (1.1.0)
28
+ opentelemetry-common (0.19.6)
29
+ opentelemetry-api (~> 1.0)
30
+ opentelemetry-registry (0.2.0)
31
+ opentelemetry-api (~> 1.1)
32
+ opentelemetry-sdk (1.2.0)
33
+ opentelemetry-api (~> 1.1)
34
+ opentelemetry-common (~> 0.19.3)
35
+ opentelemetry-registry (~> 0.2)
36
36
  opentelemetry-semantic_conventions
37
- opentelemetry-semantic_conventions (1.6.0)
38
- opentelemetry-api (~> 1.0.0.rc3)
37
+ opentelemetry-semantic_conventions (1.8.0)
38
+ opentelemetry-api (~> 1.0)
39
39
  parallel (1.22.1)
40
40
  parser (3.1.2.0)
41
41
  ast (~> 2.4.1)
@@ -75,7 +75,7 @@ GEM
75
75
  rubocop (~> 1.0)
76
76
  rubocop-ast (>= 1.1.0)
77
77
  ruby-progressbar (1.11.0)
78
- set (1.0.2)
78
+ set (1.0.3)
79
79
  sorted_set (1.0.3)
80
80
  rbtree
81
81
  set (~> 1.0)
@@ -90,7 +90,7 @@ DEPENDENCIES
90
90
  bundler
91
91
  freddy!
92
92
  hamster (~> 3.0)
93
- opentelemetry-sdk (~> 1.0.0.rc3)
93
+ opentelemetry-sdk (~> 1.0)
94
94
  pry
95
95
  rake
96
96
  rspec
data/freddy.gemspec CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
23
23
  spec.add_dependency 'bunny', '~> 2.11'
24
24
  spec.add_dependency 'concurrent-ruby', '~> 1.0'
25
25
  spec.add_dependency 'oj', '~> 3.6'
26
- spec.add_dependency 'opentelemetry-api', '~> 1.0.0.rc3'
26
+ spec.add_dependency 'opentelemetry-api', '~> 1.0'
27
27
  spec.add_dependency 'opentelemetry-semantic_conventions', '~> 1.0'
28
28
  spec.add_dependency 'zlib', '~> 1.1'
29
29
  end
@@ -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.0'
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.0
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-06-13 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
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 1.0.0.rc3
89
+ version: '1.0'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 1.0.0.rc3
96
+ version: '1.0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: opentelemetry-semantic_conventions
99
99
  requirement: !ruby/object:Gem::Requirement