Skip to content

Commit

Permalink
Auto-correct rubocop offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
smortex committed Aug 18, 2023
1 parent c356e3c commit 40e9043
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/puppet/provider/loginctl_user/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
def self.instances
users = loginctl('list-users', '--no-legend').split("\n").map { |l| l.split[1] }
loginctl('show-user', '-p', 'Name', '-p', 'Linger', *users).split("\n\n").map do |u|
user = u.split("\n").map { |f| f.split('=') }.to_h
user = u.split("\n").to_h { |f| f.split('=') }
linger = if user['Linger'] == 'yes'
'enabled'
else
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/facter/systemd_version_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

it do
expect(Facter::Util::Resolution).not_to receive(:exec).with("systemctl --version | awk '/systemd/{ print $2 }'")
expect(Facter.value(:systemd_version)).to eq(nil)
expect(Facter.value(:systemd_version)).to be_nil
end
# rubocop:enable RSpec/StubbedMock
# rubocop:enable RSpec/MessageSpies
Expand Down

0 comments on commit 40e9043

Please sign in to comment.