Skip to content

Commit 3d217e3

Browse files
Upgrade dependencies, Ruby 3.2 compat
1 parent 7778cd9 commit 3d217e3

File tree

6 files changed

+15
-14
lines changed

6 files changed

+15
-14
lines changed

.github/workflows/test.yml

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
- 2.7
3030
- 3.0
3131
- 3.1
32+
- 3.2
3233

3334
steps:
3435
- uses: actions/checkout@v3

Gemfile

+7-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
source 'https://rubygems.org'
22

3-
ruby '>= 2.3.0'
3+
ruby '>= 2.6.0'
44

55
gemspec
66

77
group :development do
88
gem "rake"
9-
gem "guard", "~> 2.14", platform: :mri_23
9+
gem "guard", "~> 2.18"
1010
gem "guard-rspec", "~> 4.7", platform: :mri_23
1111

1212
gem "yard", "~> 0.9"
@@ -16,21 +16,20 @@ group :development do
1616
end
1717

1818
group :development, :test do
19-
gem "rspec", "~> 3.5"
20-
gem "simplecov", "~> 0.12"
19+
gem "rspec", "~> 3.12"
20+
gem "simplecov", "~> 0.21"
2121

2222
gem "sentry-raven"
2323
gem "sentry-ruby"
2424
gem "honeybadger"
25-
gem "coveralls", "~> 0.8.15", require: false
2625
gem "newrelic_rpm"
27-
gem "ddtrace", "~> 0.54.2"
28-
gem "airbrake", "~> 10.0"
26+
gem "ddtrace", "~> 1.8"
27+
gem "airbrake", "~> 13.0"
2928
gem "rollbar"
3029
gem "bugsnag"
3130
end
3231

3332
group :development, :darwin do
34-
gem "rb-fsevent", "~> 0.9"
33+
gem "rb-fsevent", "~> 0.11.2"
3534
gem "growl", "~> 1.0.3"
3635
end

hutch.gemspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Gem::Specification.new do |gem|
66
gem.add_runtime_dependency 'march_hare', '>= 3.0.0'
77
else
88
gem.platform = Gem::Platform::RUBY
9-
gem.add_runtime_dependency 'bunny', '>= 2.19', '< 3.0'
9+
gem.add_runtime_dependency 'bunny', '>= 2.20', '< 3.0'
1010
end
1111
gem.add_runtime_dependency 'carrot-top', '~> 0.0.7'
1212
gem.add_runtime_dependency 'multi_json', '~> 1.15'
@@ -16,7 +16,7 @@ Gem::Specification.new do |gem|
1616
gem.summary = 'Opinionated asynchronous inter-service communication using RabbitMQ'
1717
gem.description = 'Hutch is a Ruby library for enabling asynchronous inter-service communication using RabbitMQ'
1818
gem.version = Hutch::VERSION.dup
19-
gem.required_ruby_version = '>= 2.2'
19+
gem.required_ruby_version = '>= 2.6'
2020
gem.authors = ['Harry Marr', 'Michael Klishin']
2121
gem.homepage = 'https://github.com/ruby-amqp/hutch'
2222
gem.require_paths = ['lib']

lib/hutch/cli.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def daemonise_process
234234
end
235235

236236
def abort_without_file(file, file_description, &block)
237-
abort_with_message("#{file_description} '#{file}' not found") unless File.exists?(file)
237+
abort_with_message("#{file_description} '#{file}' not found") unless File.exist?(file)
238238

239239
yield
240240
end

lib/hutch/tracers/datadog.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
require 'ddtrace'
2+
require 'ddtrace/auto_instrument'
23

34
module Hutch
45
module Tracers
@@ -8,7 +9,7 @@ def initialize(klass)
89
end
910

1011
def handle(message)
11-
::Datadog.tracer.trace(@klass.class.name, service: 'hutch', span_type: 'rabbitmq') do
12+
::Datadog::Tracing.trace(@klass.class.name, service: 'hutch', span_type: 'rabbitmq') do
1213
@klass.process(message)
1314
end
1415
end

spec/hutch/tracers/datadog_spec.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ def process(message)
2525
let(:message) { double(:message) }
2626

2727
before do
28-
allow(Datadog.tracer).to receive(:trace).and_call_original
28+
allow(::Datadog::Tracing).to receive(:trace).and_call_original
2929
end
3030

3131
it 'uses Datadog tracer' do
3232
handle
3333

34-
expect(Datadog.tracer).to have_received(:trace).with('ClassName',
34+
expect(::Datadog::Tracing).to have_received(:trace).with('ClassName',
3535
hash_including(service: 'hutch', span_type: 'rabbitmq'))
3636
end
3737

0 commit comments

Comments
 (0)