From cf939baa6c91443bb52ea600213d990eb4302621 Mon Sep 17 00:00:00 2001 From: Mark Vanderwiel Date: Fri, 29 May 2015 12:06:02 -0500 Subject: [PATCH] Cleanup minor rubocop offenses Cleaned up all the minor rubocop issues, the ones left relate to complex logic and what I think is a bug in rubocop for nested vs compact modules/class definitions. Change-Id: I455efbb3f2c97a21dc16d4a9d7909afeaae18565 --- .rubocop_todo.yml | 24 +----------------------- metadata.rb | 14 +++++++------- spec/rabbitmq-server-redhat_spec.rb | 1 - spec/spec_helper.rb | 6 +++--- 4 files changed, 11 insertions(+), 34 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 79a8e96..1c3afe5 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,5 +1,5 @@ # This configuration was generated by `rubocop --auto-gen-config` -# on 2015-02-27 14:19:29 -0600 using RuboCop version 0.29.1. +# on 2015-05-29 12:05:34 -0500 using RuboCop version 0.29.1. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new @@ -9,25 +9,3 @@ # Configuration parameters: EnforcedStyle, SupportedStyles. Style/ClassAndModuleChildren: Enabled: false - -# Offense count: 1 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -Style/EmptyLinesAroundBlockBody: - Enabled: false - -# Offense count: 2 -# Cop supports --auto-correct. -Style/IndentArray: - Enabled: false - -# Offense count: 1 -# Cop supports --auto-correct. -# Configuration parameters: PreferredDelimiters. -Style/PercentLiteralDelimiters: - Enabled: false - -# Offense count: 5 -# Cop supports --auto-correct. -Style/SingleSpaceBeforeFirstArg: - Enabled: false diff --git a/metadata.rb b/metadata.rb index 18be3f5..bf62b14 100644 --- a/metadata.rb +++ b/metadata.rb @@ -1,17 +1,17 @@ # encoding: UTF-8 -name 'openstack-ops-messaging' -maintainer 'openstack-chef' +name 'openstack-ops-messaging' +maintainer 'openstack-chef' maintainer_email 'opscode-chef-openstack@googlegroups.com' -license 'Apache 2.0' -description 'Provides the shared messaging configuration for Chef for OpenStack.' -version '11.0.0' +license 'Apache 2.0' +description 'Provides the shared messaging configuration for Chef for OpenStack.' +version '11.0.0' recipe 'server', 'Installs and configures server packages for messaging queue used by the deployment.' recipe 'rabbitmq-server', 'Installs and configures RabbitMQ and is called via the server recipe' -%w{ fedora ubuntu redhat centos suse }.each do |os| +%w(fedora ubuntu redhat centos suse).each do |os| supports os end depends 'openstack-common', '>= 11.0.0' -depends 'rabbitmq', '~> 3.12' +depends 'rabbitmq', '~> 3.13' diff --git a/spec/rabbitmq-server-redhat_spec.rb b/spec/rabbitmq-server-redhat_spec.rb index 708c58b..7ad31a0 100644 --- a/spec/rabbitmq-server-redhat_spec.rb +++ b/spec/rabbitmq-server-redhat_spec.rb @@ -12,6 +12,5 @@ describe 'openstack-ops-messaging::rabbitmq-server' do it 'does not set use_distro_version to true' do expect(chef_run.node['rabbitmq']['use_distro_version']).to_not be_truthy end - end end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 5288700..784c8ce 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -32,9 +32,9 @@ shared_context 'ops_messaging_stubs' do allow_any_instance_of(Chef::Recipe).to receive(:search) .with(:node, 'roles:os-ops-messaging AND chef_environment:_default') .and_return [ - { 'hostname' => 'host2' }, - { 'hostname' => 'host1' } - ] + { 'hostname' => 'host2' }, + { 'hostname' => 'host1' } + ] allow_any_instance_of(Chef::Recipe).to receive(:get_password) .with('user', anything) .and_return 'rabbit-pass'