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
10 changes: 7 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,19 @@ jobs:
- gemfiles/rails61.gemfile
include:
- gemfile: gemfiles/rails81.gemfile
ruby-version: 3.4.7
ruby-version: 4.0.0
- gemfile: gemfiles/rails81.gemfile
ruby-version: 3.4.8
- gemfile: gemfiles/rails81.gemfile
ruby-version: 3.3.10
- gemfile: gemfiles/rails72.gemfile
ruby-version: 3.4.7
ruby-version: 4.0.0
- gemfile: gemfiles/rails72.gemfile
ruby-version: 3.4.8
- gemfile: gemfiles/rails72.gemfile
ruby-version: 3.3.10
- gemfile: gemfiles/rails71.gemfile
ruby-version: 3.4.7
ruby-version: 3.4.8
- gemfile: gemfiles/rails71.gemfile
ruby-version: 3.3.10
- gemfile: gemfiles/rails70.gemfile
Expand Down
7 changes: 6 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This Gemfile is compatible with Ruby 2.5.0 or greater. To test with
# earlier Rubies, use the appropriate Gemfile from the ./gemfiles/ dir.
ruby '3.4.7'
ruby '4.0.0'

source 'https://rubygems.org'

Expand Down Expand Up @@ -74,6 +74,11 @@ if GEM_VERSION_RAILS < Gem::Version.new('6.0')
else
gem 'delayed_job', '~> 4.1', :require => false
end

gem 'cgi' if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.5.0')

gem 'benchmark' if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('4.0.0')

gem 'generator_spec'
gem 'redis', '<= 4.8.0'
gem 'resque', '< 2.0.0'
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails70.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && RUBY_ENGINE == '

gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
gem 'jruby-openssl', :platform => :jruby
gem 'rails', '~> 7.0.8'
gem 'rails', '~> 7.0.10'
gem 'sqlite3', '~> 1.4', :platform => [:ruby, :mswin, :mingw]

gem 'rspec-rails', '~> 6.0.3'
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails71.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && RUBY_ENGINE == '

gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
gem 'jruby-openssl', :platform => :jruby
gem 'rails', '~> 7.1.0'
gem 'rails', '~> 7.1.6'
gem 'sqlite3', '~> 1.4', :platform => [:ruby, :mswin, :mingw]

gem 'rspec-rails', '~> 6.0.3'
Expand Down
6 changes: 5 additions & 1 deletion gemfiles/rails72.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && RUBY_ENGINE == '

gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
gem 'jruby-openssl', :platform => :jruby
gem 'rails', '~> 7.2.0'
gem 'rails', '~> 7.2.3'
gem 'sqlite3', '~> 1.4', :platform => [:ruby, :mswin, :mingw]

gem 'rspec-rails', '~> 6.0.3'
Expand All @@ -27,6 +27,10 @@ gem 'sucker_punch', '~> 2.0'
# We need last sinatra that uses rack 2.x and ruby 2.5.x
gem 'sinatra', :git => 'https://github.com/sinatra/sinatra', :tag =>'v2.1.0'

gem 'cgi' if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.5.0')

gem 'benchmark' if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('4.0.0')

gem 'database_cleaner'
gem 'delayed_job', '4.1.10', :require => false
gem 'generator_spec'
Expand Down
6 changes: 5 additions & 1 deletion gemfiles/rails81.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && RUBY_ENGINE == '

gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
gem 'jruby-openssl', :platform => :jruby
gem 'rails', '~> 8.1.0'
gem 'rails', '~> 8.1.1'
gem 'sqlite3', '~> 2.1', :platform => [:ruby, :mswin, :mingw]

gem 'rspec-rails', '~> 6.0.3'
Expand All @@ -27,6 +27,10 @@ gem 'sucker_punch', '~> 2.0'
# We need last sinatra that uses rack 2.x and ruby 2.5.x
gem 'sinatra', :git => 'https://github.com/sinatra/sinatra', :tag =>'v2.1.0'

gem 'cgi' if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.5.0')

gem 'benchmark' if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('4.0.0')

gem 'database_cleaner'
gem 'delayed_job', '4.1.13', :require => false
gem 'generator_spec'
Expand Down
24 changes: 18 additions & 6 deletions spec/controllers/home_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -446,17 +446,29 @@ def send_req(meth, path, args)
else
expect(frames[-2][:method]).to be_eql('tap')
end
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.0.0')
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('4.0.0')
expect(frames[-2][:locals]).to be_eql(locals[1])
elsif Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.0.0')
expect(frames[-2][:locals]).to be_nil
else
expect(frames[-2][:locals]).to be_eql(locals[1])
end

expect(frames[-3][:locals]).to be_eql(locals[2])
expect(frames[-4][:locals]).to be_eql(locals[3])
# Frames: -5 (and -6 in rails < 8.0) are not app frames, and have different
# contents in different Ruby versions.
if Gem::Version.new(Rails.version) >= Gem::Version.new('8.0.0')
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('4.0.0')
expect(frames[-3][:locals]).to be_eql(locals[3])
else
expect(frames[-3][:locals]).to be_eql(locals[2])
expect(frames[-4][:locals]).to be_eql(locals[3])
end

# Skip non-app frames, which vary based on Ruby and Rails versions
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('4.0.0')
if Gem::Version.new(Rails.version) >= Gem::Version.new('8.0.0')
expect(frames[-5][:locals]).to be_eql(locals[4])
else
expect(frames[-4][:locals]).to be_eql(locals[4])
end
elsif Gem::Version.new(Rails.version) >= Gem::Version.new('8.0.0')
expect(frames[-6][:locals]).to be_eql(locals[4])
else
expect(frames[-7][:locals]).to be_eql(locals[4])
Expand Down
24 changes: 18 additions & 6 deletions spec/rollbar/middleware/sinatra_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -293,17 +293,29 @@ def app
else
expect(frames[-2][:method]).to be_eql('tap')
end
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.0.0')
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('4.0.0')
expect(frames[-2][:locals]).to be_eql(locals[1])
elsif Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.0.0')
expect(frames[-2][:locals]).to be_nil
else
expect(frames[-2][:locals]).to be_eql(locals[1])
end

expect(frames[-3][:locals]).to be_eql(locals[2])
expect(frames[-4][:locals]).to be_eql(locals[3])
# Frames: -5 (and -6 in rails < 8.0) are not app frames, and have different
# contents in different Ruby versions.
if Gem::Version.new(Rails.version) >= Gem::Version.new('8.0.0')
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('4.0.0')
expect(frames[-3][:locals]).to be_eql(locals[3])
else
expect(frames[-3][:locals]).to be_eql(locals[2])
expect(frames[-4][:locals]).to be_eql(locals[3])
end

# Skip non-app frames, which vary based on Ruby and Rails versions
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('4.0.0')
if Gem::Version.new(Rails.version) >= Gem::Version.new('8.0.0')
expect(frames[-5][:locals]).to be_eql(locals[4])
else
expect(frames[-4][:locals]).to be_eql(locals[4])
end
elsif Gem::Version.new(Rails.version) >= Gem::Version.new('8.0.0')
expect(frames[-6][:locals]).to be_eql(locals[4])
else
expect(frames[-7][:locals]).to be_eql(locals[4])
Expand Down
4 changes: 2 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
begin
require 'simplecov'

SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(
SimpleCov::Formatter::HTMLFormatter
]
)

SimpleCov.start do
add_filter '/spec/'
Expand Down