From 30efcffb20e84f3e171d077b2db294e292220752 Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Sat, 2 Mar 2024 18:17:10 -0600 Subject: [PATCH] linting fixes --- attributes/default.rb | 2 -- libraries/helpers.rb | 2 -- recipes/chef_automatev2.rb | 2 -- recipes/chef_server.rb | 6 +----- recipes/chef_supermarket.rb | 2 -- recipes/default.rb | 2 -- resources/iam_policy.rb | 2 -- resources/iam_user.rb | 2 -- test/integration/chef_automate/test_chef_automatev2_spec.rb | 2 -- test/integration/chef_server/test_chef_server_spec.rb | 2 -- .../chef_supermarket/test_chef_supermarket_spec.rb | 2 -- test/integration/default/default_test.rb | 2 -- 12 files changed, 1 insertion(+), 27 deletions(-) diff --git a/attributes/default.rb b/attributes/default.rb index b242e53..30e336a 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - # # Cookbook:: chef_software # Attributes:: default diff --git a/libraries/helpers.rb b/libraries/helpers.rb index b2c1a21..5f1f777 100644 --- a/libraries/helpers.rb +++ b/libraries/helpers.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - module ChefSoftware module Helpers def get_iam_user(user) diff --git a/recipes/chef_automatev2.rb b/recipes/chef_automatev2.rb index 0dbc4a8..5ea8af4 100644 --- a/recipes/chef_automatev2.rb +++ b/recipes/chef_automatev2.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - # # Cookbook:: chef_software # Recipe:: chef_automatev2 diff --git a/recipes/chef_server.rb b/recipes/chef_server.rb index 52dc2c0..4d85577 100644 --- a/recipes/chef_server.rb +++ b/recipes/chef_server.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - # # Cookbook:: chef_software # Recipe:: chef_server @@ -34,9 +32,7 @@ if node['chef_software']['chef_automate_api_fqdn'] && node['chef_software']['automate_admin_token'] execute 'set data_collector token' do command "chef-server-ctl set-secret data_collector token '#{node['chef_software']['automate_admin_token']}'" - not_if do - shell_out('chef-server-ctl show-secret data_collector token').stdout.include?(node['chef_software']['automate_admin_token']) - end + not_if { shell_out('chef-server-ctl show-secret data_collector token').stdout.include?(node['chef_software']['automate_admin_token']) } notifies :run, 'execute[chef-server-ctl restart nginx]', :immediately notifies :run, 'execute[chef-server-ctl restart opscode-erchef]', :immediately sensitive true diff --git a/recipes/chef_supermarket.rb b/recipes/chef_supermarket.rb index e9b6675..c48d9e9 100644 --- a/recipes/chef_supermarket.rb +++ b/recipes/chef_supermarket.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - # # Cookbook:: chef_software # Recipe:: chef_supermarket diff --git a/recipes/default.rb b/recipes/default.rb index dedf45c..1a03dad 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - # # Cookbook:: chef_software # Recipe:: default diff --git a/resources/iam_policy.rb b/resources/iam_policy.rb index c233770..7fee926 100644 --- a/resources/iam_policy.rb +++ b/resources/iam_policy.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - # To learn more about Custom Resources, see https://docs.chef.io/custom_resources.html # # Author:: Corey Hemminger diff --git a/resources/iam_user.rb b/resources/iam_user.rb index c38c703..9705413 100644 --- a/resources/iam_user.rb +++ b/resources/iam_user.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - # To learn more about Custom Resources, see https://docs.chef.io/custom_resources.html # # Author:: Corey Hemminger diff --git a/test/integration/chef_automate/test_chef_automatev2_spec.rb b/test/integration/chef_automate/test_chef_automatev2_spec.rb index e1adc73..e2a527a 100644 --- a/test/integration/chef_automate/test_chef_automatev2_spec.rb +++ b/test/integration/chef_automate/test_chef_automatev2_spec.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - describe file('/usr/local/bin/chef-automate') do it { should_not exist } end diff --git a/test/integration/chef_server/test_chef_server_spec.rb b/test/integration/chef_server/test_chef_server_spec.rb index 2a30e05..d785f87 100644 --- a/test/integration/chef_server/test_chef_server_spec.rb +++ b/test/integration/chef_server/test_chef_server_spec.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - describe package('chef-server-core') do it { should be_installed } end diff --git a/test/integration/chef_supermarket/test_chef_supermarket_spec.rb b/test/integration/chef_supermarket/test_chef_supermarket_spec.rb index 6c1df4c..e811289 100644 --- a/test/integration/chef_supermarket/test_chef_supermarket_spec.rb +++ b/test/integration/chef_supermarket/test_chef_supermarket_spec.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - describe package('supermarket') do it { should be_installed } end diff --git a/test/integration/default/default_test.rb b/test/integration/default/default_test.rb index 2e2e6b1..df33966 100644 --- a/test/integration/default/default_test.rb +++ b/test/integration/default/default_test.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - # InSpec test for recipe xe_chef_automate_role::default # The InSpec reference, with examples and extensive documentation, can be