diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2a2be31..84367bf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,10 +11,10 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby-version: ['2.6', '2.7', '3.0', '3.1', '3.2'] + ruby-version: ['3.0', '3.1', '3.2'] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 diff --git a/.rubocop.yml b/.rubocop.yml index bde63b7..5d320cd 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -5,7 +5,7 @@ require: AllCops: NewCops: enable - TargetRubyVersion: 2.5 + TargetRubyVersion: 3.0 Layout/EmptyLinesAroundAttributeAccessor: Enabled: true diff --git a/lib/rocket_chat/request_helper.rb b/lib/rocket_chat/request_helper.rb index f280aa8..ed0722d 100644 --- a/lib/rocket_chat/request_helper.rb +++ b/lib/rocket_chat/request_helper.rb @@ -135,7 +135,7 @@ def add_form_data(request, form_data) end def reject_nils(data) - data&.reject { |_key, value| value.nil? } + data&.compact end end end diff --git a/rocketchat.gemspec b/rocketchat.gemspec index 896be91..26ca1eb 100644 --- a/rocketchat.gemspec +++ b/rocketchat.gemspec @@ -15,7 +15,7 @@ Gem::Specification.new do |spec| spec.description = 'Rocket.Chat REST API v1 for Ruby' spec.homepage = 'https://github.com/abrom/rocketchat-ruby' spec.license = 'MIT' - spec.required_ruby_version = ['>= 2.5.0', '< 3.3.0'] + spec.required_ruby_version = ['>= 3.0.0', '< 3.3.0'] # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or # delete this section to allow pushing this gem to any host.