diff --git a/.github/workflows/gh-release.yml b/.github/workflows/gh-release.yml index 815fc86..ea9ef1a 100644 --- a/.github/workflows/gh-release.yml +++ b/.github/workflows/gh-release.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v6 - name: Setup git run: | git config user.email "pusher-ci@pusher.com" @@ -24,12 +24,12 @@ jobs: export TAG=$(head -1 CHANGELOG.tmp | cut -d' ' -f2) echo "TAG=$TAG" >> $GITHUB_ENV - name: Create Release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3 with: tag_name: ${{ env.TAG }} - release_name: ${{ env.TAG }} + name: ${{ env.TAG }} body_path: CHANGELOG.tmp draft: false prerelease: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e8b9a99..75a9c87 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v6 - name: Publish gem uses: dawidd6/action-publish-gem@v1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 501fe2f..e7fec21 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,7 +43,7 @@ jobs: export NEW_VERSION=$(semver bump ${{ env.RELEASE }} $CURRENT) echo "VERSION=$NEW_VERSION" >> $GITHUB_ENV - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v6 - name: Setup git run: | git config user.email "pusher-ci@pusher.com" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8667605..65aa7d6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,14 +12,14 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby-version: ['2.6', '2.7', '3.0'] + ruby-version: ['3.3', '3.4'] env: PUSHER_INSTANCE_ID: 1b880590-6301-4bb5-b34f-45db1c5f5644 PUSHER_SECRET_KEY: abc steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: @@ -29,3 +29,5 @@ jobs: run: bundle exec rake - name: Run rubocop run: bundle exec rubocop + - name: Upload coverage to Codecov + uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6 diff --git a/.rubocop.yml b/.rubocop.yml index 76110bc..0618a66 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -2,15 +2,18 @@ Documentation: Enabled: false AllCops: - TargetRubyVersion: 2.4.0 + TargetRubyVersion: 3.3 + NewCops: disable -Metrics/LineLength: - Enabled: - Max: 80 +Layout/LineLength: + Max: 120 Style/GuardClause: Enabled: false +Style/IfUnlessModifier: + Enabled: false + Metrics/MethodLength: Enabled: false diff --git a/Gemfile.lock b/Gemfile.lock index 283fa72..20c410b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -10,9 +10,11 @@ GEM specs: addressable (2.9.0) public_suffix (>= 2.0.2, < 8.0) - ast (2.4.2) + ast (2.4.3) base64 (0.3.0) - byebug (11.1.3) + bigdecimal (3.1.9) + byebug (13.0.0) + reline (>= 0.6.0) codecov (0.2.12) json simplecov @@ -23,7 +25,8 @@ GEM term-ansicolor (~> 1.3) thor (>= 0.19.4, < 2.0) tins (~> 1.6) - crack (0.4.5) + crack (1.0.1) + bigdecimal rexml diff-lcs (1.4.4) docile (1.3.5) @@ -34,34 +37,43 @@ GEM http-accept (1.7.0) http-cookie (1.0.3) domain_name (~> 0.5) + io-console (0.8.2) json (2.5.1) jwt (3.2.0) base64 - method_source (1.0.0) + language_server-protocol (3.17.0.5) + lint_roller (1.1.0) + method_source (1.1.0) mime-types (3.3.1) mime-types-data (~> 3.2015) mime-types-data (3.2021.0225) netrc (0.11.0) - parallel (1.20.1) - parser (3.0.0.0) + parallel (2.1.0) + parser (3.3.11.1) ast (~> 2.4.1) - pry (0.13.1) + racc + prism (1.9.0) + pry (0.16.0) coderay (~> 1.1) method_source (~> 1.0) - pry-byebug (3.9.0) - byebug (~> 11.0) - pry (~> 0.13.0) + reline (>= 0.6.0) + pry-byebug (3.12.0) + byebug (~> 13.0) + pry (>= 0.13, < 0.17) public_suffix (4.0.7) - rainbow (3.0.0) + racc (1.8.1) + rainbow (3.1.1) rake (13.0.3) rb-readline (0.5.5) - regexp_parser (2.1.1) + regexp_parser (2.12.0) + reline (0.6.3) + io-console (~> 0.5) rest-client (2.1.0) http-accept (>= 1.7.0, < 2.0) http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 4.0) netrc (~> 0.8) - rexml (3.2.4) + rexml (3.4.4) rspec (3.10.0) rspec-core (~> 3.10.0) rspec-expectations (~> 3.10.0) @@ -75,18 +87,21 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.10.0) rspec-support (3.10.2) - rubocop (1.11.0) - parallel (~> 1.10) - parser (>= 3.0.0.0) + rubocop (1.86.2) + json (~> 2.3) + language_server-protocol (~> 3.17.0.2) + lint_roller (~> 1.1.0) + parallel (>= 1.10) + parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 1.8, < 3.0) - rexml - rubocop-ast (>= 1.2.0, < 2.0) + regexp_parser (>= 2.9.3, < 3.0) + rubocop-ast (>= 1.49.0, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.4.1) - parser (>= 2.7.1.5) - ruby-progressbar (1.11.0) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.49.1) + parser (>= 3.3.7.2) + prism (~> 1.7) + ruby-progressbar (1.13.0) simplecov (0.16.1) docile (~> 1.1) json (>= 1.8, < 3) @@ -101,7 +116,9 @@ GEM unf (0.1.4) unf_ext unf_ext (0.0.7.7) - unicode-display_width (2.0.0) + unicode-display_width (3.2.0) + unicode-emoji (~> 4.1) + unicode-emoji (4.2.0) vcr (3.0.3) webmock (3.12.0) addressable (>= 2.3.6) @@ -126,4 +143,4 @@ DEPENDENCIES webmock (~> 3.0, >= 3.0.1) BUNDLED WITH - 2.7.2 + 2.4.22 diff --git a/pusher-push-notifications.gemspec b/pusher-push-notifications.gemspec index 1f29936..04781fb 100644 --- a/pusher-push-notifications.gemspec +++ b/pusher-push-notifications.gemspec @@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'pusher/push_notifications/version' Gem::Specification.new do |spec| - spec.required_ruby_version = '>= 2.4.2' + spec.required_ruby_version = '>= 3.3' spec.name = 'pusher-push-notifications' spec.version = Pusher::PushNotifications::VERSION spec.authors = ['Lucas Medeiros', 'Pusher'] diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index fa24f20..d31a607 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -17,11 +17,6 @@ require 'simplecov' SimpleCov.start -if ENV['CI'] == 'true' - require 'codecov' - SimpleCov.formatter = SimpleCov::Formatter::Codecov -end - VCR.configure do |config| config.cassette_library_dir = 'spec/cassettes' config.hook_into :webmock