Skip to content

Commit

Permalink
Rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
yakatz committed May 16, 2024
1 parent ce05e28 commit b7d2e17
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ def factset_to_os_label(fs)
fail = {}
os = fs[:os]
distro = os.fetch('lsb', os.fetch('distro', fail))
if distro.key?('id')
os_id = distro['id']
elsif distro.key?('distid')
os_id = distro['distid']
else
os_id = '@@@@@@@@@@'
end
os_id = if distro.key?('id')
distro['id']
elsif distro.key?('distid')
distro['distid']
else
'@@@@@@@@@@'
end
if fs[:os].key?('release') && (fs[:os]['release']['major'] =~ /\d/)
os_rel = fs[:os]['release']['major']
os__rel = fs[:os]['release']['full']
Expand Down
4 changes: 2 additions & 2 deletions spec/facter_db_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
context 'when FACTERDB_SKIP_DEFAULTDB environment variable is not set' do
it 'returns the list of fact sets included in FacterDB' do
# This test is a little naive but works
expect(default_fact_files.count).to be >= 500
expect(default_fact_files.count).to be >= 209
end
end

Expand Down Expand Up @@ -247,7 +247,7 @@

shared_examples 'returns only the specified version' do
it 'only includes fact sets for the specified version' do
expect(result).to all(include(:facterversion => match(%r{\A4\.2})))
expect(result).to all(include(facterversion: match(/\A4\.2/)))
end
end

Expand Down

0 comments on commit b7d2e17

Please sign in to comment.