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
This commit is contained in:
parent
a81078a2d0
commit
cf939baa6c
|
@ -1,5 +1,5 @@
|
||||||
# This configuration was generated by `rubocop --auto-gen-config`
|
# 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
|
# The point is for the user to remove these configuration records
|
||||||
# one by one as the offenses are removed from the code base.
|
# one by one as the offenses are removed from the code base.
|
||||||
# Note that changes in the inspected code, or installation of new
|
# Note that changes in the inspected code, or installation of new
|
||||||
|
@ -9,25 +9,3 @@
|
||||||
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
Style/ClassAndModuleChildren:
|
Style/ClassAndModuleChildren:
|
||||||
Enabled: false
|
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
|
|
||||||
|
|
14
metadata.rb
14
metadata.rb
|
@ -1,17 +1,17 @@
|
||||||
# encoding: UTF-8
|
# encoding: UTF-8
|
||||||
name 'openstack-ops-messaging'
|
name 'openstack-ops-messaging'
|
||||||
maintainer 'openstack-chef'
|
maintainer 'openstack-chef'
|
||||||
maintainer_email 'opscode-chef-openstack@googlegroups.com'
|
maintainer_email 'opscode-chef-openstack@googlegroups.com'
|
||||||
license 'Apache 2.0'
|
license 'Apache 2.0'
|
||||||
description 'Provides the shared messaging configuration for Chef for OpenStack.'
|
description 'Provides the shared messaging configuration for Chef for OpenStack.'
|
||||||
version '11.0.0'
|
version '11.0.0'
|
||||||
|
|
||||||
recipe 'server', 'Installs and configures server packages for messaging queue used by the deployment.'
|
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'
|
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
|
supports os
|
||||||
end
|
end
|
||||||
|
|
||||||
depends 'openstack-common', '>= 11.0.0'
|
depends 'openstack-common', '>= 11.0.0'
|
||||||
depends 'rabbitmq', '~> 3.12'
|
depends 'rabbitmq', '~> 3.13'
|
||||||
|
|
|
@ -12,6 +12,5 @@ describe 'openstack-ops-messaging::rabbitmq-server' do
|
||||||
it 'does not set use_distro_version to true' do
|
it 'does not set use_distro_version to true' do
|
||||||
expect(chef_run.node['rabbitmq']['use_distro_version']).to_not be_truthy
|
expect(chef_run.node['rabbitmq']['use_distro_version']).to_not be_truthy
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -32,9 +32,9 @@ shared_context 'ops_messaging_stubs' do
|
||||||
allow_any_instance_of(Chef::Recipe).to receive(:search)
|
allow_any_instance_of(Chef::Recipe).to receive(:search)
|
||||||
.with(:node, 'roles:os-ops-messaging AND chef_environment:_default')
|
.with(:node, 'roles:os-ops-messaging AND chef_environment:_default')
|
||||||
.and_return [
|
.and_return [
|
||||||
{ 'hostname' => 'host2' },
|
{ 'hostname' => 'host2' },
|
||||||
{ 'hostname' => 'host1' }
|
{ 'hostname' => 'host1' }
|
||||||
]
|
]
|
||||||
allow_any_instance_of(Chef::Recipe).to receive(:get_password)
|
allow_any_instance_of(Chef::Recipe).to receive(:get_password)
|
||||||
.with('user', anything)
|
.with('user', anything)
|
||||||
.and_return 'rabbit-pass'
|
.and_return 'rabbit-pass'
|
||||||
|
|
Loading…
Reference in New Issue