Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Deprecate Ruby 3.0 and Drop support for Ruby 2.7 #163

Merged
merged 1 commit into from
Apr 30, 2024
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 .github/workflows/rspec_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest]
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
ruby: [2.7, '3.0', '3.1']
ruby: ['3.0', '3.1', '3.2']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Additional features may be built out over time.
v3 is a backwards incompatible change.

- [ ] DATADOG_API_KEY and DATADOG_APP_KEY are no longer the environment variables used to authenticate to Datadog. Instead, set the environment variables DD_API_KEY and DD_APP_KEY.
- [ ] ruby 2.6 is no longer supported. Please upgrade to ruby 2.7 or higher.
- [ ] ruby 2.7 is no longer supported. Please upgrade to ruby 3.0 or higher.
- [ ] The options `--ssh` and `--ssshh` are no longer supported. Instead, please use `--quiet` to supress logging. `--debug` remains supported.
- [ ] The environment variable `DATADOG_HOST` is no longer supported. Instead, please use `DD_SITE_URL`.

Expand Down
2 changes: 1 addition & 1 deletion datadog_backup.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
spec.require_paths = ['lib']

spec.required_ruby_version = '>= 2.7'
spec.required_ruby_version = '>= 3.0'

spec.add_dependency 'amazing_print'
spec.add_dependency 'concurrent-ruby'
Expand Down
8 changes: 4 additions & 4 deletions example/.github/workflows/backup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Ruby 2.7.1
- uses: actions/checkout@v4
- name: Set up Ruby 3.1
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.1
ruby-version: 3.1
- name: perform backup
env:
DD_API_KEY: ${{ secrets.DD_API_KEY }}
Expand All @@ -24,7 +24,7 @@ jobs:
bundle install --jobs 4 --retry 3
bundle exec datadog_backup backup
- name: commit changes
uses: stefanzweifel/git-auto-commit-action@v4
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Changes as of run: ${{ github.run_id }}"
file_pattern: backup/
Expand Down
2 changes: 1 addition & 1 deletion lib/datadog_backup/deprecations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module DatadogBackup
# Notify the user if they are using deprecated features.
module Deprecations
def self.check
LOGGER.warn "ruby-#{RUBY_VERSION} is deprecated. Ruby 2.7 or higher will be required to use this gem after datadog_backup@v3" if RUBY_VERSION < '2.7'
LOGGER.warn "ruby-#{RUBY_VERSION} is deprecated. Ruby 3.1 or higher will be required to use this gem after datadog_backup@v3" if RUBY_VERSION < '3.1'
end
end
end
4 changes: 2 additions & 2 deletions spec/datadog_backup/deprecations_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
allow(logger).to receive(:warn)
end

%w[2.4.10 2.5.9 2.6.8].each do |ruby_version|
%w[2.5.9 2.6.8 2.7 3.0.4].each do |ruby_version|
describe "#check#{ruby_version}" do
it 'does warn' do
stub_const('RUBY_VERSION', ruby_version)
Expand All @@ -22,7 +22,7 @@
end
end

%w[2.7.4 3.0.4 3.1.2 3.2.0-preview1].each do |ruby_version|
%w[3.1.2 3.2.0-preview1].each do |ruby_version|
describe "#check#{ruby_version}" do
it 'does not warn' do
stub_const('RUBY_VERSION', ruby_version)
Expand Down
Loading