Skip to content

Commit

Permalink
Merge pull request #137 from ekohl/fix-rubocop
Browse files Browse the repository at this point in the history
Merge duplicate branches in service_provider fact
  • Loading branch information
bastelfreak authored Jun 21, 2024
2 parents c2648e9 + a43060a commit c60bd11
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 1 addition & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ begin
config.future_release = "v#{Gem::Specification.load("#{config.project}.gemspec").version}"
end
rescue LoadError
# Optional gem, release group is probably disabled
end
6 changes: 1 addition & 5 deletions lib/voxpupuli/test/facts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,20 +73,16 @@ def add_stdlib_facts
add_custom_fact :service_provider, ->(_os, facts) do
os = RSpec.configuration.facterdb_string_keys ? facts['os'] : facts[:os]
case os['family'].downcase
when 'archlinux'
when 'archlinux', 'debian', 'redhat'
'systemd'
when 'darwin'
'launchd'
when 'debian'
'systemd'
when 'freebsd'
'freebsd'
when 'gentoo'
'openrc'
when 'openbsd'
'openbsd'
when 'redhat'
'systemd'
when 'suse'
os['release']['major'].to_i >= 12 ? 'systemd' : 'redhat'
when 'windows'
Expand Down

0 comments on commit c60bd11

Please sign in to comment.