Skip to content

Commit

Permalink
BREAKING CHANGE: ruby 2.7 is no longer supported. Please upgrade to r…
Browse files Browse the repository at this point in the history
…uby 3.0 or higher.
  • Loading branch information
kamranf committed Apr 30, 2024
1 parent 36c6282 commit d111a33
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
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.0
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.1
ruby-version: 3.0
- 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.0 or higher will be required to use this gem after datadog_backup@v3" if RUBY_VERSION < '3.0'
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.4.10 2.5.9 2.6.8 2.7].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.0.4 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

0 comments on commit d111a33

Please sign in to comment.