From 55d1d9946dc69abcb88d94f5f08778378c148520 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 18 Jan 2024 13:36:37 +0000 Subject: [PATCH] Update voxpupuli-rubocop requirement from ~> 2.0.0 to ~> 2.4.0 Updates the requirements on [voxpupuli-rubocop](https://github.com/voxpupuli/voxpupuli-rubocop) to permit the latest version. - [Changelog](https://github.com/voxpupuli/voxpupuli-rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/voxpupuli/voxpupuli-rubocop/compare/v2.0.0...v2.4.0) --- updated-dependencies: - dependency-name: voxpupuli-rubocop dependency-type: direct:development ... Signed-off-by: dependabot[bot] --- .rubocop_todo.yml | 15 ++++++++++++++- puppet-syntax.gemspec | 2 +- spec/puppet-syntax/hiera_spec.rb | 8 ++++---- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index f705c6d..ac8d92a 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2023-07-07 07:29:59 UTC using RuboCop version 1.50.2. +# on 2024-02-07 19:46:27 UTC using RuboCop version 1.60.2. # 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 @@ -13,6 +13,7 @@ Lint/DuplicateBranch: - 'lib/puppet-syntax/templates.rb' # Offense count: 1 +# Configuration parameters: AllowedParentClasses. Lint/MissingSuper: Exclude: - 'lib/puppet-syntax/tasks/puppet-syntax.rb' @@ -29,6 +30,7 @@ Lint/SuppressedException: - 'Rakefile' # Offense count: 1 +# This cop supports unsafe autocorrection (--autocorrect-all). Lint/UselessAssignment: Exclude: - 'lib/puppet-syntax/templates.rb' @@ -113,6 +115,17 @@ RSpec/RepeatedDescription: Exclude: - 'spec/puppet-syntax/templates_spec.rb' +# Offense count: 4 +# Configuration parameters: Include, CustomTransform, IgnoreMethods, IgnoreMetadata. +# Include: **/*_spec.rb +RSpec/SpecFilePathFormat: + Exclude: + - '**/spec/routing/**/*' + - 'spec/puppet-syntax/hiera_spec.rb' + - 'spec/puppet-syntax/manifests_spec.rb' + - 'spec/puppet-syntax/templates_spec.rb' + - 'spec/puppet-syntax_spec.rb' + # Offense count: 3 RSpec/SubjectDeclaration: Exclude: diff --git a/puppet-syntax.gemspec b/puppet-syntax.gemspec index 211d37b..dce8de0 100644 --- a/puppet-syntax.gemspec +++ b/puppet-syntax.gemspec @@ -24,5 +24,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'pry' spec.add_development_dependency 'rb-readline' - spec.add_development_dependency 'voxpupuli-rubocop', '~> 2.0.0' + spec.add_development_dependency 'voxpupuli-rubocop', '~> 2.4.0' end diff --git a/spec/puppet-syntax/hiera_spec.rb b/spec/puppet-syntax/hiera_spec.rb index ccca1b5..1c182bb 100644 --- a/spec/puppet-syntax/hiera_spec.rb +++ b/spec/puppet-syntax/hiera_spec.rb @@ -10,14 +10,14 @@ it 'returns nothing from valid YAML' do files = fixture_hiera('hiera_good.yaml') res = subject.check(files) - expect(res).to be == [] + expect(res).to eq [] end it 'returns an error from invalid YAML' do files = fixture_hiera('hiera_bad.yaml') expected = /ERROR: Failed to parse #{files[0]}:/ res = subject.check(files) - expect(res.size).to be == 1 + expect(res.size).to eq 1 expect(res.first).to match(expected) end @@ -34,7 +34,7 @@ (1..examples).each do |n| expect(res).to include(/::warning#{n}/) end - expect(res.size).to be == examples + expect(res.size).to eq examples expect(res[0]).to match('Key :typical:typo::warning1: Looks like a missing colon') expect(res[1]).to match('Key ::notsotypical::warning2: Puppet automatic lookup will not use leading \'::\'') expect(res[2]).to match('Key :noCamelCase::warning3: Not a valid Puppet variable name for automatic lookup') @@ -50,7 +50,7 @@ (1..examples).each do |n| expect(res).to include(/::warning#{n}/) end - expect(res.size).to be == examples + expect(res.size).to eq examples expect(res[0]).to match('Key acme::warning1 has unknown eyaml method unknown-method') expect(res[1]).to match('Key acme::warning2 has unterminated eyaml value') expect(res[2]).to match('Key acme::warning3 has unpadded or truncated base64 data')