Browse Source

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
Mark Vanderwiel 3 years ago
parent
commit
41f5b3c9a9
5 changed files with 11 additions and 27 deletions
  1. 2
    18
      .rubocop_todo.yml
  2. 6
    6
      metadata.rb
  3. 1
    1
      spec/openstack-db_spec.rb
  4. 1
    1
      spec/postgresql-server_spec.rb
  5. 1
    1
      spec/server_spec.rb

+ 2
- 18
.rubocop_todo.yml View File

@@ -1,27 +1,11 @@
1 1
 # This configuration was generated by `rubocop --auto-gen-config`
2
-# on 2015-02-27 14:24:09 -0600 using RuboCop version 0.29.1.
2
+# on 2015-05-29 12:01:24 -0500 using RuboCop version 0.29.1.
3 3
 # The point is for the user to remove these configuration records
4 4
 # one by one as the offenses are removed from the code base.
5 5
 # Note that changes in the inspected code, or installation of new
6 6
 # versions of RuboCop, may require this file to be generated again.
7 7
 
8
-# Offense count: 3
8
+# Offense count: 4
9 9
 # Configuration parameters: EnforcedStyle, SupportedStyles.
10 10
 Style/ClassAndModuleChildren:
11 11
   Enabled: false
12
-
13
-# Offense count: 2
14
-# Cop supports --auto-correct.
15
-Style/EmptyLiteral:
16
-  Enabled: false
17
-
18
-# Offense count: 1
19
-# Cop supports --auto-correct.
20
-# Configuration parameters: PreferredDelimiters.
21
-Style/PercentLiteralDelimiters:
22
-  Enabled: false
23
-
24
-# Offense count: 5
25
-# Cop supports --auto-correct.
26
-Style/SingleSpaceBeforeFirstArg:
27
-  Enabled: false

+ 6
- 6
metadata.rb View File

@@ -1,9 +1,9 @@
1
-name              'openstack-ops-database'
2
-maintainer       'openstack-chef'
1
+name 'openstack-ops-database'
2
+maintainer 'openstack-chef'
3 3
 maintainer_email 'opscode-chef-openstack@googlegroups.com'
4
-license           'Apache 2.0'
5
-description       'Provides the shared database configuration for Chef for OpenStack.'
6
-version           '11.0.0'
4
+license 'Apache 2.0'
5
+description 'Provides the shared database configuration for Chef for OpenStack.'
6
+version '11.0.0'
7 7
 
8 8
 recipe 'client', 'Installs client packages for the database used by the deployment.'
9 9
 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.'
15 15
 recipe 'postgresql-server', 'Installs and configures PostgreSQL server packages.'
16 16
 recipe 'openstack-db', 'Creates necessary tables, users, and grants for OpenStack.'
17 17
 
18
-%w{ fedora ubuntu redhat centos suse }.each do |os|
18
+%w(fedora ubuntu redhat centos suse).each do |os|
19 19
   supports os
20 20
 end
21 21
 

+ 1
- 1
spec/openstack-db_spec.rb View File

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

+ 1
- 1
spec/postgresql-server_spec.rb View File

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

+ 1
- 1
spec/server_spec.rb View File

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

Loading…
Cancel
Save