Skip to content

Commit

Permalink
Drop support of Ruby < 2.5 and Rails < 5.0 (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
PetrHeinz authored Jul 12, 2023
1 parent 3b7a129 commit ad33def
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 271 deletions.
91 changes: 5 additions & 86 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ jobs:
- 2.7.2
- 2.6.6
- 2.5.8
- 2.4.10
- 2.3.8
- 2.2.10
- jruby-9.2.14.0
- truffleruby-21.0.0
gemfile:
Expand All @@ -36,96 +33,19 @@ jobs:
ruby-version: 2.6.6
- gemfile: rails-edge
ruby-version: 2.5.8
- gemfile: rails-edge
ruby-version: 2.4.10
- gemfile: rails-edge
ruby-version: 2.3.8
- gemfile: rails-edge
ruby-version: 2.2.10
- gemfile: rails-edge
ruby-version: jruby-9.2.14.0
- gemfile: rails-edge
ruby-version: truffleruby-21.0.0

- ruby-version: 3.0.0
gemfile: rails-5.2
- ruby-version: 3.0.0
gemfile: rails-5.1
- ruby-version: 3.0.0
gemfile: rails-5.0

- gemfile: rails-6.1
ruby-version: 2.4.10
- gemfile: rails-6.1
ruby-version: 2.3.8
- gemfile: rails-6.1
ruby-version: 2.2.10
- gemfile: rails-6.1
ruby-version: 2.2.10

- gemfile: rails-6.0
ruby-version: 2.4.10
- gemfile: rails-6.0
ruby-version: 2.3.8
- gemfile: rails-6.0
ruby-version: 2.2.10

- gemfile: rails-5.2
ruby-version: 2.2.10

env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
RAILS_ENV: test

steps:
- uses: actions/checkout@v2

- name: Selected Gemfile
run: echo $BUNDLE_GEMFILE

- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true

- name: Run tests
run: bundle exec rspec --format documentation

ruby-version: 3.0.0

test_bundler_v1:
runs-on: ubuntu-20.04
- gemfile: rails-5.1
ruby-version: 3.0.0

strategy:
fail-fast: false

matrix:
ruby-version:
- 2.6.6
- 2.5.8
- 2.4.10
- 2.3.8
- 2.2.10
gemfile:
- rails-4.2
- rails-4.1
- rails-4.0
- rails-3.2

exclude:
- gemfile: rails-4.1
ruby-version: 2.6.6
- gemfile: rails-4.1
ruby-version: 2.5.8
- gemfile: rails-4.1
ruby-version: 2.4.10

- gemfile: rails-4.0
ruby-version: 2.6.6
- gemfile: rails-4.0
ruby-version: 2.5.8
- gemfile: rails-4.0
ruby-version: 2.4.10
- gemfile: rails-5.0
ruby-version: 3.0.0

env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
Expand All @@ -140,7 +60,6 @@ jobs:
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
bundler: 1.17
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Collect logs directly from your Ruby on Rails projects. To start logging Ruby pr
- Performant, light weight, with a thoughtful design.

### Supported language versions
- Ruby 2.7.0 or newer
- Rails 6.1.4.2 or newer
- Ruby 2.5 or newer
- Rails 5.0 or newer

# Installation
Install the Logtail Ruby on Rails client library, run the following command:
Expand Down
8 changes: 0 additions & 8 deletions gemfiles/rails-3.0.gemfile

This file was deleted.

8 changes: 0 additions & 8 deletions gemfiles/rails-3.1.gemfile

This file was deleted.

8 changes: 0 additions & 8 deletions gemfiles/rails-3.2.gemfile

This file was deleted.

12 changes: 0 additions & 12 deletions gemfiles/rails-4.0.gemfile

This file was deleted.

12 changes: 0 additions & 12 deletions gemfiles/rails-4.1.gemfile

This file was deleted.

12 changes: 0 additions & 12 deletions gemfiles/rails-4.2.gemfile

This file was deleted.

1 change: 0 additions & 1 deletion lib/logtail-rails/overrides.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# The order is relevant
require "logtail-rails/overrides/active_support_3_tagged_logging"
require "logtail-rails/overrides/active_support_tagged_logging"
require "logtail-rails/overrides/active_support_buffered_logger"
require "logtail-rails/overrides/lograge"
Expand Down
111 changes: 0 additions & 111 deletions lib/logtail-rails/overrides/active_support_3_tagged_logging.rb

This file was deleted.

11 changes: 6 additions & 5 deletions lib/logtail-rails/overrides/active_support_tagged_logging.rb
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# This is an override instead of an integration because without this Logtail would not
# work properly if ActiveSupport::TaggedLogging is used.
#
# This is called after 'active_support_3_tagged_logging' where the constant is loaded and
# replaced. I want to make sure we don't attempt to load it again undoing the patches
# applied there.
if defined?(ActiveSupport::TaggedLogging)

begin
require "active_support/tagged_logging"

module Logtail
module Overrides
# @private
Expand Down Expand Up @@ -63,4 +62,6 @@ def add(severity, message = nil, progname = nil, &block)
end
end
end

rescue Exception
end
2 changes: 1 addition & 1 deletion lib/logtail-rails/version.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Logtail
module Integrations
module Rails
VERSION = "0.1.8"
VERSION = "0.2.0"
end
end
end
10 changes: 5 additions & 5 deletions logtail-rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ require "logtail-rails/version"
Gem::Specification.new do |spec|
spec.name = "logtail-rails"
spec.version = Logtail::Integrations::Rails::VERSION
spec.authors = ["Logtail"]
spec.authors = ["Better Stack"]
spec.email = ["hello@betterstack.com"]

spec.summary = %q{Better Stack Rails integration}
spec.homepage = "https://github.com/logtail/logtail-ruby-rails"
spec.license = "ISC"

spec.required_ruby_version = '>= 2.2.0'
spec.required_ruby_version = '>= 2.5.0'

spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = "https://github.com/logtail/logtail-ruby-rails"
Expand All @@ -30,9 +30,9 @@ Gem::Specification.new do |spec|
spec.add_runtime_dependency "logtail", "~> 0.1"
spec.add_runtime_dependency "logtail-rack", "~> 0.1"

spec.add_runtime_dependency 'activerecord', '>= 3.0.0'
spec.add_runtime_dependency 'railties', '>= 3.0.0'
spec.add_runtime_dependency 'actionpack', '>= 3.0.0'
spec.add_runtime_dependency 'activerecord', '>= 5.0.0'
spec.add_runtime_dependency 'railties', '>= 5.0.0'
spec.add_runtime_dependency 'actionpack', '>= 5.0.0'

spec.add_development_dependency "bundler", ">= 0.0"

Expand Down

0 comments on commit ad33def

Please sign in to comment.