Skip to content

Commit 37b0c43

Browse files
committed
fix(rubocop): add fixes using rubocop --safe-auto-correct
1 parent 911317c commit 37b0c43

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1+
# frozen_string_literal: true
2+
13
# Overide by Platform
24
pg_port = '5432'
3-
if platform[:family] == 'debian' or platform[:family] == 'suse'
4-
pg_port = '5433'
5-
end
5+
pg_port = '5433' if (platform[:family] == 'debian') || (platform[:family] == 'suse')
66

77
control 'Postgres command' do
88
title 'should match desired lines'
99

1010
# Can't use `%Q` here due to the `\`
11-
describe command(%q{su - postgres -c 'psql -p} + pg_port + %q{ -qtc "\l+ db2"'}) do
12-
its(:stdout) { should match(%r{db2.*remoteUser.*UTF8.*en_US.UTF-8.*en_US.UTF-8.*my_space}) }
11+
describe command("su - postgres -c 'psql -p" + pg_port + %q( -qtc "\l+ db2"')) do
12+
its(:stdout) { should match(/db2.*remoteUser.*UTF8.*en_US.UTF-8.*en_US.UTF-8.*my_space/) }
1313
end
1414
end

test/integration/default/controls/config_spec.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
control 'Postgres configuration' do
24
title 'should include the directory'
35

test/integration/default/controls/services_spec.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
# frozen_string_literal: true
2+
13
# Overide by Platform
24
service_name = 'postgresql'
35
pg_port = 5432
4-
if platform[:name] == 'centos' and platform[:release].start_with?('6')
6+
if (platform[:name] == 'centos') && platform[:release].start_with?('6')
57
service_name = 'postgresql-9.6'
6-
elsif platform[:family] == 'debian' or platform[:family] == 'suse'
8+
elsif (platform[:family] == 'debian') || (platform[:family] == 'suse')
79
pg_port = 5433
810
end
911

0 commit comments

Comments
 (0)