From 419bb8e992aa81abb595f93db7622bf560ac4a17 Mon Sep 17 00:00:00 2001 From: ellnix <103502144+ellnix@users.noreply.github.com> Date: Wed, 17 Jan 2024 12:39:39 +0100 Subject: [PATCH] Drop support for ruby 2 and add ruby 3.2 to CI --- .github/workflows/pre-release-tests.yml | 2 +- .github/workflows/tests.yml | 2 +- .rubocop.yml | 2 +- README.md | 2 +- bors.toml | 3 +-- lib/meilisearch/utils.rb | 2 +- meilisearch.gemspec | 3 ++- spec/spec_helper.rb | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pre-release-tests.yml b/.github/workflows/pre-release-tests.yml index a9fc4fae..eb63df45 100644 --- a/.github/workflows/pre-release-tests.yml +++ b/.github/workflows/pre-release-tests.yml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - ruby-version: ['2.6', '2.7', '3.0', '3.1'] + ruby-version: ['3.0', '3.1', '3.2'] name: integration-tests-against-rc (ruby ${{ matrix.ruby-version }}) runs-on: ubuntu-22.04 steps: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d4a987f4..0a5072e7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - ruby-version: ['2.6', '2.7', '3.0', '3.1'] + ruby-version: ['3.0', '3.1', '3.2'] name: integration-tests (ruby ${{ matrix.ruby-version }}) runs-on: ubuntu-22.04 steps: diff --git a/.rubocop.yml b/.rubocop.yml index ec86888e..1005508f 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -13,7 +13,7 @@ inherit_from: .rubocop_todo.yml AllCops: NewCops: enable - TargetRubyVersion: 2.6 + TargetRubyVersion: 3.0 Style/SymbolArray: EnforcedStyle: brackets diff --git a/README.md b/README.md index 742ef0ca..175b9467 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ Say goodbye to server deployment and manual updates with [Meilisearch Cloud](htt ## 🔧 Installation -This package requires Ruby version 2.6.0 or later. +This package requires Ruby version 3.0.0 or later. With `gem` in command line: ```bash diff --git a/bors.toml b/bors.toml index 2b2db75a..fa95bb21 100644 --- a/bors.toml +++ b/bors.toml @@ -1,8 +1,7 @@ status = [ - 'integration-tests (ruby 2.6)', - 'integration-tests (ruby 2.7)', 'integration-tests (ruby 3.0)', 'integration-tests (ruby 3.1)', + 'integration-tests (ruby 3.2)', 'linter-check' ] # 1 hour timeout diff --git a/lib/meilisearch/utils.rb b/lib/meilisearch/utils.rb index cc045a2c..83adfac0 100644 --- a/lib/meilisearch/utils.rb +++ b/lib/meilisearch/utils.rb @@ -2,7 +2,7 @@ module MeiliSearch module Utils - SNAKE_CASE = /[^a-zA-Z0-9]+(.)/.freeze + SNAKE_CASE = /[^a-zA-Z0-9]+(.)/ def self.transform_attributes(body) case body diff --git a/meilisearch.gemspec b/meilisearch.gemspec index 54aa1bcc..41b1c34c 100644 --- a/meilisearch.gemspec +++ b/meilisearch.gemspec @@ -14,6 +14,7 @@ Gem::Specification.new do |s| s.files = Dir['{lib}/**/*', 'LICENSE', 'README.md'] - s.required_ruby_version = '>= 2.6.0' + s.required_ruby_version = '>= 3.0.0' s.add_dependency 'httparty', '>= 0.17.1', '< 0.22.0' + s.metadata['rubygems_mfa_required'] = 'true' end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index f3c7eb07..0df0b569 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -57,7 +57,7 @@ 'totalHits' ].freeze -Dir["#{Dir.pwd}/spec/support/**/*.rb"].sort.each { |file| require file } +Dir["#{Dir.pwd}/spec/support/**/*.rb"].each { |file| require file } RSpec.configure do |config| # rspec-expectations config goes here. You can use an alternate