Skip to content

Commit

Permalink
voxpupuli-rubocop: Switch to 2.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed Oct 21, 2024
1 parent 3f187ba commit 7050aab
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 7 deletions.
19 changes: 18 additions & 1 deletion .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2023-05-08 20:48:34 UTC using RuboCop version 1.50.2.
# on 2024-10-21 08:47:36 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
Expand All @@ -14,6 +14,7 @@ Lint/EmptyBlock:
- 'spec/puppet_blacksmith/git_spec.rb'

# Offense count: 1
# Configuration parameters: AllowedParentClasses.
Lint/MissingSuper:
Exclude:
- 'lib/puppet_blacksmith/rake_tasks.rb'
Expand All @@ -26,7 +27,17 @@ Lint/RaiseException:
Exclude:
- 'lib/puppet_blacksmith/version_helper.rb'

# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: strict, consistent
Lint/SymbolConversion:
Exclude:
- 'lib/puppet_blacksmith/rake_tasks.rb'

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: AutoCorrect.
Lint/UselessAssignment:
Exclude:
- 'spec/puppet_blacksmith/forge_spec.rb'
Expand Down Expand Up @@ -62,6 +73,12 @@ Performance/Detect:
Exclude:
- 'lib/puppet_blacksmith/forge.rb'

# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
Performance/StringIdentifierArgument:
Exclude:
- 'lib/puppet_blacksmith/modulefile.rb'

# Offense count: 8
# Configuration parameters: Prefixes, AllowedPatterns.
# Prefixes: when, with, without
Expand Down
4 changes: 2 additions & 2 deletions lib/puppet_blacksmith/version_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def satisfies(other_version)
end

%i[major minor patch].each do |term|
define_method("#{term}!") { increment!(term) }
define_method(:"#{term}!") { increment!(term) }
end

def full!
Expand All @@ -118,7 +118,7 @@ def full!
def increment!(term)
new_version = clone

new_version.send("#{term}=", send(term) + 1) if term != :patch || @pre.nil?
new_version.send(:"#{term}=", send(term) + 1) if term != :patch || @pre.nil?

new_version.minor = 0 if term == :major
new_version.patch = 0 if %i[major minor].include?(term)
Expand Down
2 changes: 1 addition & 1 deletion puppet-blacksmith.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Gem::Specification.new do |s|
s.add_development_dependency 'puppet', '>= 7.24', '< 9'
s.add_development_dependency 'rake', '~> 13.0', '>= 13.0.6'
s.add_development_dependency 'rspec', '~> 3.12'
s.add_development_dependency 'voxpupuli-rubocop', '~> 2.0'
s.add_development_dependency 'voxpupuli-rubocop', '~> 2.8.0'
s.add_development_dependency 'webmock', '>= 2.0', '< 4'

s.files = Dir.glob('lib/**/*') + %w[LICENSE]
Expand Down
2 changes: 1 addition & 1 deletion spec/puppet_blacksmith/forge_live_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require 'fileutils'

# Run tests against the real Forge staging API
describe 'Blacksmith::Forge', live: true do
describe 'Blacksmith::Forge', :live do
include_context 'forge'
let(:username) { nil }

Expand Down
4 changes: 2 additions & 2 deletions spec/puppet_blacksmith/git_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@

context 'when git succeeds' do
before do
allow(Open3).to receive(:popen3) \
.with('git', '--git-dir', File.join(path, '.git'), '--work-tree', path, *cmd) \
allow(Open3).to receive(:popen3)
.with('git', '--git-dir', File.join(path, '.git'), '--work-tree', path, *cmd)
.and_yield(nil, double(read: stdout), double(read: stderr), wait_thr)
expect { subject.send(:exec_git, cmd) }.not_to raise_error
end
Expand Down

0 comments on commit 7050aab

Please sign in to comment.