diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3bbbc37c..89aa07d7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,13 +11,11 @@ on: jobs: test: - # change to ubuntu-latest once Ruby 2.5 and JRuby 9.2 is dropped - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest strategy: fail-fast: false matrix: - ruby: [2.3, 2.4, 2.5, 2.6, 2.7, '3.0', 3.1, 3.2, jruby-9.1, jruby-9.2, jruby-9.3, jruby-9.4] - env: [NEW_RAILS, OLD_RAILS] + ruby: [2.7, '3.0', 3.1, 3.2, 3.3, 3.4, jruby-9.4, jruby-10.0] steps: - name: Setup @@ -27,12 +25,8 @@ jobs: - uses: actions/checkout@v2 - - name: Environment - run: echo "${{ matrix.env }}=1" >> $GITHUB_ENV - - name: Install run: | - echo NEW_RAIS=$NEW_RAILS OLD_RAILS=$OLD_RAILS bundle install --without docs - name: Test @@ -42,10 +36,10 @@ jobs: runs-on: ubuntu-latest steps: - - name: Set up Ruby 3.2 + - name: Set up Ruby 3.4 uses: ruby/setup-ruby@v1 with: - ruby-version: 3.2 + ruby-version: 3.4 - uses: actions/checkout@v2 diff --git a/.rubocop.yml b/.rubocop.yml index ccb956f0..be3a6ff9 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -2,7 +2,7 @@ inherit_from: .rubocop_todo.yml AllCops: NewCops: enable - TargetRubyVersion: 2.3 + TargetRubyVersion: 2.7 Exclude: - 'tasks/release/**/*' diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f56129d..0b281898 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ Unreleased Changes ------------------ +* Feature - Drop Ruby runtime support for 2.5 and 2.6. + 2.13.4 (2025-05-21) ------------------ diff --git a/Gemfile b/Gemfile index d8e2a412..0ace478d 100644 --- a/Gemfile +++ b/Gemfile @@ -9,16 +9,12 @@ gem 'rake', require: false group :test do gem 'cucumber' gem 'rspec' - gem 'simplecov', require: false - gem 'rexml' if RUBY_VERSION >= '3.0' + gem 'activemodel' - if ENV['NEW_RAILS'] - gem 'activemodel' - else - gem 'activemodel', '< 5.0' - end + gem 'mutex_m' if RUBY_VERSION >= '3.4' + gem 'rexml' if RUBY_VERSION >= '3.0' end group :docs do diff --git a/aws-record.gemspec b/aws-record.gemspec index d17110f8..c34cbb84 100644 --- a/aws-record.gemspec +++ b/aws-record.gemspec @@ -16,5 +16,5 @@ Gem::Specification.new do |spec| # Require 1.85.0 for user_agent_frameworks config spec.add_dependency 'aws-sdk-dynamodb', '~> 1', '>= 1.85.0' - spec.required_ruby_version = '>= 2.3' + spec.required_ruby_version = '>= 2.7' end diff --git a/features/transactions/step_definitions.rb b/features/transactions/step_definitions.rb index f91333f3..ca38d34a 100644 --- a/features/transactions/step_definitions.rb +++ b/features/transactions/step_definitions.rb @@ -29,11 +29,9 @@ end When('we run the following code:') do |code| - begin - @arbitrary_code_ret = eval(code) - rescue StandardError => e - @arbitrary_code_exception = e - end + @arbitrary_code_ret = eval(code) +rescue StandardError => e + @arbitrary_code_exception = e end Then('we expect the code to raise an {string} exception') do |exception_class| diff --git a/lib/aws-record/record/batch_read.rb b/lib/aws-record/record/batch_read.rb index 8d7177c3..7aa544d3 100644 --- a/lib/aws-record/record/batch_read.rb +++ b/lib/aws-record/record/batch_read.rb @@ -38,7 +38,7 @@ def find(klass, key = {}) # @return [Array] an array of unordered new items def execute! operation_keys = unprocessed_keys[0..BATCH_GET_ITEM_LIMIT - 1] - @unprocessed_keys = unprocessed_keys[BATCH_GET_ITEM_LIMIT..-1] || [] + @unprocessed_keys = unprocessed_keys[BATCH_GET_ITEM_LIMIT..] || [] operations = build_operations(operation_keys) result = @client.batch_get_item(request_items: operations)