From 303f530850cfef5f64f247f2e0f916e43f4f5f93 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Wed, 12 Aug 2020 13:12:26 -0700 Subject: [PATCH] Update to Chefstyle 1.2.1 Update a few cop names Remove redundant returns Signed-off-by: Tim Smith --- .rubocop.yml | 2 +- Gemfile | 2 +- lib/inspec/base_cli.rb | 2 +- lib/inspec/reporters/automate.rb | 6 +++--- lib/inspec/resources/bridge.rb | 2 +- lib/inspec/resources/host.rb | 2 +- lib/inspec/resources/postgres.rb | 2 +- lib/inspec/utils/parser.rb | 2 +- .../inspec-compliance/lib/inspec-compliance/api.rb | 8 ++++---- .../inspec-compliance/lib/inspec-compliance/cli.rb | 2 +- lib/resources/aws/aws_iam_policy.rb | 2 +- lib/resources/aws/aws_security_group.rb | 2 +- .../specifications/inspec-test-fixture-0.1.0.gemspec | 1 - .../specifications/inspec-test-fixture-0.1.0.gemspec | 1 - .../specifications/inspec-test-fixture-0.1.0.gemspec | 1 - .../specifications/inspec-test-fixture-0.1.0.gemspec | 1 - .../2.4.0/gems/ordinal_array-0.2.0/ordinal_array.gemspec | 1 - .../specifications/inspec-test-fixture-0.2.0.gemspec | 1 - .../gems/2.4.0/specifications/ordinal_array-0.2.0.gemspec | 1 - .../2.5.0/gems/ordinal_array-0.2.0/ordinal_array.gemspec | 1 - .../specifications/inspec-test-fixture-0.2.0.gemspec | 1 - .../gems/2.5.0/specifications/ordinal_array-0.2.0.gemspec | 1 - .../2.6.0/gems/ordinal_array-0.2.0/ordinal_array.gemspec | 1 - .../specifications/inspec-test-fixture-0.2.0.gemspec | 1 - .../gems/2.6.0/specifications/ordinal_array-0.2.0.gemspec | 1 - .../2.7.0/gems/ordinal_array-0.2.0/ordinal_array.gemspec | 1 - .../specifications/inspec-test-fixture-0.2.0.gemspec | 1 - .../gems/2.7.0/specifications/ordinal_array-0.2.0.gemspec | 1 - .../2.4.0/specifications/train-test-fixture-0.1.0.gemspec | 1 - .../2.5.0/specifications/train-test-fixture-0.1.0.gemspec | 1 - .../2.6.0/specifications/train-test-fixture-0.1.0.gemspec | 1 - .../2.7.0/specifications/train-test-fixture-0.1.0.gemspec | 1 - test/unit/resources/aws_config_recorder_test.rb | 4 ++-- 33 files changed, 19 insertions(+), 39 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 6c4051cff..b4f5d98ce 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -7,5 +7,5 @@ AllCops: - 'lib/plugins/inspec-init/templates/plugins/inspec-plugin-template/**/*' - 'examples/**/controls/*.rb' - 'vendor/bundle/**/*' -Layout/AlignArguments: +Layout/ArgumentAlignment: EnforcedStyle: with_first_argument diff --git a/Gemfile b/Gemfile index 8d2543933..59b26b0f1 100644 --- a/Gemfile +++ b/Gemfile @@ -19,7 +19,7 @@ group :omnibus do end group :test do - gem "chefstyle", "~> 0.13.0" + gem "chefstyle", "~> 1.2.1" gem "minitest", "~> 5.5" gem "minitest-sprint", "~> 1.0" gem "rake", ">= 10" diff --git a/lib/inspec/base_cli.rb b/lib/inspec/base_cli.rb index 0ab682648..9c4bcda79 100644 --- a/lib/inspec/base_cli.rb +++ b/lib/inspec/base_cli.rb @@ -60,7 +60,7 @@ module Inspec true end - def self.target_options # rubocop:disable MethodLength + def self.target_options # rubocop:disable Metrics/MethodLength option :target, aliases: :t, type: :string, desc: "Simple targeting option using URIs, e.g. ssh://user:pass@host:port" option :backend, aliases: :b, type: :string, diff --git a/lib/inspec/reporters/automate.rb b/lib/inspec/reporters/automate.rb index 846754a8f..58795feb9 100644 --- a/lib/inspec/reporters/automate.rb +++ b/lib/inspec/reporters/automate.rb @@ -49,14 +49,14 @@ module Inspec::Reporters res = http.request(req) if res.is_a?(Net::HTTPSuccess) - return true + true else Inspec::Log.error "send_report: POST to #{uri.path} returned: #{res.body}" - return false + false end rescue => e Inspec::Log.error "send_report: POST to #{uri.path} returned: #{e.message}" - return false + false end end diff --git a/lib/inspec/resources/bridge.rb b/lib/inspec/resources/bridge.rb index d7b61f175..fb36a595f 100644 --- a/lib/inspec/resources/bridge.rb +++ b/lib/inspec/resources/bridge.rb @@ -27,7 +27,7 @@ module Inspec::Resources elsif inspec.os.windows? @bridge_provider = WindowsBridge.new(inspec) else - return skip_resource "The `bridge` resource is not supported on your OS yet." + skip_resource "The `bridge` resource is not supported on your OS yet." end end diff --git a/lib/inspec/resources/host.rb b/lib/inspec/resources/host.rb index f0d6828b1..776316ada 100644 --- a/lib/inspec/resources/host.rb +++ b/lib/inspec/resources/host.rb @@ -71,7 +71,7 @@ module Inspec::Resources missing_requirements = @host_provider.missing_requirements(protocol) unless missing_requirements.empty? - return skip_resource "The following requirements are not met for this resource: " \ + skip_resource "The following requirements are not met for this resource: " \ "#{missing_requirements.join(", ")}" end end diff --git a/lib/inspec/resources/postgres.rb b/lib/inspec/resources/postgres.rb index 0405a0b32..21955e147 100644 --- a/lib/inspec/resources/postgres.rb +++ b/lib/inspec/resources/postgres.rb @@ -19,7 +19,7 @@ module Inspec::Resources @conf_path = File.join @conf_dir, "postgresql.conf" else @conf_path = nil - return skip_resource "Seems like PostgreSQL is not installed on your system" + skip_resource "Seems like PostgreSQL is not installed on your system" end end diff --git a/lib/inspec/utils/parser.rb b/lib/inspec/utils/parser.rb index 8d23c58aa..34fc7d731 100644 --- a/lib/inspec/utils/parser.rb +++ b/lib/inspec/utils/parser.rb @@ -84,7 +84,7 @@ module Inspec end # parse device and type - mount_options = { device: mount[0], type: mount[4] } + mount_options = { device: mount[0], type: mount[4] } if compatibility == false # parse options as array diff --git a/lib/plugins/inspec-compliance/lib/inspec-compliance/api.rb b/lib/plugins/inspec-compliance/lib/inspec-compliance/api.rb index b12180e04..7313f6c73 100644 --- a/lib/plugins/inspec-compliance/lib/inspec-compliance/api.rb +++ b/lib/plugins/inspec-compliance/lib/inspec-compliance/api.rb @@ -22,7 +22,7 @@ module InspecPlugins # return all compliance profiles available for the user # the user is either specified in the options hash or by default # the username of the account is used that is logged in - def self.profiles(config, profile_filter = nil) # rubocop:disable PerceivedComplexity, Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/MethodLength + def self.profiles(config, profile_filter = nil) # rubocop:disable Metrics/PerceivedComplexity, Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/MethodLength owner = config["owner"] || config["user"] # Chef Compliance @@ -81,13 +81,13 @@ module InspecPlugins mapped_profiles.select! do |p| (!ver || p["version"] == ver) && (!id || p["name"] == id) end - return msg, mapped_profiles + [msg, mapped_profiles] when "401" msg = "401 Unauthorized. Please check your token." - return msg, [] + [msg, []] else msg = "An unexpected error occurred (HTTP #{response_code}): #{response.message}" - return msg, [] + [msg, []] end end diff --git a/lib/plugins/inspec-compliance/lib/inspec-compliance/cli.rb b/lib/plugins/inspec-compliance/lib/inspec-compliance/cli.rb index 867f562e2..a070476a7 100644 --- a/lib/plugins/inspec-compliance/lib/inspec-compliance/cli.rb +++ b/lib/plugins/inspec-compliance/lib/inspec-compliance/cli.rb @@ -126,7 +126,7 @@ module InspecPlugins desc: "Overwrite existing profile on Server." option :owner, type: :string, required: false, desc: "Owner that should own the profile" - def upload(path) # rubocop:disable Metrics/MethodLength, Metrics/AbcSize, PerceivedComplexity, Metrics/CyclomaticComplexity + def upload(path) # rubocop:disable Metrics/MethodLength, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/CyclomaticComplexity config = InspecPlugins::Compliance::Configuration.new return unless loggedin(config) diff --git a/lib/resources/aws/aws_iam_policy.rb b/lib/resources/aws/aws_iam_policy.rb index a4f4e65f2..19c287d96 100644 --- a/lib/resources/aws/aws_iam_policy.rb +++ b/lib/resources/aws/aws_iam_policy.rb @@ -98,7 +98,7 @@ class AwsIamPolicy < Inspec.resource(1) else # But if there is one statement, it is permissable to degenerate the array, # and place the statement as a hash directly under the 'Statement' key - return 1 + 1 end end diff --git a/lib/resources/aws/aws_security_group.rb b/lib/resources/aws/aws_security_group.rb index a7724105d..2e5d9a953 100644 --- a/lib/resources/aws/aws_security_group.rb +++ b/lib/resources/aws/aws_security_group.rb @@ -292,7 +292,7 @@ class AwsSecurityGroup < Inspec.resource(1) @exists = true @description = dsg_response.security_groups[0].description - @group_id = dsg_response.security_groups[0].group_id + @group_id = dsg_response.security_groups[0].group_id @group_name = dsg_response.security_groups[0].group_name @vpc_id = dsg_response.security_groups[0].vpc_id @inbound_rules = dsg_response.security_groups[0].ip_permissions.map(&:to_h) diff --git a/test/fixtures/config_dirs/test-fixture-1-float/gems/2.4.0/specifications/inspec-test-fixture-0.1.0.gemspec b/test/fixtures/config_dirs/test-fixture-1-float/gems/2.4.0/specifications/inspec-test-fixture-0.1.0.gemspec index e1f73a92f..cb3e32efa 100644 --- a/test/fixtures/config_dirs/test-fixture-1-float/gems/2.4.0/specifications/inspec-test-fixture-0.1.0.gemspec +++ b/test/fixtures/config_dirs/test-fixture-1-float/gems/2.4.0/specifications/inspec-test-fixture-0.1.0.gemspec @@ -1,4 +1,3 @@ -# -*- encoding: utf-8 -*- # stub: inspec-test-fixture 0.1.0 ruby lib Gem::Specification.new do |s| diff --git a/test/fixtures/config_dirs/test-fixture-1-float/gems/2.5.0/specifications/inspec-test-fixture-0.1.0.gemspec b/test/fixtures/config_dirs/test-fixture-1-float/gems/2.5.0/specifications/inspec-test-fixture-0.1.0.gemspec index 1b9c75bbe..e2daae918 100644 --- a/test/fixtures/config_dirs/test-fixture-1-float/gems/2.5.0/specifications/inspec-test-fixture-0.1.0.gemspec +++ b/test/fixtures/config_dirs/test-fixture-1-float/gems/2.5.0/specifications/inspec-test-fixture-0.1.0.gemspec @@ -1,4 +1,3 @@ -# -*- encoding: utf-8 -*- # stub: inspec-test-fixture 0.1.0 ruby lib Gem::Specification.new do |s| diff --git a/test/fixtures/config_dirs/test-fixture-1-float/gems/2.6.0/specifications/inspec-test-fixture-0.1.0.gemspec b/test/fixtures/config_dirs/test-fixture-1-float/gems/2.6.0/specifications/inspec-test-fixture-0.1.0.gemspec index b879d8d35..4f5168e96 100644 --- a/test/fixtures/config_dirs/test-fixture-1-float/gems/2.6.0/specifications/inspec-test-fixture-0.1.0.gemspec +++ b/test/fixtures/config_dirs/test-fixture-1-float/gems/2.6.0/specifications/inspec-test-fixture-0.1.0.gemspec @@ -1,4 +1,3 @@ -# -*- encoding: utf-8 -*- # stub: inspec-test-fixture 0.1.0 ruby lib Gem::Specification.new do |s| diff --git a/test/fixtures/config_dirs/test-fixture-1-float/gems/2.7.0/specifications/inspec-test-fixture-0.1.0.gemspec b/test/fixtures/config_dirs/test-fixture-1-float/gems/2.7.0/specifications/inspec-test-fixture-0.1.0.gemspec index b879d8d35..4f5168e96 100644 --- a/test/fixtures/config_dirs/test-fixture-1-float/gems/2.7.0/specifications/inspec-test-fixture-0.1.0.gemspec +++ b/test/fixtures/config_dirs/test-fixture-1-float/gems/2.7.0/specifications/inspec-test-fixture-0.1.0.gemspec @@ -1,4 +1,3 @@ -# -*- encoding: utf-8 -*- # stub: inspec-test-fixture 0.1.0 ruby lib Gem::Specification.new do |s| diff --git a/test/fixtures/config_dirs/test-fixture-2-float/gems/2.4.0/gems/ordinal_array-0.2.0/ordinal_array.gemspec b/test/fixtures/config_dirs/test-fixture-2-float/gems/2.4.0/gems/ordinal_array-0.2.0/ordinal_array.gemspec index ba399cd87..6adfce02c 100644 --- a/test/fixtures/config_dirs/test-fixture-2-float/gems/2.4.0/gems/ordinal_array-0.2.0/ordinal_array.gemspec +++ b/test/fixtures/config_dirs/test-fixture-2-float/gems/2.4.0/gems/ordinal_array-0.2.0/ordinal_array.gemspec @@ -1,4 +1,3 @@ -# -*- encoding: utf-8 -*- # stub: ordinal_array 0.2.0 ruby lib Gem::Specification.new do |s| diff --git a/test/fixtures/config_dirs/test-fixture-2-float/gems/2.4.0/specifications/inspec-test-fixture-0.2.0.gemspec b/test/fixtures/config_dirs/test-fixture-2-float/gems/2.4.0/specifications/inspec-test-fixture-0.2.0.gemspec index 855e788b7..50dcf9e15 100644 --- a/test/fixtures/config_dirs/test-fixture-2-float/gems/2.4.0/specifications/inspec-test-fixture-0.2.0.gemspec +++ b/test/fixtures/config_dirs/test-fixture-2-float/gems/2.4.0/specifications/inspec-test-fixture-0.2.0.gemspec @@ -1,4 +1,3 @@ -# -*- encoding: utf-8 -*- # stub: inspec-test-fixture 0.2.0 ruby lib Gem::Specification.new do |s| diff --git a/test/fixtures/config_dirs/test-fixture-2-float/gems/2.4.0/specifications/ordinal_array-0.2.0.gemspec b/test/fixtures/config_dirs/test-fixture-2-float/gems/2.4.0/specifications/ordinal_array-0.2.0.gemspec index ba399cd87..6adfce02c 100644 --- a/test/fixtures/config_dirs/test-fixture-2-float/gems/2.4.0/specifications/ordinal_array-0.2.0.gemspec +++ b/test/fixtures/config_dirs/test-fixture-2-float/gems/2.4.0/specifications/ordinal_array-0.2.0.gemspec @@ -1,4 +1,3 @@ -# -*- encoding: utf-8 -*- # stub: ordinal_array 0.2.0 ruby lib Gem::Specification.new do |s| diff --git a/test/fixtures/config_dirs/test-fixture-2-float/gems/2.5.0/gems/ordinal_array-0.2.0/ordinal_array.gemspec b/test/fixtures/config_dirs/test-fixture-2-float/gems/2.5.0/gems/ordinal_array-0.2.0/ordinal_array.gemspec index 42be4dc48..dc2a87729 100644 --- a/test/fixtures/config_dirs/test-fixture-2-float/gems/2.5.0/gems/ordinal_array-0.2.0/ordinal_array.gemspec +++ b/test/fixtures/config_dirs/test-fixture-2-float/gems/2.5.0/gems/ordinal_array-0.2.0/ordinal_array.gemspec @@ -1,4 +1,3 @@ -# -*- encoding: utf-8 -*- # stub: ordinal_array 0.2.0 ruby lib Gem::Specification.new do |s| diff --git a/test/fixtures/config_dirs/test-fixture-2-float/gems/2.5.0/specifications/inspec-test-fixture-0.2.0.gemspec b/test/fixtures/config_dirs/test-fixture-2-float/gems/2.5.0/specifications/inspec-test-fixture-0.2.0.gemspec index 2991fa4ad..67f710bdb 100644 --- a/test/fixtures/config_dirs/test-fixture-2-float/gems/2.5.0/specifications/inspec-test-fixture-0.2.0.gemspec +++ b/test/fixtures/config_dirs/test-fixture-2-float/gems/2.5.0/specifications/inspec-test-fixture-0.2.0.gemspec @@ -1,4 +1,3 @@ -# -*- encoding: utf-8 -*- # stub: inspec-test-fixture 0.2.0 ruby lib Gem::Specification.new do |s| diff --git a/test/fixtures/config_dirs/test-fixture-2-float/gems/2.5.0/specifications/ordinal_array-0.2.0.gemspec b/test/fixtures/config_dirs/test-fixture-2-float/gems/2.5.0/specifications/ordinal_array-0.2.0.gemspec index 42be4dc48..dc2a87729 100644 --- a/test/fixtures/config_dirs/test-fixture-2-float/gems/2.5.0/specifications/ordinal_array-0.2.0.gemspec +++ b/test/fixtures/config_dirs/test-fixture-2-float/gems/2.5.0/specifications/ordinal_array-0.2.0.gemspec @@ -1,4 +1,3 @@ -# -*- encoding: utf-8 -*- # stub: ordinal_array 0.2.0 ruby lib Gem::Specification.new do |s| diff --git a/test/fixtures/config_dirs/test-fixture-2-float/gems/2.6.0/gems/ordinal_array-0.2.0/ordinal_array.gemspec b/test/fixtures/config_dirs/test-fixture-2-float/gems/2.6.0/gems/ordinal_array-0.2.0/ordinal_array.gemspec index b924530ac..51fc008ea 100644 --- a/test/fixtures/config_dirs/test-fixture-2-float/gems/2.6.0/gems/ordinal_array-0.2.0/ordinal_array.gemspec +++ b/test/fixtures/config_dirs/test-fixture-2-float/gems/2.6.0/gems/ordinal_array-0.2.0/ordinal_array.gemspec @@ -1,4 +1,3 @@ -# -*- encoding: utf-8 -*- # stub: ordinal_array 0.2.0 ruby lib Gem::Specification.new do |s| diff --git a/test/fixtures/config_dirs/test-fixture-2-float/gems/2.6.0/specifications/inspec-test-fixture-0.2.0.gemspec b/test/fixtures/config_dirs/test-fixture-2-float/gems/2.6.0/specifications/inspec-test-fixture-0.2.0.gemspec index c1c5c3e80..5884e66b7 100644 --- a/test/fixtures/config_dirs/test-fixture-2-float/gems/2.6.0/specifications/inspec-test-fixture-0.2.0.gemspec +++ b/test/fixtures/config_dirs/test-fixture-2-float/gems/2.6.0/specifications/inspec-test-fixture-0.2.0.gemspec @@ -1,4 +1,3 @@ -# -*- encoding: utf-8 -*- # stub: inspec-test-fixture 0.2.0 ruby lib Gem::Specification.new do |s| diff --git a/test/fixtures/config_dirs/test-fixture-2-float/gems/2.6.0/specifications/ordinal_array-0.2.0.gemspec b/test/fixtures/config_dirs/test-fixture-2-float/gems/2.6.0/specifications/ordinal_array-0.2.0.gemspec index b924530ac..51fc008ea 100644 --- a/test/fixtures/config_dirs/test-fixture-2-float/gems/2.6.0/specifications/ordinal_array-0.2.0.gemspec +++ b/test/fixtures/config_dirs/test-fixture-2-float/gems/2.6.0/specifications/ordinal_array-0.2.0.gemspec @@ -1,4 +1,3 @@ -# -*- encoding: utf-8 -*- # stub: ordinal_array 0.2.0 ruby lib Gem::Specification.new do |s| diff --git a/test/fixtures/config_dirs/test-fixture-2-float/gems/2.7.0/gems/ordinal_array-0.2.0/ordinal_array.gemspec b/test/fixtures/config_dirs/test-fixture-2-float/gems/2.7.0/gems/ordinal_array-0.2.0/ordinal_array.gemspec index b924530ac..51fc008ea 100644 --- a/test/fixtures/config_dirs/test-fixture-2-float/gems/2.7.0/gems/ordinal_array-0.2.0/ordinal_array.gemspec +++ b/test/fixtures/config_dirs/test-fixture-2-float/gems/2.7.0/gems/ordinal_array-0.2.0/ordinal_array.gemspec @@ -1,4 +1,3 @@ -# -*- encoding: utf-8 -*- # stub: ordinal_array 0.2.0 ruby lib Gem::Specification.new do |s| diff --git a/test/fixtures/config_dirs/test-fixture-2-float/gems/2.7.0/specifications/inspec-test-fixture-0.2.0.gemspec b/test/fixtures/config_dirs/test-fixture-2-float/gems/2.7.0/specifications/inspec-test-fixture-0.2.0.gemspec index c1c5c3e80..5884e66b7 100644 --- a/test/fixtures/config_dirs/test-fixture-2-float/gems/2.7.0/specifications/inspec-test-fixture-0.2.0.gemspec +++ b/test/fixtures/config_dirs/test-fixture-2-float/gems/2.7.0/specifications/inspec-test-fixture-0.2.0.gemspec @@ -1,4 +1,3 @@ -# -*- encoding: utf-8 -*- # stub: inspec-test-fixture 0.2.0 ruby lib Gem::Specification.new do |s| diff --git a/test/fixtures/config_dirs/test-fixture-2-float/gems/2.7.0/specifications/ordinal_array-0.2.0.gemspec b/test/fixtures/config_dirs/test-fixture-2-float/gems/2.7.0/specifications/ordinal_array-0.2.0.gemspec index b924530ac..51fc008ea 100644 --- a/test/fixtures/config_dirs/test-fixture-2-float/gems/2.7.0/specifications/ordinal_array-0.2.0.gemspec +++ b/test/fixtures/config_dirs/test-fixture-2-float/gems/2.7.0/specifications/ordinal_array-0.2.0.gemspec @@ -1,4 +1,3 @@ -# -*- encoding: utf-8 -*- # stub: ordinal_array 0.2.0 ruby lib Gem::Specification.new do |s| diff --git a/test/fixtures/config_dirs/train-test-fixture/gems/2.4.0/specifications/train-test-fixture-0.1.0.gemspec b/test/fixtures/config_dirs/train-test-fixture/gems/2.4.0/specifications/train-test-fixture-0.1.0.gemspec index d45d6027d..0bbefe599 100644 --- a/test/fixtures/config_dirs/train-test-fixture/gems/2.4.0/specifications/train-test-fixture-0.1.0.gemspec +++ b/test/fixtures/config_dirs/train-test-fixture/gems/2.4.0/specifications/train-test-fixture-0.1.0.gemspec @@ -1,4 +1,3 @@ -# -*- encoding: utf-8 -*- # stub: train-test-fixture 0.1.0 ruby lib Gem::Specification.new do |s| diff --git a/test/fixtures/config_dirs/train-test-fixture/gems/2.5.0/specifications/train-test-fixture-0.1.0.gemspec b/test/fixtures/config_dirs/train-test-fixture/gems/2.5.0/specifications/train-test-fixture-0.1.0.gemspec index d45d6027d..0bbefe599 100644 --- a/test/fixtures/config_dirs/train-test-fixture/gems/2.5.0/specifications/train-test-fixture-0.1.0.gemspec +++ b/test/fixtures/config_dirs/train-test-fixture/gems/2.5.0/specifications/train-test-fixture-0.1.0.gemspec @@ -1,4 +1,3 @@ -# -*- encoding: utf-8 -*- # stub: train-test-fixture 0.1.0 ruby lib Gem::Specification.new do |s| diff --git a/test/fixtures/config_dirs/train-test-fixture/gems/2.6.0/specifications/train-test-fixture-0.1.0.gemspec b/test/fixtures/config_dirs/train-test-fixture/gems/2.6.0/specifications/train-test-fixture-0.1.0.gemspec index 4d02b5c10..7ed593b57 100644 --- a/test/fixtures/config_dirs/train-test-fixture/gems/2.6.0/specifications/train-test-fixture-0.1.0.gemspec +++ b/test/fixtures/config_dirs/train-test-fixture/gems/2.6.0/specifications/train-test-fixture-0.1.0.gemspec @@ -1,4 +1,3 @@ -# -*- encoding: utf-8 -*- # stub: train-test-fixture 0.1.0 ruby lib Gem::Specification.new do |s| diff --git a/test/fixtures/config_dirs/train-test-fixture/gems/2.7.0/specifications/train-test-fixture-0.1.0.gemspec b/test/fixtures/config_dirs/train-test-fixture/gems/2.7.0/specifications/train-test-fixture-0.1.0.gemspec index 4d02b5c10..7ed593b57 100644 --- a/test/fixtures/config_dirs/train-test-fixture/gems/2.7.0/specifications/train-test-fixture-0.1.0.gemspec +++ b/test/fixtures/config_dirs/train-test-fixture/gems/2.7.0/specifications/train-test-fixture-0.1.0.gemspec @@ -1,4 +1,3 @@ -# -*- encoding: utf-8 -*- # stub: train-test-fixture 0.1.0 ruby lib Gem::Specification.new do |s| diff --git a/test/unit/resources/aws_config_recorder_test.rb b/test/unit/resources/aws_config_recorder_test.rb index da76c3f0c..0ffdbeb0f 100644 --- a/test/unit/resources/aws_config_recorder_test.rb +++ b/test/unit/resources/aws_config_recorder_test.rb @@ -125,9 +125,9 @@ module AwsMCRSB }), } if query.empty? - return recorders["default"] + recorders["default"] elsif recorders.key?(query[:configuration_recorder_names][0]) - return recorders[query[:configuration_recorder_names][0]] + recorders[query[:configuration_recorder_names][0]] else raise Aws::ConfigService::Errors::NoSuchConfigurationRecorderException.new(nil, nil) end