From 41f5b3c9a99a72272191f9f56c122684e3ff95c2 Mon Sep 17 00:00:00 2001 From: Mark Vanderwiel Date: Fri, 29 May 2015 12:02:11 -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: I80b0e9671a787e208622b7eed82494f08e288438 --- .rubocop_todo.yml | 20 ++------------------ metadata.rb | 12 ++++++------ spec/openstack-db_spec.rb | 2 +- spec/postgresql-server_spec.rb | 2 +- spec/server_spec.rb | 2 +- 5 files changed, 11 insertions(+), 27 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 2f72bd5..59aa67c 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -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 diff --git a/metadata.rb b/metadata.rb index d7149db..afe5652 100755 --- a/metadata.rb +++ b/metadata.rb @@ -1,9 +1,9 @@ -name 'openstack-ops-database' -maintainer 'openstack-chef' +name 'openstack-ops-database' +maintainer 'openstack-chef' maintainer_email 'opscode-chef-openstack@googlegroups.com' -license 'Apache 2.0' -description 'Provides the shared database configuration for Chef for OpenStack.' -version '11.0.0' +license 'Apache 2.0' +description 'Provides the shared database configuration for Chef for OpenStack.' +version '11.0.0' recipe 'client', 'Installs client packages for the database used by the deployment.' recipe 'server', 'Installs and configures server packages for the database used by the deployment.' @@ -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 diff --git a/spec/openstack-db_spec.rb b/spec/openstack-db_spec.rb index e3ce20d..6e7dc9d 100644 --- a/spec/openstack-db_spec.rb +++ b/spec/openstack-db_spec.rb @@ -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) diff --git a/spec/postgresql-server_spec.rb b/spec/postgresql-server_spec.rb index 7fe527a..432ca26 100644 --- a/spec/postgresql-server_spec.rb +++ b/spec/postgresql-server_spec.rb @@ -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 diff --git a/spec/server_spec.rb b/spec/server_spec.rb index ea1cb3d..a8076c2 100644 --- a/spec/server_spec.rb +++ b/spec/server_spec.rb @@ -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')