From f5866d51b647c097d54bb22e55690341f24c3824 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Apr 2022 13:02:32 +0000 Subject: [PATCH 1/3] Update rubocop requirement from ~> 1.1.0 to ~> 1.28.2 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.1.0...v1.28.2) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 20 ++++++++++---------- vmpooler.gemspec | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 335c0baf..f1387664 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -112,7 +112,7 @@ GEM opentelemetry-semantic_conventions (1.8.0) opentelemetry-api (~> 1.0) parallel (1.22.1) - parser (3.1.1.0) + parser (3.1.2.0) ast (~> 2.4.1) pickup (0.0.11) prometheus-client (2.1.0) @@ -137,7 +137,7 @@ GEM rainbow (3.1.1) rake (13.0.6) redis (4.6.0) - regexp_parser (2.2.1) + regexp_parser (2.3.1) rexml (3.2.5) rspec (3.11.0) rspec-core (~> 3.11.0) @@ -152,16 +152,16 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.11.0) rspec-support (3.11.0) - rubocop (1.1.0) + rubocop (1.28.2) parallel (~> 1.10) - parser (>= 2.7.1.5) + parser (>= 3.1.0.0) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 1.8) + regexp_parser (>= 1.8, < 3.0) rexml - rubocop-ast (>= 1.0.1) + rubocop-ast (>= 1.17.0, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 2.0) - rubocop-ast (1.16.0) + unicode-display_width (>= 1.4.0, < 3.0) + rubocop-ast (1.17.0) parser (>= 3.1.1.0) ruby-progressbar (1.11.0) ruby2_keywords (0.0.5) @@ -184,7 +184,7 @@ GEM thor (1.2.1) thrift (0.16.0) tilt (2.0.10) - unicode-display_width (1.8.0) + unicode-display_width (2.1.0) yarjuf (2.0.0) builder rspec (~> 3) @@ -199,7 +199,7 @@ DEPENDENCIES pry rack-test (>= 0.6) rspec (>= 3.2) - rubocop (~> 1.1.0) + rubocop (~> 1.28.2) simplecov (>= 0.11.2) thor (~> 1.0, >= 1.0.1) vmpooler! diff --git a/vmpooler.gemspec b/vmpooler.gemspec index 49e23755..cee2a746 100644 --- a/vmpooler.gemspec +++ b/vmpooler.gemspec @@ -45,7 +45,7 @@ Gem::Specification.new do |s| s.add_development_dependency 'pry' s.add_development_dependency 'rack-test', '>= 0.6' s.add_development_dependency 'rspec', '>= 3.2' - s.add_development_dependency 'rubocop', '~> 1.1.0' + s.add_development_dependency 'rubocop', '~> 1.28.2' s.add_development_dependency 'simplecov', '>= 0.11.2' s.add_development_dependency 'thor', '~> 1.0', '>= 1.0.1' s.add_development_dependency 'yarjuf', '>= 2.0' From c846e41780974c1f3f414386f33810814b2fec32 Mon Sep 17 00:00:00 2001 From: Samuel Beaulieu Date: Mon, 25 Jul 2022 08:59:12 -0500 Subject: [PATCH 2/3] fix rubocoop offences --- .rubocop.yml | 1 + lib/vmpooler/pool_manager.rb | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 2d50ca03..0fe1eff8 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -66,6 +66,7 @@ Style/Next: Enabled: false Metrics/ParameterLists: Max: 10 + MaxOptionalParameters: 10 Style/GuardClause: Enabled: false diff --git a/lib/vmpooler/pool_manager.rb b/lib/vmpooler/pool_manager.rb index 9ed29822..95922d57 100644 --- a/lib/vmpooler/pool_manager.rb +++ b/lib/vmpooler/pool_manager.rb @@ -1596,19 +1596,19 @@ def execute!(maxloop = 0, loop_delay = 1) $config[:pools].each do |pool| provider_name = pool['provider'] # The provider_class parameter can be defined in the provider's data eg - #:providers: - # :vsphere: - # provider_class: 'vsphere' - # :another-vsphere: - # provider_class: 'vsphere' + # :providers: + # :vsphere: + # provider_class: 'vsphere' + # :another-vsphere: + # provider_class: 'vsphere' # the above would create two providers/vsphere.rb class objects named 'vsphere' and 'another-vsphere' # each pools would then define which provider definition to use: vsphere or another-vsphere # # if provider_class is not defined it will try to use the provider_name as the class, this is to be # backwards compatible for example when there is only one provider listed # :providers: - # :dummy: - # filename: 'db.txs' + # :dummy: + # filename: 'db.txs' # the above example would create an object based on the class providers/dummy.rb if $config[:providers].nil? || $config[:providers][provider_name.to_sym].nil? || $config[:providers][provider_name.to_sym]['provider_class'].nil? provider_class = provider_name From 7f1f8def8e05b1561ccbffa8e2206790e588f337 Mon Sep 17 00:00:00 2001 From: Samuel Beaulieu Date: Mon, 25 Jul 2022 09:12:12 -0500 Subject: [PATCH 3/3] fix comment offence --- lib/vmpooler/api/helpers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vmpooler/api/helpers.rb b/lib/vmpooler/api/helpers.rb index cb983cbc..136b5f1e 100644 --- a/lib/vmpooler/api/helpers.rb +++ b/lib/vmpooler/api/helpers.rb @@ -181,7 +181,7 @@ def validate_date_str(date_str) /^\d{4}-\d{2}-\d{2}$/ === date_str end - # note: domain is not needed here, so we should update the callers of this method + # NOTE: domain is not needed here, so we should update the callers of this method def hostname_shorten(hostname, domain=nil) hostname[/[^.]+/] end