diff --git a/sentry-delayed_job/Gemfile b/sentry-delayed_job/Gemfile index 48e80fbdc..d32b3f24e 100644 --- a/sentry-delayed_job/Gemfile +++ b/sentry-delayed_job/Gemfile @@ -18,14 +18,20 @@ gem "rails", "> 5.0.0" platform :jruby do # See https://github.com/jruby/activerecord-jdbc-adapter/issues/1139 - gem "activerecord-jdbcmysql-adapter", github: "jruby/activerecord-jdbc-adapter" + gem "activerecord-jdbcmysql-adapter", github: "jruby/activerecord-jdbc-adapter", ref: "6b3983bbbfda75ee2a1f5bc4c8d35efd7b71d84b" gem "jdbc-sqlite3" end -if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.5.0") +ruby_version = Gem::Version.new(RUBY_VERSION) + +if ruby_version < Gem::Version.new("2.5.0") gem "sqlite3", "~> 1.3.0", platform: :ruby -else - gem "sqlite3", "~> 1.6.9", platform: :ruby +elsif ruby_version < Gem::Version.new("3.0.0") + gem "sqlite3", "~> 1.6.0", platform: :ruby +elsif ruby_version >= Gem::Version.new("3.0.0") && ruby_version < Gem::Version.new("3.1.0") + gem "sqlite3", "~> 1.7.0", platform: :ruby +elsif ruby_version >= Gem::Version.new("3.1.0") + gem "sqlite3", "~> 2.2", platform: :ruby end eval_gemfile File.expand_path("../Gemfile", __dir__) diff --git a/sentry-ruby/spec/sentry/client/event_sending_spec.rb b/sentry-ruby/spec/sentry/client/event_sending_spec.rb index 86b4b6c67..e66926758 100644 --- a/sentry-ruby/spec/sentry/client/event_sending_spec.rb +++ b/sentry-ruby/spec/sentry/client/event_sending_spec.rb @@ -101,7 +101,7 @@ client.capture_event(event, scope) - expect(string_io.string).to include("Converting event (#{event.event_id}) to JSON compatible hash failed: source sequence is illegal/malformed utf-8") + expect(string_io.string).to match(/Converting event \(#{event.event_id}\) to JSON compatible hash failed:.*illegal\/malformed utf-8/i) end end diff --git a/sentry-sidekiq/spec/sentry/sidekiq/cron/job_spec.rb b/sentry-sidekiq/spec/sentry/sidekiq/cron/job_spec.rb index 85fcaeb99..d5d637a7c 100644 --- a/sentry-sidekiq/spec/sentry/sidekiq/cron/job_spec.rb +++ b/sentry-sidekiq/spec/sentry/sidekiq/cron/job_spec.rb @@ -33,7 +33,7 @@ end before do - stub_const('Job', Class.new { def perform; end }) + stub_const('Job', Class.new { include Sidekiq::Worker; def perform; end }) end it 'patches class' do