Skip to content
Merged
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
6 changes: 4 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@ not_jruby = %i[ruby mingw x64_mingw].freeze

gem 'activesupport', '>= 4.2'
gem 'byebug', platforms: not_jruby
# Open source licensed elasticsearch
gem 'honeybadger', '>= 2.0'
gem 'irb', '~> 1.0'
# Minimum of 0.5.0 for specific error classes
gem 'mysql2', '>= 0.5.0', platforms: not_jruby
gem 'redcarpet', '~> 3.5', platforms: not_jruby
gem 'rspec_junit_formatter', '~> 0.4'
gem 'yard', '~> 0.9.25', platforms: not_jruby

if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.4')
gem 'honeybadger', '>= 2.0'
end

if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.6')
gem 'rubocop', '~> 1.32.0'
gem 'rubocop-rspec', '~> 2.12'
Expand Down
5 changes: 3 additions & 2 deletions spec/events/honeybadger_listener_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# frozen_string_literal: true

require 'honeybadger/ruby'

RSpec.describe Faulty::Events::HoneybadgerListener do
let(:circuit) { Faulty::Circuit.new('test_circuit') }
let(:error) { StandardError.new('fail') }
Expand All @@ -11,6 +9,9 @@
end

before do
skip 'Honeybadger only supports >= Ruby 2.4' unless Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.4')
require 'honeybadger/ruby'

Honeybadger.configure do |c|
c.backend = 'test'
c.api_key = 'test'
Expand Down
4 changes: 4 additions & 0 deletions spec/events/log_listener_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
io.read.strip
end

before do
require 'logger'
end

context 'when Rails is available' do
before do
l = logger
Expand Down
4 changes: 2 additions & 2 deletions spec/patch/redis_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ def faulty_cause(error)
expect { good_redis.ping }.to raise_error do |error|
expect(error).to be_a(::Redis::BaseConnectionError)
expect(faulty_cause(error)).to be_a(Faulty::Patch::Redis::BusyError)
expect(faulty_cause(error).message).to eq(
'BUSY Redis is busy running a script. You can only call SCRIPT KILL or SHUTDOWN NOSAVE.'
expect(faulty_cause(error).message).to match(
/BUSY Redis is busy running a script. You can only call SCRIPT KILL or SHUTDOWN NOSAVE/
)
end

Expand Down