diff --git a/.rubocop.yml b/.rubocop.yml index 64c0c3e..520d912 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -2,7 +2,7 @@ plugins: rubocop-rspec AllCops: NewCops: enable - TargetRubyVersion: 2.7 + TargetRubyVersion: 3.0 Style/Documentation: Enabled: false diff --git a/spec/typesense/collections_spec.rb b/spec/typesense/collections_spec.rb index 38db69d..031fddd 100644 --- a/spec/typesense/collections_spec.rb +++ b/spec/typesense/collections_spec.rb @@ -36,7 +36,7 @@ describe '#create' do it 'creates a collection and returns it' do # since num_documents is a read-only attribute - schema_for_creation = company_schema.reject { |key, _| key == 'num_documents' } + schema_for_creation = company_schema.except('num_documents') stub_request(:post, Typesense::ApiCall.new(typesense.configuration).send(:uri_for, '/collections', typesense.configuration.nodes[0])) .with(body: schema_for_creation, diff --git a/typesense.gemspec b/typesense.gemspec index f585e92..8f99e29 100644 --- a/typesense.gemspec +++ b/typesense.gemspec @@ -15,9 +15,7 @@ Gem::Specification.new do |spec| spec.homepage = 'https://typesense.org' spec.license = 'Apache-2.0' - # rubocop:disable Gemspec/RequiredRubyVersion, Lint/RedundantCopDisableDirective - spec.required_ruby_version = '>= 2.7' - # rubocop:enable Gemspec/RequiredRubyVersion, Lint/RedundantCopDisableDirective + spec.required_ruby_version = '>= 3.0' spec.files = `git ls-files -z`.split("\x0").reject do |f| f.match(%r{^(test|spec|features)/})