From c846e41780974c1f3f414386f33810814b2fec32 Mon Sep 17 00:00:00 2001 From: Samuel Beaulieu Date: Mon, 25 Jul 2022 08:59:12 -0500 Subject: [PATCH] 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 2d50ca0..0fe1eff 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 9ed2982..95922d5 100644 --- a/lib/vmpooler/pool_manager.rb +++ b/lib/vmpooler/pool_manager.rb @@ -1596,19 +1596,19 @@ module Vmpooler $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