Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(CAT-2113) Adjusting minimum ruby version required #481

Closed
wants to merge 2 commits into from
Closed
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
53 changes: 14 additions & 39 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2024-06-28 12:36:37 UTC using RuboCop version 1.64.1.
# on 2025-02-25 12:00:05 UTC using RuboCop version 1.64.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 1
# Configuration parameters: Severity, Include.
# Include: **/*.gemspec
Gemspec/RequiredRubyVersion:
Exclude:
- 'puppetlabs_spec_helper.gemspec'
Comment on lines +9 to +14
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd consider this poor practice. You are telling RuboCop to assume you can use Ruby 2.7 features while being Ruby 2.6 compatible. It's just a matter of time before that breaks IMHO.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes. I think the resource-api needs to drop Ruby 2.6 support

Copy link
Contributor

Choose a reason for hiding this comment

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

I think you misunderstood the issue. IIRC the real issue is that JRuby used in Puppetserver 7 is officially only Ruby 2.6 compatible so I'm guessing some of Perforce's internal CI jobs run with Ruby 2.6.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes. But that's EoL in three days: https://www.puppet.com/products/puppet-enterprise/support-lifecycle. So why does resource-api now need to use latest puppetlabs_spec_helper + Ruby 2.6?

Copy link
Contributor

Choose a reason for hiding this comment

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

That's something I can't answer.


# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: Width, AllowedPatterns.
Expand All @@ -18,13 +25,6 @@ Lint/MixedRegexpCaptureTypes:
Exclude:
- 'Gemfile'

# Offense count: 7
# Configuration parameters: Prefixes, AllowedPatterns.
# Prefixes: when, with, without
RSpec/ContextWording:
Exclude:
- 'spec/unit/puppetlabs_spec_helper/tasks/fixtures_spec.rb'

# Offense count: 1
# Configuration parameters: IgnoredMetadata.
RSpec/DescribeClass:
Expand All @@ -36,55 +36,31 @@ RSpec/DescribeClass:
- '**/spec/views/**/*'
- 'spec/acceptance/smoke_spec.rb'

# Offense count: 12
# Offense count: 7
# Configuration parameters: CountAsOne.
RSpec/ExampleLength:
Max: 13

# Offense count: 1
# Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly.
# Include: **/*_spec*rb*, **/spec/**/*
RSpec/FilePath:
Exclude:
- 'spec/unit/puppetlabs_spec_helper/tasks/fixtures_spec.rb'

# Offense count: 8
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: implicit, each, example
RSpec/HookArgument:
Exclude:
- 'spec/unit/puppetlabs_spec_helper/tasks/fixtures_spec.rb'

# Offense count: 7
# Offense count: 5
# Configuration parameters: .
# SupportedStyles: have_received, receive
RSpec/MessageSpies:
EnforcedStyle: receive

# Offense count: 8
# Offense count: 5
RSpec/MultipleExpectations:
Max: 3

# Offense count: 14
# Offense count: 7
# Configuration parameters: AllowedGroups.
RSpec/NestedGroups:
Max: 5

# Offense count: 1
# Configuration parameters: Include, CustomTransform, IgnoreMethods, IgnoreMetadata.
# Include: **/*_spec.rb
RSpec/SpecFilePathFormat:
Exclude:
- '**/spec/routing/**/*'
- 'spec/unit/puppetlabs_spec_helper/tasks/fixtures_spec.rb'

# Offense count: 7
# Offense count: 5
RSpec/StubbedMock:
Exclude:
- 'spec/unit/puppetlabs_spec_helper/puppetlabs_spec/puppet_internals_spec.rb'
- 'spec/unit/puppetlabs_spec_helper/tasks/fixture_helpers_spec.rb'
- 'spec/unit/puppetlabs_spec_helper/tasks/fixtures_spec.rb'

# Offense count: 2
Security/Eval:
Expand Down Expand Up @@ -122,11 +98,10 @@ Style/RedundantRegexpEscape:
Exclude:
- 'Gemfile'

# Offense count: 3
# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle, AllowInnerSlashes.
# SupportedStyles: slashes, percent_r, mixed
Style/RegexpLiteral:
Exclude:
- 'Gemfile'
- 'spec/unit/puppetlabs_spec_helper/tasks/fixtures_spec.rb'
2 changes: 1 addition & 1 deletion puppetlabs_spec_helper.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
spec.executables = Dir['bin/**/*'].map { |f| File.basename(f) }
spec.require_paths = ['lib']

spec.required_ruby_version = Gem::Requirement.new('>= 2.7')
spec.required_ruby_version = Gem::Requirement.new('>= 2.6')

spec.add_runtime_dependency 'mocha', '>= 1.0', '< 3'
spec.add_runtime_dependency 'pathspec', '>= 0.2', '< 3'
Expand Down