Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 2 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
rubocop:
name: Rubocop
uses: theforeman/actions/.github/workflows/rubocop.yml@v0
with:
ruby: 3.0

test:
name: Tests
Expand Down
4 changes: 2 additions & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require:
- rubocop-rake

AllCops:
TargetRubyVersion: '2.7'
TargetRubyVersion: '3.0'

# Don't enforce documentation
Style/Documentation:
Expand Down Expand Up @@ -114,4 +114,4 @@ Layout/LineLength:
Max: 197

Style/SlicingWithRange:
Enabled: false
Enabled: false
2 changes: 1 addition & 1 deletion lib/smart_proxy_dynflow/api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Api < ::Sinatra::Base

include ::Sinatra::Authorization::Helpers

TASK_UPDATE_REGEXP_PATH = %r{/tasks/(\S+)/(update|done)}.freeze
TASK_UPDATE_REGEXP_PATH = %r{/tasks/(\S+)/(update|done)}
Copy link
Member

Choose a reason for hiding this comment

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

Just to make sure: is this due to Ruby 3.0 Regex objects should be frozen by default or it triggered an error?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Apparently it is an unnecessary noop

lib/smart_proxy_dynflow/api.rb:16:33: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      TASK_UPDATE_REGEXP_PATH = %r{/tasks/(\S+)/(update|done)}.freeze
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


before do
if match = request.path_info.match(TASK_UPDATE_REGEXP_PATH)
Expand Down
4 changes: 2 additions & 2 deletions smart_proxy_dynflow.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ Gem::Specification.new do |gem|
gem.require_paths = ["lib"]
gem.license = 'GPL-3.0-only'

gem.required_ruby_version = '>= 2.7', '< 4'
gem.required_ruby_version = '>= 3.0'

gem.add_runtime_dependency('dynflow', "~> 1.6")
gem.add_runtime_dependency('dynflow', '>= 1.6', '< 3.0')
gem.add_runtime_dependency('rest-client', '~> 2.0')
gem.add_runtime_dependency('sqlite3', '~> 1.0')

Expand Down