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/Gemfile.lock b/Gemfile.lock index 335c0ba..f138766 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/lib/vmpooler/api/helpers.rb b/lib/vmpooler/api/helpers.rb index cb983cb..136b5f1 100644 --- a/lib/vmpooler/api/helpers.rb +++ b/lib/vmpooler/api/helpers.rb @@ -181,7 +181,7 @@ module Vmpooler /^\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 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 diff --git a/vmpooler.gemspec b/vmpooler.gemspec index 49e2375..cee2a74 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'