From 7fe82ae1768d648f2ee33beff8331ce88b316114 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Fri, 17 May 2024 13:14:28 +0200 Subject: [PATCH 1/2] pin thor to 1.3.0 With thor 1.3.1 we've two failing tests: ``` Failing Scenarios: cucumber features/execute.feature:36 # Scenario: Show fail-fast default value in help cucumber features/execute.feature:44 # Scenario: Override fail-fast default value using config file ``` as a workaround to get CI green again we'r pinning to 1.3.0. I think the bug is fixed in https://github.com/rails/thor/pull/878 but not yet released. --- modulesync.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modulesync.gemspec b/modulesync.gemspec index c7aa8ca..85c1ed3 100644 --- a/modulesync.gemspec +++ b/modulesync.gemspec @@ -27,5 +27,5 @@ Gem::Specification.new do |spec| spec.add_runtime_dependency 'gitlab', '~>4.0' spec.add_runtime_dependency 'octokit', '>=4', '<9' spec.add_runtime_dependency 'puppet-blacksmith', '>= 3.0', '< 8' - spec.add_runtime_dependency 'thor' + spec.add_runtime_dependency 'thor', '1.3.0' end From 8bd8c44f48490f0ac71f401df1b77a913bc2dc2d Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Wed, 15 May 2024 18:03:31 +0200 Subject: [PATCH 2/2] update to voxpupuli-rubocop 2.7.0; adjust path to unit files rubocop demands the path changes. --- .rubocop_todo.yml | 72 +++++++++---------- modulesync.gemspec | 2 +- .../git_service/factory_spec.rb | 0 .../git_service/github_spec.rb | 0 .../git_service/gitlab_spec.rb | 0 .../git_service_spec.rb | 0 .../settings_spec.rb | 0 .../source_code_spec.rb | 0 ...modulesync_spec.rb => module_sync_spec.rb} | 0 9 files changed, 33 insertions(+), 41 deletions(-) rename spec/unit/{modulesync => module_sync}/git_service/factory_spec.rb (100%) rename spec/unit/{modulesync => module_sync}/git_service/github_spec.rb (100%) rename spec/unit/{modulesync => module_sync}/git_service/gitlab_spec.rb (100%) rename spec/unit/{modulesync => module_sync}/git_service_spec.rb (100%) rename spec/unit/{modulesync => module_sync}/settings_spec.rb (100%) rename spec/unit/{modulesync => module_sync}/source_code_spec.rb (100%) rename spec/unit/{modulesync_spec.rb => module_sync_spec.rb} (100%) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index f2832c3..9950445 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,17 +1,11 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2023-06-16 18:17:35 UTC using RuboCop version 1.50.2. +# on 2024-05-17 10:11:09 UTC using RuboCop version 1.63.5. # 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: IgnoreLiteralBranches, IgnoreConstantBranches. -Lint/DuplicateBranch: - Exclude: - - 'lib/modulesync/renderer.rb' - # Offense count: 1 # Configuration parameters: AllowComments, AllowNil. Lint/SuppressedException: @@ -28,55 +22,50 @@ Performance/StringInclude: # This cop supports unsafe autocorrection (--autocorrect-all). RSpec/BeEq: Exclude: - - 'spec/unit/modulesync/settings_spec.rb' + - 'spec/unit/module_sync/settings_spec.rb' # Offense count: 3 # Configuration parameters: Prefixes, AllowedPatterns. # Prefixes: when, with, without RSpec/ContextWording: Exclude: - - 'spec/unit/modulesync/git_service/github_spec.rb' - - 'spec/unit/modulesync/git_service/gitlab_spec.rb' - - 'spec/unit/modulesync_spec.rb' + - 'spec/unit/module_sync/git_service/github_spec.rb' + - 'spec/unit/module_sync/git_service/gitlab_spec.rb' + - 'spec/unit/module_sync_spec.rb' # Offense count: 17 # This cop supports unsafe autocorrection (--autocorrect-all). -# Configuration parameters: SkipBlocks, EnforcedStyle. +# Configuration parameters: SkipBlocks, EnforcedStyle, OnlyStaticConstants. # SupportedStyles: described_class, explicit RSpec/DescribedClass: Exclude: - - 'spec/unit/modulesync/git_service/factory_spec.rb' - - 'spec/unit/modulesync/git_service/github_spec.rb' - - 'spec/unit/modulesync/git_service/gitlab_spec.rb' - - 'spec/unit/modulesync/git_service_spec.rb' - - 'spec/unit/modulesync/settings_spec.rb' - - 'spec/unit/modulesync/source_code_spec.rb' - - 'spec/unit/modulesync_spec.rb' + - 'spec/unit/module_sync/git_service/factory_spec.rb' + - 'spec/unit/module_sync/git_service/github_spec.rb' + - 'spec/unit/module_sync/git_service/gitlab_spec.rb' + - 'spec/unit/module_sync/git_service_spec.rb' + - 'spec/unit/module_sync/settings_spec.rb' + - 'spec/unit/module_sync/source_code_spec.rb' + - 'spec/unit/module_sync_spec.rb' # Offense count: 11 # Configuration parameters: CountAsOne. RSpec/ExampleLength: Max: 16 -# Offense count: 7 +# Offense count: 2 # Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly. # Include: **/*_spec*rb*, **/spec/**/* RSpec/FilePath: Exclude: - - 'spec/unit/modulesync/git_service/factory_spec.rb' - - 'spec/unit/modulesync/git_service/github_spec.rb' - - 'spec/unit/modulesync/git_service/gitlab_spec.rb' - - 'spec/unit/modulesync/git_service_spec.rb' - - 'spec/unit/modulesync/settings_spec.rb' - - 'spec/unit/modulesync/source_code_spec.rb' - - 'spec/unit/modulesync_spec.rb' + - 'spec/unit/module_sync/git_service/github_spec.rb' + - 'spec/unit/module_sync/git_service/gitlab_spec.rb' # Offense count: 19 # Configuration parameters: AssignmentOnly. RSpec/InstanceVariable: Exclude: - - 'spec/unit/modulesync/git_service/github_spec.rb' - - 'spec/unit/modulesync/git_service/gitlab_spec.rb' + - 'spec/unit/module_sync/git_service/github_spec.rb' + - 'spec/unit/module_sync/git_service/gitlab_spec.rb' # Offense count: 7 # Configuration parameters: . @@ -93,20 +82,29 @@ RSpec/MultipleExpectations: # SupportedStyles: always, named_only RSpec/NamedSubject: Exclude: - - 'spec/unit/modulesync/settings_spec.rb' - - 'spec/unit/modulesync/source_code_spec.rb' + - 'spec/unit/module_sync/settings_spec.rb' + - 'spec/unit/module_sync/source_code_spec.rb' # Offense count: 9 # Configuration parameters: AllowedGroups. RSpec/NestedGroups: Max: 5 +# Offense count: 2 +# Configuration parameters: Include, CustomTransform, IgnoreMethods, IgnoreMetadata. +# Include: **/*_spec.rb +RSpec/SpecFilePathFormat: + Exclude: + - '**/spec/routing/**/*' + - 'spec/unit/module_sync/git_service/github_spec.rb' + - 'spec/unit/module_sync/git_service/gitlab_spec.rb' + # Offense count: 6 RSpec/StubbedMock: Exclude: - - 'spec/unit/modulesync/git_service/github_spec.rb' - - 'spec/unit/modulesync/git_service/gitlab_spec.rb' - - 'spec/unit/modulesync_spec.rb' + - 'spec/unit/module_sync/git_service/github_spec.rb' + - 'spec/unit/module_sync/git_service/gitlab_spec.rb' + - 'spec/unit/module_sync_spec.rb' # Offense count: 9 # Configuration parameters: AllowedConstants. @@ -135,12 +133,6 @@ Style/FetchEnvVar: Style/FrozenStringLiteralComment: Enabled: false -# Offense count: 2 -# This cop supports unsafe autocorrection (--autocorrect-all). -Style/IdenticalConditionalBranches: - Exclude: - - 'lib/modulesync/renderer.rb' - # Offense count: 1 # Configuration parameters: AllowedMethods. # AllowedMethods: respond_to_missing? diff --git a/modulesync.gemspec b/modulesync.gemspec index 85c1ed3..fe3e078 100644 --- a/modulesync.gemspec +++ b/modulesync.gemspec @@ -21,7 +21,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rake' spec.add_development_dependency 'rspec' spec.add_development_dependency 'simplecov' - spec.add_development_dependency 'voxpupuli-rubocop', '~> 2.0' + spec.add_development_dependency 'voxpupuli-rubocop', '~> 2.7.0' spec.add_runtime_dependency 'git', '~>1.7' spec.add_runtime_dependency 'gitlab', '~>4.0' diff --git a/spec/unit/modulesync/git_service/factory_spec.rb b/spec/unit/module_sync/git_service/factory_spec.rb similarity index 100% rename from spec/unit/modulesync/git_service/factory_spec.rb rename to spec/unit/module_sync/git_service/factory_spec.rb diff --git a/spec/unit/modulesync/git_service/github_spec.rb b/spec/unit/module_sync/git_service/github_spec.rb similarity index 100% rename from spec/unit/modulesync/git_service/github_spec.rb rename to spec/unit/module_sync/git_service/github_spec.rb diff --git a/spec/unit/modulesync/git_service/gitlab_spec.rb b/spec/unit/module_sync/git_service/gitlab_spec.rb similarity index 100% rename from spec/unit/modulesync/git_service/gitlab_spec.rb rename to spec/unit/module_sync/git_service/gitlab_spec.rb diff --git a/spec/unit/modulesync/git_service_spec.rb b/spec/unit/module_sync/git_service_spec.rb similarity index 100% rename from spec/unit/modulesync/git_service_spec.rb rename to spec/unit/module_sync/git_service_spec.rb diff --git a/spec/unit/modulesync/settings_spec.rb b/spec/unit/module_sync/settings_spec.rb similarity index 100% rename from spec/unit/modulesync/settings_spec.rb rename to spec/unit/module_sync/settings_spec.rb diff --git a/spec/unit/modulesync/source_code_spec.rb b/spec/unit/module_sync/source_code_spec.rb similarity index 100% rename from spec/unit/modulesync/source_code_spec.rb rename to spec/unit/module_sync/source_code_spec.rb diff --git a/spec/unit/modulesync_spec.rb b/spec/unit/module_sync_spec.rb similarity index 100% rename from spec/unit/modulesync_spec.rb rename to spec/unit/module_sync_spec.rb