From b2f5a0bbf5d11f624ee838442897a06ff8b8e943 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Tue, 10 Dec 2019 10:45:17 -0800 Subject: [PATCH 01/12] Remove recipe data from the metadata This is unused and there's no point in including it here Signed-off-by: Tim Smith --- metadata.rb | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/metadata.rb b/metadata.rb index 6f0f3abb..4a5dbd19 100644 --- a/metadata.rb +++ b/metadata.rb @@ -6,29 +6,6 @@ description 'Installs and configures RabbitMQ server' version '6.0.0' -recipe 'rabbitmq', 'Install and configure RabbitMQ' - -recipe 'rabbitmq::systemd_limits', 'Sets up kernel limits (e.g. nofile) for RabbitMQ via systemd' -recipe 'rabbitmq::cluster', 'Set up RabbitMQ clustering.' - -recipe 'rabbitmq::management_ui', 'Sets up RabbitMQ management plugin/UI' -recipe 'rabbitmq::mgmt_console', 'Deprecated, alias for rabbitmq::management_ui' - -recipe 'rabbitmq::plugins', 'Manage plugins with node attributes' -recipe 'rabbitmq::plugin_management', 'Deprecated, alias for rabbitmq::plugins' - -recipe 'rabbitmq::vhosts', 'Manage virtual hosts with node attributes' -recipe 'rabbitmq::virtualhost_management', 'Deprecated, alias for rabbitmq::vhosts' - -recipe 'rabbitmq::users', 'Manage users with node attributes' -recipe 'rabbitmq::user_management', 'Deprecated, alias for rabbitmq::users' - -recipe 'rabbitmq::policies', 'Manage policies with node attributes' -recipe 'rabbitmq::policy_management', 'Deprecated, alias for rabbitmq::policies' - -recipe 'rabbitmq::erlang_package', 'Provisions Erlang via Team RabbitMQ packages' -recipe 'rabbitmq::esl_erlang_package', 'Alias for erlang::esl' - issues_url 'https://github.com/rabbitmq/chef-cookbook/issues' source_url 'https://github.com/rabbitmq/chef-cookbook' From 981b066c989b516513517f8444c70f956716da8b Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Tue, 10 Dec 2019 10:45:49 -0800 Subject: [PATCH 02/12] Remove opensuse platform from metadata.rb opensuse has been replaced by opensuseleap which is 42 and 15. There's no support opensuse distro that's supported now Signed-off-by: Tim Smith --- metadata.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/metadata.rb b/metadata.rb index 4a5dbd19..c9fcfbf7 100644 --- a/metadata.rb +++ b/metadata.rb @@ -21,7 +21,6 @@ supports 'centos', '>= 7.0' supports 'debian', '>= 8.0' supports 'fedora', '>= 23' -supports 'opensuse' supports 'opensuseleap' supports 'oracle' supports 'redhat' From 8de92453a4949633332b9106eb0cc719cad2b937 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Tue, 10 Dec 2019 10:46:06 -0800 Subject: [PATCH 03/12] Remove legacy ChefSpec matchers ChefSpec generates these automatically now Signed-off-by: Tim Smith --- libraries/matchers.rb | 70 ------------------------------------------- 1 file changed, 70 deletions(-) delete mode 100644 libraries/matchers.rb diff --git a/libraries/matchers.rb b/libraries/matchers.rb deleted file mode 100644 index 2c0c560b..00000000 --- a/libraries/matchers.rb +++ /dev/null @@ -1,70 +0,0 @@ -# frozen_string_literal: true -if defined?(ChefSpec) - def add_rabbitmq_user(resource_name) - ChefSpec::Matchers::ResourceMatcher.new(:rabbitmq_user, :add, resource_name) - end - - def delete_rabbitmq_user(resource_name) - ChefSpec::Matchers::ResourceMatcher.new(:rabbitmq_user, :delete, resource_name) - end - - def set_permissions_rabbitmq_user(resource_name) # rubocop:disable AccessorMethodName - ChefSpec::Matchers::ResourceMatcher.new(:rabbitmq_user, :set_permissions, resource_name) - end - - def clear_permissions_rabbitmq_user(resource_name) - ChefSpec::Matchers::ResourceMatcher.new(:rabbitmq_user, :clear_permissions, resource_name) - end - - def set_tags_rabbitmq_user(resource_name) # rubocop:disable AccessorMethodName - ChefSpec::Matchers::ResourceMatcher.new(:rabbitmq_user, :set_tags, resource_name) - end - - def clear_tags_rabbitmq_user(resource_name) - ChefSpec::Matchers::ResourceMatcher.new(:rabbitmq_user, :clear_tags, resource_name) - end - - def change_password_rabbitmq_user(resource_name) - ChefSpec::Matchers::ResourceMatcher.new(:rabbitmq_user, :change_password, resource_name) - end - - def add_rabbitmq_vhost(resource_name) - ChefSpec::Matchers::ResourceMatcher.new(:rabbitmq_vhost, :add, resource_name) - end - - def delete_rabbitmq_vhost(resource_name) - ChefSpec::Matchers::ResourceMatcher.new(:rabbitmq_vhost, :delete, resource_name) - end - - def set_rabbitmq_policy(resource_name) # rubocop:disable AccessorMethodName - ChefSpec::Matchers::ResourceMatcher.new(:rabbitmq_policy, :set, resource_name) - end - - def clear_rabbitmq_policy(resource_name) - ChefSpec::Matchers::ResourceMatcher.new(:rabbitmq_policy, :clear, resource_name) - end - - def list_rabbitmq_policy(resource_name) - ChefSpec::Matchers::ResourceMatcher.new(:rabbitmq_policy, :list, resource_name) - end - - def enable_rabbitmq_plugin(resource_name) - ChefSpec::Matchers::ResourceMatcher.new(:rabbitmq_plugin, :enable, resource_name) - end - - def disable_rabbitmq_plugin(resource_name) - ChefSpec::Matchers::ResourceMatcher.new(:rabbitmq_plugin, :disable, resource_name) - end - - def join_cluster(resource_name) - ChefSpec::Matchers::ResourceMatcher.new(:rabbitmq_cluster, :join, resource_name) - end - - def set_cluster_name(resource_name) # rubocop:disable AccessorMethodName - ChefSpec::Matchers::ResourceMatcher.new(:rabbitmq_cluster, :set_cluster_name, resource_name) - end - - def change_cluster_node_type(resource_name) - ChefSpec::Matchers::ResourceMatcher.new(:rabbitmq_cluster, :change_cluster_node_type, resource_name) - end -end From 73ef17e2c39fc8e111f33d9e1ce7ef587be7f0dc Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Tue, 10 Dec 2019 10:49:51 -0800 Subject: [PATCH 04/12] There's no need to include mixin shellout in the providers Chef does this for you already Signed-off-by: Tim Smith --- providers/cluster.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/providers/cluster.rb b/providers/cluster.rb index 615bd22d..d167884c 100644 --- a/providers/cluster.rb +++ b/providers/cluster.rb @@ -20,7 +20,6 @@ # include RabbitMQ::CoreHelpers -include Chef::Mixin::ShellOut use_inline_resources if defined?(:use_inline_resources) # ~FC113 From 0403f3c2f4be015038de84f8b107201921d1b42f Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Tue, 10 Dec 2019 10:52:48 -0800 Subject: [PATCH 05/12] Remove unnecessary use_inline_resources This is the default in Chef 13 now and it's an empty method in the chef codebase Signed-off-by: Tim Smith --- providers/cluster.rb | 2 -- providers/erlang_apt_repository_on_bintray.rb | 2 -- providers/erlang_package_from_bintray.rb | 2 -- providers/erlang_yum_repository_on_bintray.rb | 2 -- providers/erlang_zypper_repository_on_suse_factory.rb | 2 -- providers/parameter.rb | 2 -- providers/plugin.rb | 2 -- providers/policy.rb | 2 -- providers/user.rb | 2 -- providers/vhost.rb | 2 -- 10 files changed, 20 deletions(-) diff --git a/providers/cluster.rb b/providers/cluster.rb index d167884c..4930a049 100644 --- a/providers/cluster.rb +++ b/providers/cluster.rb @@ -21,8 +21,6 @@ include RabbitMQ::CoreHelpers -use_inline_resources if defined?(:use_inline_resources) # ~FC113 - # Get ShellOut def get_shellout(cmd) sh_cmd = Mixlib::ShellOut.new(cmd, env: shell_environment) diff --git a/providers/erlang_apt_repository_on_bintray.rb b/providers/erlang_apt_repository_on_bintray.rb index 5fe1bdfa..4f31b403 100644 --- a/providers/erlang_apt_repository_on_bintray.rb +++ b/providers/erlang_apt_repository_on_bintray.rb @@ -18,8 +18,6 @@ # limitations under the License. # -use_inline_resources if defined?(:use_inline_resources) # ~FC113 - provides :erlang_repository, platform_family: %w(debian ubuntu) action :add do diff --git a/providers/erlang_package_from_bintray.rb b/providers/erlang_package_from_bintray.rb index 2d3c6993..4d0d9879 100644 --- a/providers/erlang_package_from_bintray.rb +++ b/providers/erlang_package_from_bintray.rb @@ -18,8 +18,6 @@ # limitations under the License. # -use_inline_resources if defined?(:use_inline_resources) # ~FC113 - provides :erlang_package_from_bintray, platform_family: %w(debian ubuntu rhel centos fedora) DEBIAN_PACKAGES = %w(erlang-mnesia erlang-runtime-tools erlang-asn1 erlang-crypto erlang-public-key erlang-ssl diff --git a/providers/erlang_yum_repository_on_bintray.rb b/providers/erlang_yum_repository_on_bintray.rb index 720b69fa..35e84e8f 100644 --- a/providers/erlang_yum_repository_on_bintray.rb +++ b/providers/erlang_yum_repository_on_bintray.rb @@ -18,8 +18,6 @@ # limitations under the License. # -use_inline_resources if defined?(:use_inline_resources) # ~FC113 - provides :erlang_repository, platform_family: %w(rhel centos fedora) action :create do diff --git a/providers/erlang_zypper_repository_on_suse_factory.rb b/providers/erlang_zypper_repository_on_suse_factory.rb index 5e16963a..33bde901 100644 --- a/providers/erlang_zypper_repository_on_suse_factory.rb +++ b/providers/erlang_zypper_repository_on_suse_factory.rb @@ -18,8 +18,6 @@ # limitations under the License. # -use_inline_resources if defined?(:use_inline_resources) # ~FC113 - provides :erlang_repository, platform_family: %w(suse opensuse) action :create do diff --git a/providers/parameter.rb b/providers/parameter.rb index a18426d2..4db4557f 100644 --- a/providers/parameter.rb +++ b/providers/parameter.rb @@ -23,8 +23,6 @@ include RabbitMQ::CoreHelpers -use_inline_resources if defined?(:use_inline_resources) # ~FC113 - def parameter_exists?(vhost, name) cmd = if Gem::Version.new(installed_rabbitmq_version) >= Gem::Version.new('3.7.10') 'rabbitmqctl list_parameters -s' diff --git a/providers/plugin.rb b/providers/plugin.rb index 187a67ef..84f4ae54 100644 --- a/providers/plugin.rb +++ b/providers/plugin.rb @@ -32,8 +32,6 @@ def plugin_enabled?(name) cmd.stdout =~ /\b#{name}\b/ end -use_inline_resources if defined?(:use_inline_resources) # ~FC113 - action :enable do unless plugin_enabled?(new_resource.plugin) execute "rabbitmq-plugins enable #{new_resource.plugin}" do diff --git a/providers/policy.rb b/providers/policy.rb index ccf4a2d0..2ace22e7 100644 --- a/providers/policy.rb +++ b/providers/policy.rb @@ -23,8 +23,6 @@ include RabbitMQ::CoreHelpers -use_inline_resources if defined?(:use_inline_resources) # ~FC113 - def policy_exists?(vhost, name) cmd = if Gem::Version.new(installed_rabbitmq_version) >= Gem::Version.new('3.7.10') 'rabbitmqctl list_policies -s' diff --git a/providers/user.rb b/providers/user.rb index 76d44d26..77ee2f0e 100644 --- a/providers/user.rb +++ b/providers/user.rb @@ -20,8 +20,6 @@ include RabbitMQ::CoreHelpers -use_inline_resources if defined?(:use_inline_resources) # ~FC113 - def user_exists?(name) cmd = if Gem::Version.new(installed_rabbitmq_version) >= Gem::Version.new('3.7.10') "rabbitmqctl -s list_users |grep '^#{name}\\s'" diff --git a/providers/vhost.rb b/providers/vhost.rb index 379a3351..6c36156b 100644 --- a/providers/vhost.rb +++ b/providers/vhost.rb @@ -20,8 +20,6 @@ include RabbitMQ::CoreHelpers -use_inline_resources if defined?(:use_inline_resources) # ~FC113 - def vhost_exists?(name) cmd = "rabbitmqctl -q list_vhosts | grep ^#{name}$" cmd = Mixlib::ShellOut.new(cmd, env: shell_environment) From bdfb2a9ffcb9dff566212da7177c3b2a1875f0ec Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Tue, 10 Dec 2019 10:53:21 -0800 Subject: [PATCH 06/12] Fix platform families in provider provides calls These were not platform families Signed-off-by: Tim Smith --- providers/erlang_apt_repository_on_bintray.rb | 2 +- providers/erlang_package_from_bintray.rb | 2 +- providers/erlang_yum_repository_on_bintray.rb | 2 +- providers/erlang_zypper_repository_on_suse_factory.rb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/providers/erlang_apt_repository_on_bintray.rb b/providers/erlang_apt_repository_on_bintray.rb index 4f31b403..d5f6de8e 100644 --- a/providers/erlang_apt_repository_on_bintray.rb +++ b/providers/erlang_apt_repository_on_bintray.rb @@ -18,7 +18,7 @@ # limitations under the License. # -provides :erlang_repository, platform_family: %w(debian ubuntu) +provides :erlang_repository, platform_family: %w(debian) action :add do package 'apt-transport-https' diff --git a/providers/erlang_package_from_bintray.rb b/providers/erlang_package_from_bintray.rb index 4d0d9879..efda26eb 100644 --- a/providers/erlang_package_from_bintray.rb +++ b/providers/erlang_package_from_bintray.rb @@ -18,7 +18,7 @@ # limitations under the License. # -provides :erlang_package_from_bintray, platform_family: %w(debian ubuntu rhel centos fedora) +provides :erlang_package_from_bintray, platform_family: %w(debian rhel fedora) DEBIAN_PACKAGES = %w(erlang-mnesia erlang-runtime-tools erlang-asn1 erlang-crypto erlang-public-key erlang-ssl erlang-syntax-tools erlang-snmp erlang-os-mon erlang-parsetools diff --git a/providers/erlang_yum_repository_on_bintray.rb b/providers/erlang_yum_repository_on_bintray.rb index 35e84e8f..5ff981ca 100644 --- a/providers/erlang_yum_repository_on_bintray.rb +++ b/providers/erlang_yum_repository_on_bintray.rb @@ -18,7 +18,7 @@ # limitations under the License. # -provides :erlang_repository, platform_family: %w(rhel centos fedora) +provides :erlang_repository, platform_family: %w(rhel fedora) action :create do yum_repository(new_resource.name) do diff --git a/providers/erlang_zypper_repository_on_suse_factory.rb b/providers/erlang_zypper_repository_on_suse_factory.rb index 33bde901..609dc8dc 100644 --- a/providers/erlang_zypper_repository_on_suse_factory.rb +++ b/providers/erlang_zypper_repository_on_suse_factory.rb @@ -18,7 +18,7 @@ # limitations under the License. # -provides :erlang_repository, platform_family: %w(suse opensuse) +provides :erlang_repository, platform_family: %w(suse) action :create do execute 'zypper refresh' do From dbeca958fb8417e328225361d57c63b432998c75 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Tue, 10 Dec 2019 10:55:15 -0800 Subject: [PATCH 07/12] Fix bogus platform families These were all platforms not platform families Signed-off-by: Tim Smith --- providers/erlang_package_from_bintray.rb | 8 ++++---- recipes/default.rb | 5 ++--- recipes/erlang_package.rb | 8 ++++---- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/providers/erlang_package_from_bintray.rb b/providers/erlang_package_from_bintray.rb index efda26eb..3318b25f 100644 --- a/providers/erlang_package_from_bintray.rb +++ b/providers/erlang_package_from_bintray.rb @@ -26,7 +26,7 @@ erlang-dev erlang-edoc erlang-eunit erlang-erl-docgen erlang-src).freeze action :install do - if platform_family?('debian', 'ubuntu') + if platform_family?('debian') base_pkg = if new_resource.use_hipe 'erlang-base-hipe' else @@ -62,7 +62,7 @@ end end - if platform_family?('rhel', 'centos', 'scientific', 'fedora', 'amazon') + if platform_family?('rhel', 'fedora', 'amazon') package new_resource.name do package_name 'erlang' version new_resource.version unless new_resource.version.nil? @@ -74,7 +74,7 @@ end action :remove do - if platform_family?('debian', 'ubuntu') + if platform_family?('debian') base_pkg = if new_resource.use_hipe 'erlang-base-hipe' else @@ -105,7 +105,7 @@ end end - if platform_family?('rhel', 'centos', 'scientific', 'fedora', 'amazon') + if platform_family?('rhel', 'fedora', 'amazon') package new_resource.name do action :remove end diff --git a/recipes/default.rb b/recipes/default.rb index 76db97c1..f7323c5c 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -58,7 +58,6 @@ class Chef::Recipe rpm_package_name = node['rabbitmq']['rpm_package'] || default_rpm_package_name rpm_package_url = node['rabbitmq']['rpm_package_url'] || default_package_url - # see rabbitmq/chef-cookbook#351 directory node['rabbitmq']['config_root'] do owner 'root' @@ -69,7 +68,7 @@ class Chef::Recipe end ## Install the package -if platform_family?('debian', 'ubuntu') +if platform_family?('debian') template '/etc/apt/apt.conf.d/90forceyes' do source '90forceyes.erb' owner 'root' @@ -156,7 +155,7 @@ class Chef::Recipe rpm_package "#{Chef::Config[:file_cache_path]}/#{rpm_package_name}" end -if platform_family?('rhel', 'redhat', 'centos', 'scientific') # ~FC024 +if platform_family?('rhel') package 'logrotate' if node['platform_version'].to_i >= 7 package 'socat' diff --git a/recipes/erlang_package.rb b/recipes/erlang_package.rb index a00a4634..8f6ea3cb 100644 --- a/recipes/erlang_package.rb +++ b/recipes/erlang_package.rb @@ -30,7 +30,7 @@ erlang_version = node['rabbitmq']['erlang']['version'] -if platform_family?('debian', 'ubuntu') +if platform_family?('debian') rabbitmq_erlang_apt_repository_on_bintray 'rabbitmq_erlang_repo_on_bintray' do uri node['rabbitmq']['erlang']['apt']['uri'] unless node['rabbitmq']['erlang']['apt']['uri'].nil? distribution node['rabbitmq']['erlang']['apt']['lsb_codename'] if node['rabbitmq']['erlang']['apt']['lsb_codename'] @@ -48,14 +48,14 @@ end end -if platform_family?('rhel', 'centos', 'scientific') +if platform_family?('rhel') if node['platform_version'].to_i <= 5 Chef::Log.fatal('RabbitMQ package repositories are not available for EL5') raise end end -if platform_family?('rhel', 'centos', 'fedora', 'amazon', 'scientific') +if platform_family?('rhel', 'fedora', 'amazon') rabbitmq_erlang_yum_repository_on_bintray 'rabbitmq_erlang' do baseurl node['rabbitmq']['erlang']['yum']['baseurl'] gpgkey node['rabbitmq']['erlang']['yum']['gpgkey'] @@ -71,7 +71,7 @@ end end -if platform_family?('suse', 'opensuse') +if platform_family?('suse') rabbitmq_erlang_zypper_repository_on_suse_factory 'rabbitmq_erlang' do baseurl node['rabbitmq']['erlang']['zypper']['baseurl'] gpgkey node['rabbitmq']['erlang']['zypper']['gpgkey'] From d121005d4d3578b4aa5a8fa89e0b5f1f53fef1df Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Tue, 10 Dec 2019 10:57:00 -0800 Subject: [PATCH 08/12] Use the rdoc like comment header format Signed-off-by: Tim Smith --- libraries/default.rb | 2 +- providers/cluster.rb | 4 ++-- providers/erlang_apt_repository_on_bintray.rb | 4 ++-- providers/erlang_package_from_bintray.rb | 4 ++-- providers/erlang_yum_repository_on_bintray.rb | 4 ++-- providers/erlang_zypper_repository_on_suse_factory.rb | 4 ++-- providers/parameter.rb | 4 ++-- providers/plugin.rb | 6 +++--- providers/policy.rb | 4 ++-- providers/user.rb | 4 ++-- providers/vhost.rb | 4 ++-- recipes/cluster.rb | 8 ++++---- recipes/community_plugins.rb | 8 ++++---- recipes/default.rb | 10 +++++----- recipes/erlang_package.rb | 4 ++-- recipes/esl_erlang_package.rb | 2 +- recipes/management_ui.rb | 8 ++++---- recipes/mgmt_console.rb | 8 ++++---- recipes/plugin_management.rb | 8 ++++---- recipes/plugins.rb | 8 ++++---- recipes/policies.rb | 8 ++++---- recipes/policy_management.rb | 6 +++--- recipes/systemd_limits.rb | 2 +- recipes/user_management.rb | 8 ++++---- recipes/users.rb | 8 ++++---- recipes/vhosts.rb | 8 ++++---- recipes/virtualhost_management.rb | 8 ++++---- resources/cluster.rb | 6 +++--- resources/erlang_apt_repository_on_bintray.rb | 4 ++-- resources/erlang_package_from_bintray.rb | 4 ++-- resources/erlang_yum_repository_on_bintray.rb | 4 ++-- resources/erlang_zypper_repository_on_suse_factory.rb | 4 ++-- resources/parameter.rb | 4 ++-- resources/plugin.rb | 4 ++-- resources/policy.rb | 4 ++-- resources/user.rb | 4 ++-- resources/vhost.rb | 4 ++-- spec/cluster_spec.rb | 4 ++-- test/cookbooks/rabbitmq_test/recipes/cluster.rb | 4 ++-- test/cookbooks/rabbitmq_test/recipes/cook-2151-3489.rb | 2 +- test/cookbooks/rabbitmq_test/recipes/cook-openfiles.rb | 2 +- test/cookbooks/rabbitmq_test/recipes/default.rb | 6 +++--- test/cookbooks/rabbitmq_test/recipes/lwrps.rb | 4 ++-- test/cookbooks/rabbitmq_test/recipes/mgmt_console.rb | 4 ++-- 44 files changed, 112 insertions(+), 112 deletions(-) diff --git a/libraries/default.rb b/libraries/default.rb index 2d5dbb81..73a904ed 100644 --- a/libraries/default.rb +++ b/libraries/default.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true # -# Cookbook Name:: rabbitmq +# Cookbook:: rabbitmq # Library:: default # Author:: Jake Davis () # diff --git a/providers/cluster.rb b/providers/cluster.rb index 4930a049..1a840ca7 100644 --- a/providers/cluster.rb +++ b/providers/cluster.rb @@ -1,10 +1,10 @@ # frozen_string_literal: true # -# Cookbook Name:: rabbitmq +# Cookbook:: rabbitmq # Provider:: cluster # # Author: Sunggun Yu -# Copyright (C) 2015 Sunggun Yu +# Copyright:: (C) 2015 Sunggun Yu # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/providers/erlang_apt_repository_on_bintray.rb b/providers/erlang_apt_repository_on_bintray.rb index d5f6de8e..46499287 100644 --- a/providers/erlang_apt_repository_on_bintray.rb +++ b/providers/erlang_apt_repository_on_bintray.rb @@ -1,9 +1,9 @@ # frozen_string_literal: true # -# Cookbook Name:: rabbitmq +# Cookbook:: rabbitmq # Provider:: erlang_apt_repository_on_bintray # -# Copyright 2019, Pivotal Software, Inc. +# Copyright:: 2019, Pivotal Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/providers/erlang_package_from_bintray.rb b/providers/erlang_package_from_bintray.rb index 3318b25f..b5fba50b 100644 --- a/providers/erlang_package_from_bintray.rb +++ b/providers/erlang_package_from_bintray.rb @@ -1,9 +1,9 @@ # frozen_string_literal: true # -# Cookbook Name:: rabbitmq +# Cookbook:: rabbitmq # Provider:: erlang_package_from_bintray # -# Copyright 2019, Pivotal Software, Inc. +# Copyright:: 2019, Pivotal Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/providers/erlang_yum_repository_on_bintray.rb b/providers/erlang_yum_repository_on_bintray.rb index 5ff981ca..a99292c9 100644 --- a/providers/erlang_yum_repository_on_bintray.rb +++ b/providers/erlang_yum_repository_on_bintray.rb @@ -1,9 +1,9 @@ # frozen_string_literal: true # -# Cookbook Name:: rabbitmq +# Cookbook:: rabbitmq # Provider:: erlang_yum_repository_on_bintray # -# Copyright 2019, Pivotal Software, Inc. +# Copyright:: 2019, Pivotal Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/providers/erlang_zypper_repository_on_suse_factory.rb b/providers/erlang_zypper_repository_on_suse_factory.rb index 609dc8dc..2076d161 100644 --- a/providers/erlang_zypper_repository_on_suse_factory.rb +++ b/providers/erlang_zypper_repository_on_suse_factory.rb @@ -1,9 +1,9 @@ # frozen_string_literal: true # -# Cookbook Name:: rabbitmq +# Cookbook:: rabbitmq # Provider:: erlang_yum_repository_on_bintray # -# Copyright 2019, Pivotal Software, Inc. +# Copyright:: 2019, Pivotal Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/providers/parameter.rb b/providers/parameter.rb index 4db4557f..950f8a73 100644 --- a/providers/parameter.rb +++ b/providers/parameter.rb @@ -1,10 +1,10 @@ # frozen_string_literal: true # -# Cookbook Name:: rabbitmq +# Cookbook:: rabbitmq # Provider:: parameter # # Author: Sean Porter -# Copyright 2015 by Heavy Water Operations, LLC. +# Copyright:: 2015 by Heavy Water Operations, LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/providers/plugin.rb b/providers/plugin.rb index 84f4ae54..a2cda745 100644 --- a/providers/plugin.rb +++ b/providers/plugin.rb @@ -1,10 +1,10 @@ # frozen_string_literal: true # -# Cookbook Name:: rabbitmq +# Cookbook:: rabbitmq # Provider:: plugin # -# Copyright 2012-2018, Chef Software, Inc. -# Copyright 2018-2019, Pivotal Software, Inc. +# Copyright:: 2012-2018, Chef Software, Inc. +# Copyright:: 2018-2019, Pivotal Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/providers/policy.rb b/providers/policy.rb index 2ace22e7..7107acb8 100644 --- a/providers/policy.rb +++ b/providers/policy.rb @@ -1,10 +1,10 @@ # frozen_string_literal: true # -# Cookbook Name:: rabbitmq +# Cookbook:: rabbitmq # Provider:: policy # # Author: Robert Choi -# Copyright 2013 by Robert Choi +# Copyright:: 2013 by Robert Choi # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/providers/user.rb b/providers/user.rb index 77ee2f0e..9e64b323 100644 --- a/providers/user.rb +++ b/providers/user.rb @@ -1,9 +1,9 @@ # frozen_string_literal: true # -# Cookbook Name:: rabbitmq +# Cookbook:: rabbitmq # Provider:: user # -# Copyright 2011-2013, Chef Software, Inc. +# Copyright:: 2011-2013, Chef Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/providers/vhost.rb b/providers/vhost.rb index 6c36156b..9089f259 100644 --- a/providers/vhost.rb +++ b/providers/vhost.rb @@ -1,9 +1,9 @@ # frozen_string_literal: true # -# Cookbook Name:: rabbitmq +# Cookbook:: rabbitmq # Provider:: vhost # -# Copyright 2011-2013, Chef Software, Inc. +# Copyright:: 2011-2013, Chef Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/recipes/cluster.rb b/recipes/cluster.rb index fc4a6412..575eda40 100644 --- a/recipes/cluster.rb +++ b/recipes/cluster.rb @@ -1,12 +1,12 @@ # frozen_string_literal: true # -# Cookbook Name:: rabbitmq +# Cookbook:: rabbitmq # Recipe:: cluster # # Author: Sunggun Yu -# Copyright 2015 Sunggun Yu -# Copyright 2013-2018, Chef Software, Inc. -# Copyright 2018-2019, Pivotal Software, Inc. +# Copyright:: 2015 Sunggun Yu +# Copyright:: 2013-2018, Chef Software, Inc. +# Copyright:: 2018-2019, Pivotal Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/recipes/community_plugins.rb b/recipes/community_plugins.rb index a5300931..1753f060 100644 --- a/recipes/community_plugins.rb +++ b/recipes/community_plugins.rb @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- # frozen_string_literal: true # -# Cookbook Name:: rabbitmq +# Cookbook:: rabbitmq # Recipe:: community_plugins # -# Copyright 2013, Grégoire Seux -# Copyright 2013-2018, Chef Software, Inc. -# Copyright 2018-2019, Pivotal Software, Inc. +# Copyright:: 2013, Grégoire Seux +# Copyright:: 2013-2018, Chef Software, Inc. +# Copyright:: 2018-2019, Pivotal Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/recipes/default.rb b/recipes/default.rb index f7323c5c..6c7da22b 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -1,12 +1,12 @@ # frozen_string_literal: true # -# Cookbook Name:: rabbitmq +# Cookbook:: rabbitmq # Recipe:: default # -# Copyright 2009, Benjamin Black -# Copyright 2009-2013, Chef Software, Inc. -# Copyright 2012, Kevin Nuckolls -# Copyright 2016-2019, Pivotal Software, Inc +# Copyright:: 2009, Benjamin Black +# Copyright:: 2009-2013, Chef Software, Inc. +# Copyright:: 2012, Kevin Nuckolls +# Copyright:: 2016-2019, Pivotal Software, Inc # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/recipes/erlang_package.rb b/recipes/erlang_package.rb index 8f6ea3cb..aa207f90 100644 --- a/recipes/erlang_package.rb +++ b/recipes/erlang_package.rb @@ -1,12 +1,12 @@ # frozen_string_literal: true # -# Cookbook Name:: rabbitmq +# Cookbook:: rabbitmq # Recipe:: erlang_package # # Provisions Erlang via RabbitMQ's own # packages for Debian and CentOS. # -# Copyright 2019, Pivotal Software, Inc +# Copyright:: 2019, Pivotal Software, Inc # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/recipes/esl_erlang_package.rb b/recipes/esl_erlang_package.rb index 9a2a5ca8..19898664 100644 --- a/recipes/esl_erlang_package.rb +++ b/recipes/esl_erlang_package.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true # -# Cookbook Name:: rabbitmq +# Cookbook:: rabbitmq # Recipe:: esl_erlang_package # # A convenience recipe for provisioning Erlang from diff --git a/recipes/management_ui.rb b/recipes/management_ui.rb index e9d26c61..9968f802 100644 --- a/recipes/management_ui.rb +++ b/recipes/management_ui.rb @@ -1,11 +1,11 @@ # frozen_string_literal: true # -# Cookbook Name:: rabbitmq +# Cookbook:: rabbitmq # Recipe:: mgmt_console # -# Copyright 2012, Tacit Knowledge, Inc. -# Copyright 2013-2018, Chef Software, Inc. -# Copyright 2018-2019, Pivotal Software, Inc. +# Copyright:: 2012, Tacit Knowledge, Inc. +# Copyright:: 2013-2018, Chef Software, Inc. +# Copyright:: 2018-2019, Pivotal Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/recipes/mgmt_console.rb b/recipes/mgmt_console.rb index 1fdcca5d..1506cd3b 100644 --- a/recipes/mgmt_console.rb +++ b/recipes/mgmt_console.rb @@ -1,11 +1,11 @@ # frozen_string_literal: true # -# Cookbook Name:: rabbitmq +# Cookbook:: rabbitmq # Recipe:: mgmt_console # -# Copyright 2012, Tacit Knowledge, Inc. -# Copyright 2013-2018, Chef Software, Inc. -# Copyright 2018-2019, Pivotal Software, Inc. +# Copyright:: 2012, Tacit Knowledge, Inc. +# Copyright:: 2013-2018, Chef Software, Inc. +# Copyright:: 2018-2019, Pivotal Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/recipes/plugin_management.rb b/recipes/plugin_management.rb index 54251550..af42fe1d 100644 --- a/recipes/plugin_management.rb +++ b/recipes/plugin_management.rb @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- # frozen_string_literal: true # -# Cookbook Name:: rabbitmq +# Cookbook:: rabbitmq # Recipe:: plugin_management # -# Copyright 2013, Grégoire Seux -# Copyright 2013-2018, Chef Software, Inc. -# Copyright 2018-2019, Pivotal Software, Inc. +# Copyright:: 2013, Grégoire Seux +# Copyright:: 2013-2018, Chef Software, Inc. +# Copyright:: 2018-2019, Pivotal Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/recipes/plugins.rb b/recipes/plugins.rb index e85ceebf..0bddfc68 100644 --- a/recipes/plugins.rb +++ b/recipes/plugins.rb @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- # frozen_string_literal: true # -# Cookbook Name:: rabbitmq +# Cookbook:: rabbitmq # Recipe:: plugins # -# Copyright 2013, Grégoire Seux -# Copyright 2013-2018, Chef Software, Inc. -# Copyright 2018-2019, Pivotal Software, Inc. +# Copyright:: 2013, Grégoire Seux +# Copyright:: 2013-2018, Chef Software, Inc. +# Copyright:: 2018-2019, Pivotal Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/recipes/policies.rb b/recipes/policies.rb index a98de6c8..deccf9f7 100644 --- a/recipes/policies.rb +++ b/recipes/policies.rb @@ -1,12 +1,12 @@ # frozen_string_literal: true # -# Cookbook Name:: rabbitmq +# Cookbook:: rabbitmq # Recipe:: policies # # Author: Robert Choi -# Copyright 2013 by Robert Choi -# Copyright 2013-2018, Chef Software, Inc. -# Copyright 2018-2019, Pivotal Software, Inc. +# Copyright:: 2013 by Robert Choi +# Copyright:: 2013-2018, Chef Software, Inc. +# Copyright:: 2018-2019, Pivotal Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/recipes/policy_management.rb b/recipes/policy_management.rb index f28be8d3..3ef153b8 100644 --- a/recipes/policy_management.rb +++ b/recipes/policy_management.rb @@ -1,11 +1,11 @@ # frozen_string_literal: true # -# Cookbook Name:: rabbitmq +# Cookbook:: rabbitmq # Recipe:: policy_management # # Author: Robert Choi -# Copyright 2013 by Robert Choi -# Copyright 2013, Chef Software, Inc. +# Copyright:: 2013 by Robert Choi +# Copyright:: 2013, Chef Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/recipes/systemd_limits.rb b/recipes/systemd_limits.rb index 5f6cce84..778b9534 100644 --- a/recipes/systemd_limits.rb +++ b/recipes/systemd_limits.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true # -# Cookbook Name:: rabbitmq +# Cookbook:: rabbitmq # Recipe:: systemd_limits # # Configures kernel limits on systemd-based distributions diff --git a/recipes/user_management.rb b/recipes/user_management.rb index fb05c4fb..19b275cb 100644 --- a/recipes/user_management.rb +++ b/recipes/user_management.rb @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- # frozen_string_literal: true # -# Cookbook Name:: rabbitmq +# Cookbook:: rabbitmq # Recipe:: user_management # -# Copyright 2013, Grégoire Seux -# Copyright 2013-2018, Chef Software, Inc. -# Copyright 2018-2019, Pivotal Software, Inc. +# Copyright:: 2013, Grégoire Seux +# Copyright:: 2013-2018, Chef Software, Inc. +# Copyright:: 2018-2019, Pivotal Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/recipes/users.rb b/recipes/users.rb index 9dd90c5f..b3d860e6 100644 --- a/recipes/users.rb +++ b/recipes/users.rb @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- # frozen_string_literal: true # -# Cookbook Name:: rabbitmq +# Cookbook:: rabbitmq # Recipe:: users # -# Copyright 2013, Grégoire Seux -# Copyright 2013-2018, Chef Software, Inc. -# Copyright 2018-2019, Pivotal Software, Inc. +# Copyright:: 2013, Grégoire Seux +# Copyright:: 2013-2018, Chef Software, Inc. +# Copyright:: 2018-2019, Pivotal Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/recipes/vhosts.rb b/recipes/vhosts.rb index fc56ef94..661397d5 100644 --- a/recipes/vhosts.rb +++ b/recipes/vhosts.rb @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- # frozen_string_literal: true # -# Cookbook Name:: rabbitmq +# Cookbook:: rabbitmq # Recipe:: vhosts # -# Copyright 2013, Grégoire Seux -# Copyright 2013-2018, Chef Software, Inc. -# Copyright 2018-2019, Pivotal Software, Inc. +# Copyright:: 2013, Grégoire Seux +# Copyright:: 2013-2018, Chef Software, Inc. +# Copyright:: 2018-2019, Pivotal Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/recipes/virtualhost_management.rb b/recipes/virtualhost_management.rb index 6ae45afa..fe839b13 100644 --- a/recipes/virtualhost_management.rb +++ b/recipes/virtualhost_management.rb @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- # frozen_string_literal: true # -# Cookbook Name:: rabbitmq +# Cookbook:: rabbitmq # Recipe:: virtualhost_management # -# Copyright 2013, Grégoire Seux -# Copyright 2013-2018, Chef Software, Inc. -# Copyright 2018-2019, Pivotal Software, Inc. +# Copyright:: 2013, Grégoire Seux +# Copyright:: 2013-2018, Chef Software, Inc. +# Copyright:: 2018-2019, Pivotal Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/resources/cluster.rb b/resources/cluster.rb index c3a0a214..202d75de 100644 --- a/resources/cluster.rb +++ b/resources/cluster.rb @@ -1,11 +1,11 @@ # frozen_string_literal: true # -# Cookbook Name:: rabbitmq +# Cookbook:: rabbitmq # Resource:: cluster # # Author: Sunggun Yu -# Copyright (C) 2015 Sunggun Yu -# Copyright (C) 2015-2018 Contributors +# Copyright:: (C) 2015 Sunggun Yu +# Copyright:: (C) 2015-2018 Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/resources/erlang_apt_repository_on_bintray.rb b/resources/erlang_apt_repository_on_bintray.rb index 51dd3d2b..836e7fce 100644 --- a/resources/erlang_apt_repository_on_bintray.rb +++ b/resources/erlang_apt_repository_on_bintray.rb @@ -1,9 +1,9 @@ # frozen_string_literal: true # -# Cookbook Name:: rabbitmq +# Cookbook:: rabbitmq # Resource:: erlang_apt_repository_on_bintray # -# Copyright 2019, Pivotal Software, Inc. +# Copyright:: 2019, Pivotal Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/resources/erlang_package_from_bintray.rb b/resources/erlang_package_from_bintray.rb index f91bd4dd..c4aa0341 100644 --- a/resources/erlang_package_from_bintray.rb +++ b/resources/erlang_package_from_bintray.rb @@ -1,9 +1,9 @@ # frozen_string_literal: true # -# Cookbook Name:: rabbitmq +# Cookbook:: rabbitmq # Resource:: erlang_package_from_bintray # -# Copyright 2019, Pivotal Software, Inc. +# Copyright:: 2019, Pivotal Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/resources/erlang_yum_repository_on_bintray.rb b/resources/erlang_yum_repository_on_bintray.rb index e41f4b04..38aae565 100644 --- a/resources/erlang_yum_repository_on_bintray.rb +++ b/resources/erlang_yum_repository_on_bintray.rb @@ -1,9 +1,9 @@ # frozen_string_literal: true # -# Cookbook Name:: rabbitmq +# Cookbook:: rabbitmq # Resource:: erlang_yum_repository_on_bintray # -# Copyright 2019, Pivotal Software, Inc. +# Copyright:: 2019, Pivotal Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/resources/erlang_zypper_repository_on_suse_factory.rb b/resources/erlang_zypper_repository_on_suse_factory.rb index f418f9e3..2083d10f 100644 --- a/resources/erlang_zypper_repository_on_suse_factory.rb +++ b/resources/erlang_zypper_repository_on_suse_factory.rb @@ -1,9 +1,9 @@ # frozen_string_literal: true # -# Cookbook Name:: rabbitmq +# Cookbook:: rabbitmq # Resource:: erlang_zypper_repository_on_suse_factory # -# Copyright 2019, Pivotal Software, Inc. +# Copyright:: 2019, Pivotal Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/resources/parameter.rb b/resources/parameter.rb index 0c4249ed..c6ecc194 100644 --- a/resources/parameter.rb +++ b/resources/parameter.rb @@ -1,10 +1,10 @@ # frozen_string_literal: true # -# Cookbook Name:: rabbitmq +# Cookbook:: rabbitmq # Resource:: parameter # # Author: Sean Porter -# Copyright 2015 by Sean Porter +# Copyright:: 2015 by Sean Porter # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/resources/plugin.rb b/resources/plugin.rb index 48cada09..e0d0880e 100644 --- a/resources/plugin.rb +++ b/resources/plugin.rb @@ -1,9 +1,9 @@ # frozen_string_literal: true # -# Cookbook Name:: rabbitmq +# Cookbook:: rabbitmq # Resource:: plugin # -# Copyright 2011, Chef Software, Inc. +# Copyright:: 2011, Chef Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/resources/policy.rb b/resources/policy.rb index 596535fa..e448ddd1 100644 --- a/resources/policy.rb +++ b/resources/policy.rb @@ -1,10 +1,10 @@ # frozen_string_literal: true # -# Cookbook Name:: rabbitmq +# Cookbook:: rabbitmq # Resource:: policy # # Author: Robert Choi -# Copyright 2013 by Robert Choi +# Copyright:: 2013 by Robert Choi # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/resources/user.rb b/resources/user.rb index 4e463d6a..ff94b210 100644 --- a/resources/user.rb +++ b/resources/user.rb @@ -1,9 +1,9 @@ # frozen_string_literal: true # -# Cookbook Name:: rabbitmq +# Cookbook:: rabbitmq # Resource:: user # -# Copyright 2011-2013, Chef Software, Inc. +# Copyright:: 2011-2013, Chef Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/resources/vhost.rb b/resources/vhost.rb index 76cad764..d4fe5320 100644 --- a/resources/vhost.rb +++ b/resources/vhost.rb @@ -1,9 +1,9 @@ # frozen_string_literal: true # -# Cookbook Name:: rabbitmq +# Cookbook:: rabbitmq # Resource:: vhost # -# Copyright 2011, Chef Software, Inc. +# Copyright:: 2011, Chef Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/spec/cluster_spec.rb b/spec/cluster_spec.rb index 9c621e0d..f773e0f0 100644 --- a/spec/cluster_spec.rb +++ b/spec/cluster_spec.rb @@ -1,10 +1,10 @@ # frozen_string_literal: true # -# Cookbook Name:: rabbitmq +# Cookbook:: rabbitmq # Spec:: cluster # # Author: Sunggun Yu -# Copyright (C) 2015 Sunggun Yu +# Copyright:: (C) 2015 Sunggun Yu # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/cookbooks/rabbitmq_test/recipes/cluster.rb b/test/cookbooks/rabbitmq_test/recipes/cluster.rb index 4d8ec3d6..352fbc1e 100644 --- a/test/cookbooks/rabbitmq_test/recipes/cluster.rb +++ b/test/cookbooks/rabbitmq_test/recipes/cluster.rb @@ -1,9 +1,9 @@ # frozen_string_literal: true # -# Cookbook Name:: rabbitmq_test +# Cookbook:: rabbitmq_test # Recipe:: cluster # -# Copyright 2012, Chef Software, Inc. +# Copyright:: 2012-2019, Chef Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/cookbooks/rabbitmq_test/recipes/cook-2151-3489.rb b/test/cookbooks/rabbitmq_test/recipes/cook-2151-3489.rb index d00ce9d3..90923ca2 100644 --- a/test/cookbooks/rabbitmq_test/recipes/cook-2151-3489.rb +++ b/test/cookbooks/rabbitmq_test/recipes/cook-2151-3489.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true # -# Cookbook Name:: rabbitmq_test +# Cookbook:: rabbitmq_test # Recipe:: cook-2151-3489 # # This recipe exists to ensure that minitest tests are run. diff --git a/test/cookbooks/rabbitmq_test/recipes/cook-openfiles.rb b/test/cookbooks/rabbitmq_test/recipes/cook-openfiles.rb index 818f9c58..982fab2f 100644 --- a/test/cookbooks/rabbitmq_test/recipes/cook-openfiles.rb +++ b/test/cookbooks/rabbitmq_test/recipes/cook-openfiles.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true # -# Cookbook Name:: rabbitmq_test +# Cookbook:: rabbitmq_test # Recipe:: cook-openfiles # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/test/cookbooks/rabbitmq_test/recipes/default.rb b/test/cookbooks/rabbitmq_test/recipes/default.rb index 758a9a85..8ec7c517 100644 --- a/test/cookbooks/rabbitmq_test/recipes/default.rb +++ b/test/cookbooks/rabbitmq_test/recipes/default.rb @@ -1,10 +1,10 @@ # frozen_string_literal: true # -# Cookbook Name:: rabbitmq_test +# Cookbook:: rabbitmq_test # Recipe:: default # -# Copyright 2012-2017, Chef Software, Inc. -# Copyright 2017-2019, Pivotal Software, Inc. +# Copyright:: 2012-2017, Chef Software, Inc. +# Copyright:: 2017-2019, Pivotal Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/cookbooks/rabbitmq_test/recipes/lwrps.rb b/test/cookbooks/rabbitmq_test/recipes/lwrps.rb index 6796d865..f081aaed 100644 --- a/test/cookbooks/rabbitmq_test/recipes/lwrps.rb +++ b/test/cookbooks/rabbitmq_test/recipes/lwrps.rb @@ -1,9 +1,9 @@ # frozen_string_literal: true # -# Cookbook Name:: rabbitmq_test +# Cookbook:: rabbitmq_test # Recipe:: lwrps # -# Copyright 2013, Chef Software, Inc. +# Copyright:: 2013, Chef Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/cookbooks/rabbitmq_test/recipes/mgmt_console.rb b/test/cookbooks/rabbitmq_test/recipes/mgmt_console.rb index d8a0c42d..244fe857 100644 --- a/test/cookbooks/rabbitmq_test/recipes/mgmt_console.rb +++ b/test/cookbooks/rabbitmq_test/recipes/mgmt_console.rb @@ -1,9 +1,9 @@ # frozen_string_literal: true # -# Cookbook Name:: rabbitmq_test +# Cookbook:: rabbitmq_test # Recipe:: mgmt_console # -# Copyright 2012-2013, Chef Software, Inc. +# Copyright:: 2012-2013, Chef Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. From 3e33406f10b002177363363d83a6c2c5ce9524a4 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Tue, 10 Dec 2019 10:57:23 -0800 Subject: [PATCH 09/12] Use node.override in the specs node.normal doesn't make sense here Signed-off-by: Tim Smith --- spec/community_plugins_spec.rb | 2 +- spec/policies_spec.rb | 12 ++++++------ test/cookbooks/rabbitmq_test/recipes/cluster.rb | 2 +- .../rabbitmq_test/recipes/cook-openfiles.rb | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/spec/community_plugins_spec.rb b/spec/community_plugins_spec.rb index 6020e4e1..706266ac 100644 --- a/spec/community_plugins_spec.rb +++ b/spec/community_plugins_spec.rb @@ -5,7 +5,7 @@ let(:runner) { ChefSpec::ServerRunner.new(REDHAT_OPTS) } let(:node) { runner.node } let(:chef_run) do - node.normal['rabbitmq']['community_plugins'] = { 'rabbitmq_community_plugin' => 'http://sample.com/rabbitmq_community_plugin.ez' } + node.override['rabbitmq']['community_plugins'] = { 'rabbitmq_community_plugin' => 'http://sample.com/rabbitmq_community_plugin.ez' } runner.converge(described_recipe) end diff --git a/spec/policies_spec.rb b/spec/policies_spec.rb index faf95a95..64b04a1e 100644 --- a/spec/policies_spec.rb +++ b/spec/policies_spec.rb @@ -5,12 +5,12 @@ let(:runner) { ChefSpec::ServerRunner.new(REDHAT_OPTS) } let(:node) { runner.node } let(:chef_run) do - node.normal['rabbitmq']['policies']['ha-all']['pattern'] = '^(?!amq\\.).*' - node.normal['rabbitmq']['policies']['ha-all']['params'] = { 'ha-mode' => 'all' } - node.normal['rabbitmq']['policies']['ha-all']['priority'] = 0 - node.normal['rabbitmq']['policies']['ha-two']['pattern'] = '^two.' - node.normal['rabbitmq']['policies']['ha-two']['params'] = { 'ha-mode' => 'exactly', 'ha-params' => 2 } - node.normal['rabbitmq']['policies']['ha-two']['priority'] = 1 + node.override['rabbitmq']['policies']['ha-all']['pattern'] = '^(?!amq\\.).*' + node.override['rabbitmq']['policies']['ha-all']['params'] = { 'ha-mode' => 'all' } + node.override['rabbitmq']['policies']['ha-all']['priority'] = 0 + node.override['rabbitmq']['policies']['ha-two']['pattern'] = '^two.' + node.override['rabbitmq']['policies']['ha-two']['params'] = { 'ha-mode' => 'exactly', 'ha-params' => 2 } + node.override['rabbitmq']['policies']['ha-two']['priority'] = 1 runner.converge(described_recipe) end diff --git a/test/cookbooks/rabbitmq_test/recipes/cluster.rb b/test/cookbooks/rabbitmq_test/recipes/cluster.rb index 352fbc1e..23d7387d 100644 --- a/test/cookbooks/rabbitmq_test/recipes/cluster.rb +++ b/test/cookbooks/rabbitmq_test/recipes/cluster.rb @@ -19,5 +19,5 @@ # # 2017, @rmoriz, this is broken and probably never worked -node.normal['rabbitmq']['cluster'] = true +node.override['rabbitmq']['cluster'] = true include_recipe 'rabbitmq::default' diff --git a/test/cookbooks/rabbitmq_test/recipes/cook-openfiles.rb b/test/cookbooks/rabbitmq_test/recipes/cook-openfiles.rb index 982fab2f..af07a71a 100644 --- a/test/cookbooks/rabbitmq_test/recipes/cook-openfiles.rb +++ b/test/cookbooks/rabbitmq_test/recipes/cook-openfiles.rb @@ -16,7 +16,7 @@ # limitations under the License. # -node.normal['rabbitmq']['open_file_limit'] = 2048 +node.override['rabbitmq']['open_file_limit'] = 2048 include_recipe 'rabbitmq::default' # HACK: Give rabbit time to spin up before the tests, it seems From c58bf9df1d65bb4c3f113e0c3557b47feecd4a6c Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Tue, 10 Dec 2019 10:57:40 -0800 Subject: [PATCH 10/12] Don't define the actions in the resources this comes for free Signed-off-by: Tim Smith --- resources/cluster.rb | 2 -- resources/erlang_apt_repository_on_bintray.rb | 2 -- resources/erlang_package_from_bintray.rb | 2 -- resources/erlang_yum_repository_on_bintray.rb | 2 -- resources/erlang_zypper_repository_on_suse_factory.rb | 2 -- resources/parameter.rb | 2 -- resources/plugin.rb | 2 -- resources/policy.rb | 2 -- resources/user.rb | 2 -- resources/vhost.rb | 2 -- 10 files changed, 20 deletions(-) diff --git a/resources/cluster.rb b/resources/cluster.rb index 202d75de..64725fcb 100644 --- a/resources/cluster.rb +++ b/resources/cluster.rb @@ -20,8 +20,6 @@ # limitations under the License. # -actions :join, :set_cluster_name, :change_cluster_node_type - default_action :join # the elements must be hashes with 2 keys: node name and type (disc or ram) diff --git a/resources/erlang_apt_repository_on_bintray.rb b/resources/erlang_apt_repository_on_bintray.rb index 836e7fce..0dd8dd5b 100644 --- a/resources/erlang_apt_repository_on_bintray.rb +++ b/resources/erlang_apt_repository_on_bintray.rb @@ -17,8 +17,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # - -actions :add, :remove default_action :add attribute :name, String, name_attribute: true diff --git a/resources/erlang_package_from_bintray.rb b/resources/erlang_package_from_bintray.rb index c4aa0341..2c62ffec 100644 --- a/resources/erlang_package_from_bintray.rb +++ b/resources/erlang_package_from_bintray.rb @@ -17,8 +17,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # - -actions :install, :remove default_action :install attribute :name, String, name_attribute: true diff --git a/resources/erlang_yum_repository_on_bintray.rb b/resources/erlang_yum_repository_on_bintray.rb index 38aae565..52a24d88 100644 --- a/resources/erlang_yum_repository_on_bintray.rb +++ b/resources/erlang_yum_repository_on_bintray.rb @@ -17,8 +17,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # - -actions :create, :remove default_action :create attribute :name, String, name_attribute: true diff --git a/resources/erlang_zypper_repository_on_suse_factory.rb b/resources/erlang_zypper_repository_on_suse_factory.rb index 2083d10f..23c2b913 100644 --- a/resources/erlang_zypper_repository_on_suse_factory.rb +++ b/resources/erlang_zypper_repository_on_suse_factory.rb @@ -17,8 +17,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # - -actions :create, :remove default_action :create attribute :name, String, name_attribute: true diff --git a/resources/parameter.rb b/resources/parameter.rb index c6ecc194..8fdb8989 100644 --- a/resources/parameter.rb +++ b/resources/parameter.rb @@ -18,8 +18,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # - -actions :set, :clear, :list default_action :set attribute :parameter, kind_of: String, name_attribute: true diff --git a/resources/plugin.rb b/resources/plugin.rb index e0d0880e..c4ecbddc 100644 --- a/resources/plugin.rb +++ b/resources/plugin.rb @@ -17,8 +17,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # - -actions :enable, :disable default_action :enable attribute :plugin, kind_of: String, name_attribute: true diff --git a/resources/policy.rb b/resources/policy.rb index e448ddd1..4622d533 100644 --- a/resources/policy.rb +++ b/resources/policy.rb @@ -18,8 +18,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # - -actions :set, :clear, :list default_action :set attribute :policy, kind_of: String, name_attribute: true diff --git a/resources/user.rb b/resources/user.rb index ff94b210..b4154980 100644 --- a/resources/user.rb +++ b/resources/user.rb @@ -17,8 +17,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # - -actions :add, :delete, :set_permissions, :clear_permissions, :set_tags, :clear_tags, :change_password default_action :add attribute :user, kind_of: String, name_attribute: true diff --git a/resources/vhost.rb b/resources/vhost.rb index d4fe5320..fe13a339 100644 --- a/resources/vhost.rb +++ b/resources/vhost.rb @@ -17,8 +17,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # - -actions :add, :delete default_action :add attribute :vhost, kind_of: String, name_attribute: true From e914dcf4597d72650d9e869c2585d1d11ca1ce3a Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Tue, 10 Dec 2019 10:58:29 -0800 Subject: [PATCH 11/12] Use strings for file modes This makes it more clear what you're actually trying to set since 0755 is 755 in ruby land Signed-off-by: Tim Smith --- recipes/community_plugins.rb | 2 +- recipes/default.rb | 10 +++++----- recipes/systemd_limits.rb | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/recipes/community_plugins.rb b/recipes/community_plugins.rb index 1753f060..e34c7a3c 100644 --- a/recipes/community_plugins.rb +++ b/recipes/community_plugins.rb @@ -30,7 +30,7 @@ source download_url owner 'rabbitmq' group 'rabbitmq' - mode 0644 + mode '644' end rabbitmq_plugin plugin do diff --git a/recipes/default.rb b/recipes/default.rb index 6c7da22b..8d89f9d1 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -128,7 +128,7 @@ class Chef::Recipe source 'rabbitmq.upstart.conf.erb' owner 'root' group 'root' - mode 0644 + mode '644' variables(max_file_descriptors: node['rabbitmq']['max_file_descriptors']) end end @@ -279,7 +279,7 @@ class Chef::Recipe cookbook node['rabbitmq']['config-env_template_cookbook'] owner 'root' group 'root' - mode 00644 + mode '644' notifies :restart, "service[#{node['rabbitmq']['service_name']}]" variables( config_path: rabbitmq_config_file_path @@ -292,7 +292,7 @@ class Chef::Recipe cookbook node['rabbitmq']['config_template_cookbook'] owner 'root' group 'root' - mode 00644 + mode '644' variables( kernel: format_kernel_parameters, ssl_versions: (format_ssl_versions if node['rabbitmq']['ssl_versions']), @@ -305,7 +305,7 @@ class Chef::Recipe source 'default.rabbitmq-server.erb' owner 'root' group 'root' - mode 00644 + mode '644' notifies :restart, "service[#{node['rabbitmq']['service_name']}]" end @@ -324,7 +324,7 @@ class Chef::Recipe source 'doterlang.cookie.erb' owner 'rabbitmq' group 'rabbitmq' - mode 00400 + mode '400' sensitive true notifies :start, "service[#{node['rabbitmq']['service_name']}]", :immediately notifies :run, 'execute[reset-node]', :immediately diff --git a/recipes/systemd_limits.rb b/recipes/systemd_limits.rb index 778b9534..f1204c47 100644 --- a/recipes/systemd_limits.rb +++ b/recipes/systemd_limits.rb @@ -37,7 +37,7 @@ cookbook node['rabbitmq']['config-env_template_cookbook'] owner 'root' group 'root' - mode 00644 + mode '644' notifies :run, 'execute[systemctl daemon-reload]', :immediately notifies :restart, "service[#{node['rabbitmq']['service_name']}]" end From 7d676911d8d01697c5e8e0464da527b1c773781f Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Tue, 10 Dec 2019 10:59:32 -0800 Subject: [PATCH 12/12] Use a SPDX compliant license string in test Signed-off-by: Tim Smith --- attributes/default.rb | 2 +- test/cookbooks/rabbitmq_test/metadata.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/attributes/default.rb b/attributes/default.rb index 186b30b9..c59156ce 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -138,7 +138,7 @@ # rabbitmq_auth_backend_cache default['rabbitmq']['auth']['cache']['enabled'] = false -default['rabbitmq']['auth']['cache']['conf'] = {} +default['rabbitmq']['auth']['cache']['conf'] = {} # TLS default['rabbitmq']['ssl'] = false diff --git a/test/cookbooks/rabbitmq_test/metadata.rb b/test/cookbooks/rabbitmq_test/metadata.rb index 14f155af..9c84578d 100644 --- a/test/cookbooks/rabbitmq_test/metadata.rb +++ b/test/cookbooks/rabbitmq_test/metadata.rb @@ -2,7 +2,7 @@ name 'rabbitmq_test' maintainer 'Chef Software, Inc.' maintainer_email 'cookbooks@chef.io' -license 'Apache 2.0' +license 'Apache-2.0' description 'This cookbook is used with test-kitchen to test the parent, rabbitmq cookbook.' version '1.0.0'