From 2c3479fa681083b16e6764a9f7aeb58db1e82f56 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 16 Jan 2024 00:03:55 +0000 Subject: [PATCH 1/2] Update rubocop requirement from ~> 1.57.2 to ~> 1.60.0 Updates the requirements on [rubocop](https://github.com/rubocop/rubocop) to permit the latest version. - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.57.2...v1.60.0) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:development ... Signed-off-by: dependabot[bot] --- oxidized.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oxidized.gemspec b/oxidized.gemspec index b155c2595..d4146e23a 100644 --- a/oxidized.gemspec +++ b/oxidized.gemspec @@ -36,7 +36,7 @@ Gem::Specification.new do |s| s.add_development_dependency 'mocha', '~> 2.1' s.add_development_dependency 'pry', '~> 0.14.2' s.add_development_dependency 'rake', '~> 13.0' - s.add_development_dependency 'rubocop', '~> 1.57.2' + s.add_development_dependency 'rubocop', '~> 1.60.0' s.add_development_dependency 'rubocop-minitest', '~> 0.33.0' s.add_development_dependency 'rubocop-rake', '~> 0.6.0' s.add_development_dependency 'simplecov', '~> 0.22.0' From 547a7c62868a059a1de322eeec44f7d1815077d9 Mon Sep 17 00:00:00 2001 From: Robert Cheramy Date: Tue, 16 Jan 2024 12:06:09 +0100 Subject: [PATCH 2/2] Correction of new RuboCop offenses (RuboCop version 1.60.0) - use ... for arguments formating - Don't use redundant parentheses --- .rubocop_todo.yml | 2 +- lib/oxidized/model/model.rb | 4 ++-- lib/oxidized/nodes.rb | 4 ++-- lib/oxidized/output/git.rb | 4 ++-- lib/oxidized/output/gitcrypt.rb | 4 ++-- lib/oxidized/source/source.rb | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index fda39bb80..9798a59aa 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2023-11-27 13:35:47 UTC using RuboCop version 1.57.2. +# on 2024-01-16 10:57:24 UTC using RuboCop version 1.60.0. # 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 diff --git a/lib/oxidized/model/model.rb b/lib/oxidized/model/model.rb index 1ebd03e1e..0ff0d012f 100644 --- a/lib/oxidized/model/model.rb +++ b/lib/oxidized/model/model.rb @@ -143,8 +143,8 @@ def send(data) @input.send data end - def expect(regex, &block) - self.class.expect regex, &block + def expect(...) + self.class.expect(...) end def cfg diff --git a/lib/oxidized/nodes.rb b/lib/oxidized/nodes.rb index d572d9621..09fae5ad3 100644 --- a/lib/oxidized/nodes.rb +++ b/lib/oxidized/nodes.rb @@ -129,8 +129,8 @@ def initialize(opts = {}) end end - def with_lock(&block) - @mutex.synchronize(&block) + def with_lock(...) + @mutex.synchronize(...) end def find_index(node) diff --git a/lib/oxidized/output/git.rb b/lib/oxidized/output/git.rb index a388b8d61..592b1ebac 100644 --- a/lib/oxidized/output/git.rb +++ b/lib/oxidized/output/git.rb @@ -36,8 +36,8 @@ def setup def store(file, outputs, opt = {}) @msg = opt[:msg] - @user = (opt[:user] || @cfg.user) - @email = (opt[:email] || @cfg.email) + @user = opt[:user] || @cfg.user + @email = opt[:email] || @cfg.email @opt = opt @commitref = nil repo = @cfg.repo diff --git a/lib/oxidized/output/gitcrypt.rb b/lib/oxidized/output/gitcrypt.rb index 529a80d75..a309fd68d 100644 --- a/lib/oxidized/output/gitcrypt.rb +++ b/lib/oxidized/output/gitcrypt.rb @@ -64,8 +64,8 @@ def unlock(repo) def store(file, outputs, opt = {}) @msg = opt[:msg] - @user = (opt[:user] || @cfg.user) - @email = (opt[:email] || @cfg.email) + @user = opt[:user] || @cfg.user + @email = opt[:email] || @cfg.email @opt = opt @commitref = nil repo = @cfg.repo diff --git a/lib/oxidized/source/source.rb b/lib/oxidized/source/source.rb index e5e220f8b..99780173a 100644 --- a/lib/oxidized/source/source.rb +++ b/lib/oxidized/source/source.rb @@ -3,8 +3,8 @@ class Source class NoConfig < OxidizedError; end def initialize - @model_map = (Oxidized.config.model_map || {}) - @group_map = (Oxidized.config.group_map || {}) + @model_map = Oxidized.config.model_map || {} + @group_map = Oxidized.config.group_map || {} end def map_model(model)