Skip to content

Commit bff33ff

Browse files
committed
Pet rubocop
1 parent 1ff43c7 commit bff33ff

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

lib/facter/rabbitmq_clustername.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
if Facter::Util::Resolution.which('rabbitmqctl')
44
ret = nil
55
cluster_status = Facter::Core::Execution.execute('rabbitmqctl -q cluster_status 2>&1')
6-
[%r!{cluster_name,<<"(\S+)">>}!, %r!^Cluster name: (\S+)$!].each do |r|
6+
[%r!{cluster_name,<<"(\S+)">>}!, %r{^Cluster name: (\S+)$}].each do |r|
77
if (data = r.match(cluster_status))
88
ret = data[1]
99
break

lib/puppet/provider/rabbitmq_cluster/rabbitmqctl.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def destroy
3131

3232
def cluster_name
3333
cluster_status = rabbitmqctl('-q', 'cluster_status')
34-
[%r!{cluster_name,<<"(\S+)">>}!, %r!^Cluster name: (\S+)$!].each do |r|
34+
[%r!{cluster_name,<<"(\S+)">>}!, %r{^Cluster name: (\S+)$}].each do |r|
3535
if (data = r.match(cluster_status))
3636
return data[1]
3737
end

spec/classes/rabbitmq_spec.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,14 +175,12 @@
175175
let(:params) { { oom_score_adj: value } }
176176

177177
if facts[:os]['family'] == 'Debian'
178-
it { is_expected.to contain_file('/etc/default/rabbitmq-server').with_content(/^echo #{value} > \/proc\/\$\$\/oom_score_adj$/) }
178+
it { is_expected.to contain_file('/etc/default/rabbitmq-server').with_content(%r{^echo #{value} > /proc/\$\$/oom_score_adj$}) }
179179
else
180180
it { is_expected.not_to contain_file('/etc/default/rabbitmq-server') }
181181
end
182182

183183
if facts[:systemd]
184-
selinux_ignore_defaults = facts[:os]['family'] == 'RedHat'
185-
186184
it do
187185
is_expected.to contain_systemd__service_limits("#{name}.service").
188186
with_limits('OOMScoreAdjust' => value).

0 commit comments

Comments
 (0)