Skip to content

Commit

Permalink
add support for Ruby 2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ajgon committed Oct 19, 2023
1 parent c00d671 commit 4e2e6d5
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 3 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Ruby Gem CI

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-latest]
ruby: ['2.2.10', '2.3.8' ]
include:
- ruby: '2.2.10'
sidekiq_version: '5.2.8'
redis_rb_version: '4.1.1'
rails_version: '5.2.8.1'
- ruby: '2.3.8'
sidekiq_version: '5.2.8'
redis_rb_version: '4.4.0'
rails_version: '5.2.8.1'
exclude:
- ruby: '2.2.10'
os: ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- name: Start Redis
uses: supercharge/[email protected]
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- run: rm -rf .git
- run: SIDEKIQ_VERSION=${{ matrix.sidekiq_version }} REDIS_RB_VERSION=${{ matrix.redis_rb_version }} RAILS_VERSION=${{ matrix.rails_version }} make build
- run: SIDEKIQ_VERSION=${{ matrix.sidekiq_version }} REDIS_RB_VERSION=${{ matrix.redis_rb_version }} RAILS_VERSION=${{ matrix.rails_version }} bundle exec rake
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
<br>
</p>

This is IFAD mirror of `sentry-ruby` gem with added support of legacy rubies (currently version 2.3)
This is IFAD mirror of `sentry-sidekiq` gem with added support of legacy rubies (currently versions 2.3 and 2.2)
1 change: 1 addition & 0 deletions lib/sentry-sidekiq.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require 'backports/2.3.0/numeric'
require "sidekiq"
require "sentry-ruby"
require "sentry/integrable"
Expand Down
2 changes: 1 addition & 1 deletion lib/sentry/sidekiq/error_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def call(ex, context)
hint: { background: false }
)
ensure
scope&.clear
scope.nil? ? nil : scope.clear
end

private
Expand Down
3 changes: 2 additions & 1 deletion sentry-sidekiq.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
spec.homepage = "https://github.com/getsentry/sentry-ruby"

spec.platform = Gem::Platform::RUBY
spec.required_ruby_version = '>= 2.3'
spec.required_ruby_version = '>= 2.2'
spec.extra_rdoc_files = ["README.md", "LICENSE.txt"]
spec.files = `git ls-files | grep -Ev '^(spec|benchmarks|examples)'`.split("\n")

Expand All @@ -22,6 +22,7 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]

spec.add_dependency "backports"
spec.add_dependency "sentry-ruby", "~> 5.12.0"
spec.add_dependency "sidekiq", ">= 3.0"
end

0 comments on commit 4e2e6d5

Please sign in to comment.