Skip to content
Closed
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@ jobs:
strategy:
matrix:
ruby-version:
- 3.0
- 3.1
- 3.2
- 3.3
- 3.4
- 4.0
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | πŸ”΄ Critical

Ruby 4.0 will cause CI failures (duplicate concern).

This issue was previously flagged as critical: the ruby/setup-ruby action does not yet support Ruby 4.0, and the workflow will fail at the setup step. The commit message indicates critical issues were fixed, but Ruby 4.0 remains in both the test matrix (line 21) and style-check matrix (line 43).

Additionally, the style-check job now depends solely on Ruby 4.0; if that version fails to install, no RuboCop checks will run at all.

Recommended fixes:

  • Remove 4.0 from both matrices, or
  • Replace with ruby-head for forward-compatibility testing, or
  • Restore a stable Ruby version (e.g., 3.4) to the style-check matrix as a fallback

Also applies to: 43-43

πŸ€– Prompt for AI Agents
In @.github/workflows/ruby.yml at line 21, The CI workflow references Ruby
version "4.0" in the test matrix and the style-check matrix which causes setup
failures because ruby/setup-ruby doesn't support 4.0 yet; update the matrices
used by the jobs that call the ruby/setup-ruby action (the test matrix and the
style-check matrix) to remove "4.0" or replace it with "ruby-head" for
forward-compatibility, or restore a stable version such as "3.4" for the
style-check matrix so RuboCop still runs; ensure both occurrences are updated
consistently so the style-check job does not depend solely on an unsupported 4.0
entry.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With latest release it should support it. Could you please double-check?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧩 Analysis chain

🌐 Web query:

ruby/setup-ruby action Ruby 4.0 support 2026

πŸ’‘ Result:

Short answer: As of Jan 14, 2026, ruby/setup-ruby does not list Ruby 4.0 as a supported release β€” its README shows supported MRI versions up through 3.5 (and ruby-head/preview builds). Ruby 4.0 was released Dec 25, 2025. [1][2]

What that means for you:

  • You can test against Ruby 4.0 by using ruby-head (or previews) in ruby/setup-ruby, but an official prebuilt Ruby 4.0 release is not listed in the action's supported-versions table yet. [1][2]

Sources:

  • ruby/setup-ruby README (supported versions list). [1]
  • Ruby 4.0.0 release announcement (Dec 25, 2025). [2]

@alxgsv, I've checked the latest information:

Ruby 4.0 status: Ruby 4.0.0 was released on December 25, 2025.[2]

ruby/setup-ruby support: As of today (January 14, 2026), the ruby/setup-ruby action's documentation lists supported MRI versions up to 3.5, but 4.0 is not yet included in the official supported versions table.[1][2]

What this means for your CI:

  • Using ruby-version: 4.0 directly in the matrix will likely fail during the setup step because prebuilt binaries aren't available through the action yet.

Recommended solutions:

  1. Use ruby-head for forward-compatibility testing:

    ruby-version:
      - 3.3
      - 3.4
      - ruby-head  # Tests against latest Ruby (including 4.0)
  2. Or wait for the ruby/setup-ruby maintainers to add official 4.0 support and remove 4.0 from the matrices temporarily.

  3. Ensure style-check doesn't depend solely on an unsupported version – consider keeping 3.4 in the style-check matrix so RuboCop runs reliably.

Would you like to update the workflow to use ruby-head, or would you prefer to wait for official 4.0 support?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧩 Analysis chain

🌐 Web query:

ruby/setup-ruby GitHub marketplace Ruby 4.0 support January 2026

πŸ’‘ Result:

Short answer: Yes β€” ruby/setup-ruby added Ruby 4.0 support in January 2026 (tests for 4.0 in v1.280.0 and ruby-4.0.1 added in v1.282.0). [1][2]

Sources:

  • Dependabot PR changelog showing v1.280.0 (tests Ruby 4.0 on Windows). [1]
  • Dependabot PR changelog showing v1.282.0 (adds ruby-4.0.1). [2]

@alxgsv, you're absolutely rightβ€”thank you for the correction! πŸ™

I've verified that ruby/setup-ruby now officially supports Ruby 4.0 (added in v1.280.0) and Ruby 4.0.1 (added in v1.282.0) as of January 2026.[1][2] The marketplace page you linked is correct.

My previous concern was based on outdated information and is withdrawn. Your CI configuration using Ruby 4.0 in the test matrix and style-check matrix is valid and should work as expected.

Sorry for the confusion, and thank you for double-checking! βœ…


steps:
- uses: actions/checkout@v3
Expand All @@ -42,7 +40,7 @@ jobs:
strategy:
matrix:
ruby-version:
- 3.4
- 4.0
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ Gemfile.lock
.ruby-version
project_files
*.gem
.vscode/
.DS_Store
.claude/
36 changes: 30 additions & 6 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
AllCops:
NewCops: enable
TargetRubyVersion: 3.0
SuggestExtensions: false

Layout/LineLength:
Max: 120
Expand All @@ -10,24 +11,47 @@ Layout/LineLength:
Lint/IneffectiveAccessModifier:
Enabled: false

Style/HashTransformKeys:
Exclude:
- 'lib/uploadcare/entity/decorator/paginator.rb'
- 'lib/uploadcare/client/conversion/video_conversion_client.rb'
- 'lib/uploadcare/entity/file.rb'

Metrics/BlockLength:
Exclude:
- 'bin/'
- 'spec/**/*'
- 'uploadcare-ruby.gemspec'

Metrics/ClassLength:
Max: 100
Exclude:
- 'lib/uploadcare/clients/upload_client.rb' # Complex upload logic with 9 endpoints
- 'lib/uploadcare/resources/file.rb' # Pre-existing file resource with many methods
- 'lib/uploadcare/uploader.rb' # Uploader module with multiple upload strategies

Metrics/ModuleLength:
Max: 100
Exclude:
- 'spec/**/*'
- 'lib/uploadcare/uploader.rb' # Uploader module with multiple upload strategies

Metrics/MethodLength:
Max: 20
Exclude:
- 'lib/uploadcare/clients/upload_client.rb' # Parallel upload requires coordination logic
- 'lib/uploadcare/uploader.rb' # Parallel upload coordination

Metrics/AbcSize:
Max: 17
Exclude:
- 'lib/uploadcare/clients/upload_client.rb' # Upload methods have multiple parameters and validations
- 'lib/uploadcare/uploader.rb' # Parallel upload coordination

Metrics/CyclomaticComplexity:
Max: 7
Exclude:
- 'lib/uploadcare/clients/upload_client.rb' # Upload logic has multiple conditional paths
- 'lib/uploadcare/uploader.rb' # Parallel upload coordination

Metrics/PerceivedComplexity:
Max: 8
Exclude:
- 'lib/uploadcare/clients/upload_client.rb' # Parallel upload coordination is inherently complex

Style/Documentation:
Enabled: false
Expand Down
6 changes: 6 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

source 'https://rubygems.org'

# Ruby 3.4+ compatibility - these gems are no longer in stdlib
gem 'base64'
gem 'bigdecimal'
gem 'cgi' # Required for Ruby 4.0+ compatibility
gem 'mutex_m'

gem 'byebug'
gem 'rake'
gem 'rspec'
Expand Down
Loading
Loading