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: I80b0e9671a787e208622b7eed82494f08e288438
This commit is contained in:
Mark Vanderwiel 2015-05-29 12:02:11 -05:00
parent d1400a6f23
commit 41f5b3c9a9
5 changed files with 11 additions and 27 deletions

View File

@ -1,27 +1,11 @@
# This configuration was generated by `rubocop --auto-gen-config`
# on 2015-02-27 14:24:09 -0600 using RuboCop version 0.29.1.
# on 2015-05-29 12:01:24 -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
# versions of RuboCop, may require this file to be generated again.
# Offense count: 3
# Offense count: 4
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/ClassAndModuleChildren:
Enabled: false
# Offense count: 2
# Cop supports --auto-correct.
Style/EmptyLiteral:
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

View File

@ -15,7 +15,7 @@ recipe 'postgresql-client', 'Installs PostgreSQL client packages.'
recipe 'postgresql-server', 'Installs and configures PostgreSQL server packages.'
recipe 'openstack-db', 'Creates necessary tables, users, and grants for OpenStack.'
%w{ fedora ubuntu redhat centos suse }.each do |os|
%w(fedora ubuntu redhat centos suse).each do |os|
supports os
end

View File

@ -13,7 +13,7 @@ describe 'openstack-ops-database::openstack-db' do
expect_any_instance_of(Chef::Recipe).to receive(:db_create_with_user)
.with('compute', 'nova', 'test-pass')
expect_any_instance_of(Chef::Recipe).to receive(:db_create_with_user)
.with 'dashboard', 'dash', 'test-pass'
.with 'dashboard', 'horizon', 'test-pass'
expect_any_instance_of(Chef::Recipe).to receive(:db_create_with_user)
.with 'identity', 'keystone', 'test-pass'
expect_any_instance_of(Chef::Recipe).to receive(:db_create_with_user)

View File

@ -12,7 +12,7 @@ describe 'openstack-ops-database::postgresql-server' do
# The postgresql cookbook will raise an 'uninitialized constant
# Chef::Application' error without this attribute when running
# the tests
node.set_unless['postgresql']['password']['postgres'] = String.new
node.set_unless['postgresql']['password']['postgres'] = ''
runner.converge(described_recipe)
end

View File

@ -18,7 +18,7 @@ describe 'openstack-ops-database::server' do
# The postgresql cookbook will raise an 'uninitialized constant
# Chef::Application' error without this attribute when running
# the tests
node.set_unless['postgresql']['password']['postgres'] = String.new
node.set_unless['postgresql']['password']['postgres'] = ''
expect(chef_run).to include_recipe(
'openstack-ops-database::postgresql-server')