Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
(CAT-2385) Fix rubocop offenses
  • Loading branch information
shubhamshinde360 committed Sep 30, 2025
commit eba9dd21290e1bb1fbdc36432f3445f3252c70a7
2 changes: 1 addition & 1 deletion lib/puppet/functions/postgresql/postgresql_password.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def pg_sha256(password, salt)
def digest_key(password, salt)
OpenSSL::KDF.pbkdf2_hmac(
password,
salt: salt,
salt:,
iterations: 4096,
length: 32,
hash: OpenSSL::Digest.new('SHA256'),
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet/provider/postgresql_conf/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def parse_config
else
matches[:value].delete("'")
end
attributes_hash = { line_number: line_number, key: matches[:key], ensure: 'present', value: value, comment: matches[:comment] }
attributes_hash = { line_number:, key: matches[:key], ensure: 'present', value:, comment: matches[:comment] }
active_settings.push(attributes_hash)
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet/provider/postgresql_replication_slot/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
def self.instances
run_sql_command('SELECT * FROM pg_replication_slots;')[0].split("\n").select { |l| l.include?('|') }.map do |l|
name, *_others = l.strip.split(%r{\s+\|\s+})
new(name: name,
new(name:,
ensure: :present)
end
end
Expand Down
14 changes: 7 additions & 7 deletions spec/defines/server/pg_hba_rule_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class { 'postgresql::server': }
user: 'all',
address: '1.1.1.1/24',
auth_method: 'md5',
target: target
target:
}
end

Expand All @@ -47,7 +47,7 @@ class { 'postgresql::server': }
database: 'all',
user: 'all',
auth_method: 'ident',
target: target
target:
}
end

Expand All @@ -71,7 +71,7 @@ class { 'postgresql::server': }
address: '0.0.0.0/0',
auth_method: 'ldap',
auth_option: 'foo=bar',
target: target
target:
}
end

Expand All @@ -98,7 +98,7 @@ class { 'postgresql::server': }
user: 'all',
address: '0.0.0.0/0',
auth_method: 'peer',
target: target
target:
}
end

Expand Down Expand Up @@ -126,7 +126,7 @@ class { 'postgresql::server': }
user: 'all',
address: '0.0.0.0/0',
auth_method: 'scram-sha-256',
target: target
target:
}
end

Expand Down Expand Up @@ -240,7 +240,7 @@ class { 'postgresql::server': }
user: 'all',
address: '.domain.tld',
auth_method: 'md5',
target: target
target:
}
end

Expand All @@ -263,7 +263,7 @@ class { 'postgresql::server': }
user: 'all',
address: '/45',
auth_method: 'md5',
target: target
target:
}
end

Expand Down
2 changes: 1 addition & 1 deletion spec/unit/puppet/provider/postgresql_psql/ruby_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
describe Puppet::Type.type(:postgresql_psql).provider(:ruby) do
let(:name) { 'rspec psql test' }
let(:resource) do
Puppet::Type.type(:postgresql_psql).new({ name: name, provider: :ruby }.merge(attributes))
Puppet::Type.type(:postgresql_psql).new({ name:, provider: :ruby }.merge(attributes))
end
let(:provider) { resource.provider }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def success?

let(:name) { 'standby' }
let(:resource) do
type.new({ name: name, provider: :ruby }.merge(attributes))
type.new({ name:, provider: :ruby }.merge(attributes))
end
let(:sql_instances) do
"abc | | physical | | | t | | | 0/3000420
Expand Down
24 changes: 12 additions & 12 deletions spec/unit/puppet/type/postgresql_psql_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
[true, :true].each do |refreshonly|
context "refreshonly => #{refreshonly.inspect}" do
let(:attributes) do
{ refreshonly: refreshonly }
{ refreshonly: }
end

context 'not refreshing'
Expand All @@ -141,7 +141,7 @@

context "refreshonly => #{refreshonly.inspect}" do
let(:attributes) do
{ refreshonly: refreshonly }
{ refreshonly: }
end

context 'refreshing'
Expand All @@ -152,7 +152,7 @@
[false, :false].each do |refreshonly|
context "refreshonly => #{refreshonly.inspect}" do
let(:attributes) do
{ refreshonly: refreshonly }
{ refreshonly: }
end

context 'not refreshing'
Expand All @@ -161,7 +161,7 @@

context "refreshonly => #{refreshonly.inspect}" do
let(:attributes) do
{ refreshonly: refreshonly }
{ refreshonly: }
end

context 'refreshing'
Expand All @@ -176,7 +176,7 @@
[true, :true].each do |refreshonly|
context "refreshonly => #{refreshonly.inspect}" do
let(:attributes) do
{ refreshonly: refreshonly, unless: 'SELECT something' }
{ refreshonly:, unless: 'SELECT something' }
end

context 'not refreshing'
Expand All @@ -185,7 +185,7 @@

context "refreshonly => #{refreshonly.inspect}" do
let(:attributes) do
{ refreshonly: refreshonly, unless: 'SELECT something' }
{ refreshonly:, unless: 'SELECT something' }
end

context 'refreshing'
Expand All @@ -196,7 +196,7 @@
[false, :false].each do |refreshonly|
context "refreshonly => #{refreshonly.inspect}" do
let(:attributes) do
{ refreshonly: refreshonly, unless: 'SELECT something' }
{ refreshonly:, unless: 'SELECT something' }
end

context 'not refreshing'
Expand All @@ -205,7 +205,7 @@

context "refreshonly => #{refreshonly.inspect}" do
let(:attributes) do
{ refreshonly: refreshonly, unless: 'SELECT something' }
{ refreshonly:, unless: 'SELECT something' }
end

context 'refreshing'
Expand All @@ -220,7 +220,7 @@
[true, :true].each do |refreshonly|
context "refreshonly => #{refreshonly.inspect}" do
let(:attributes) do
{ refreshonly: refreshonly, unless: 'SELECT something' }
{ refreshonly:, unless: 'SELECT something' }
end

context 'not refreshing'
Expand All @@ -229,7 +229,7 @@

context "refreshonly => #{refreshonly.inspect}" do
let(:attributes) do
{ refreshonly: refreshonly, unless: 'SELECT something' }
{ refreshonly:, unless: 'SELECT something' }
end

context 'refreshing'
Expand All @@ -240,7 +240,7 @@
[false, :false].each do |refreshonly|
context "refreshonly => #{refreshonly.inspect}" do
let(:attributes) do
{ refreshonly: refreshonly, unless: 'SELECT something' }
{ refreshonly:, unless: 'SELECT something' }
end

context 'not refreshing'
Expand All @@ -249,7 +249,7 @@

context "refreshonly => #{refreshonly.inspect}" do
let(:attributes) do
{ refreshonly: refreshonly, unless: 'SELECT something' }
{ refreshonly:, unless: 'SELECT something' }
end

context 'refreshing'
Expand Down
Loading