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
2 changes: 1 addition & 1 deletion sentry-ruby/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ gem "puma"

gem "timecop"
gem "stackprof" unless RUBY_PLATFORM == "java"
gem "vernier", platforms: :ruby if RUBY_VERSION >= "3.2.1"
gem "vernier", platforms: :ruby if ruby_version >= Gem::Version.new("3.3") && ruby_version < Gem::Version.new("4.1.0")

gem "graphql", ">= 2.2.6"

Expand Down
6 changes: 3 additions & 3 deletions sentry-ruby/spec/sentry/vernier/profiler_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require "sentry/vernier/profiler"

RSpec.describe Sentry::Vernier::Profiler, when: { ruby_version?: [:>=, "3.3"], ruby_engine?: "ruby" } do
RSpec.describe Sentry::Vernier::Profiler, when: :vernier_installed? do
subject(:profiler) { described_class.new(Sentry.configuration) }

before do
Expand Down Expand Up @@ -283,7 +283,7 @@
expect(thread2[:name]).to eq("thread-bar-1")
end

it 'has correct frames', when: { ruby_version?: [:>=, "3.3"], ruby_engine?: "ruby" } do
it 'has correct frames' do
frames = profiler.to_h[:profile][:frames]

foo_frame = frames.find { |f| f[:function] =~ /foo/ }
Expand All @@ -296,7 +296,7 @@
expect(foo_frame[:abs_path]).to include('sentry-ruby/spec/support/profiler.rb')
end

it 'has correct stacks', when: { ruby_version?: [:>=, "3.3"], ruby_engine?: "ruby" } do
it 'has correct stacks' do
profile = profiler.to_h[:profile]
frames = profile[:frames]
stacks = profile[:stacks]
Expand Down
5 changes: 4 additions & 1 deletion sentry-ruby/spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
require "rspec/retry"
require "redis"
require "stackprof" unless RUBY_PLATFORM == "java"
require "vernier" unless RUBY_PLATFORM == "java" || RUBY_VERSION < "3.2"
begin
require "vernier"
rescue LoadError
end

SimpleCov.start do
project_name "sentry-ruby"
Expand Down
Loading