Skip to content
This repository has been archived by the owner on Jun 19, 2020. It is now read-only.

(FACT-2552) Add Solaris processors facts #451

Merged
merged 3 commits into from
Apr 24, 2020
Merged

(FACT-2552) Add Solaris processors facts #451

merged 3 commits into from
Apr 24, 2020

Conversation

oanatmaria
Copy link
Contributor

Description: Added solaris processors facts that were retrieved with kstat command. Bringing all methods that converts (bytes to mb, bytes to human readable, to hz) into one class.

lib/facts_utils/converter.rb Outdated Show resolved Hide resolved
lib/facts_utils/converter.rb Outdated Show resolved Hide resolved
lib/facts_utils/converter.rb Outdated Show resolved Hide resolved
format('%<displayed_speed>.2f', displayed_speed: validated_speed).to_s + ' ' + prefix[power] + 'Hz'
end

def bytes_to_human_readable(bytes)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove _readable, it's as clear even without it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kept the _readable because i think it is easier to understand what that method is supposed to do.

lib/facts_utils/converter.rb Outdated Show resolved Hide resolved
lib/facts_utils/converter.rb Outdated Show resolved Hide resolved
@BogdanIrimie BogdanIrimie merged commit 7019e89 into master Apr 24, 2020
@BogdanIrimie BogdanIrimie deleted the FACT-2552 branch April 24, 2020 11:57
Filipovici-Andrei pushed a commit that referenced this pull request Apr 28, 2020
* (FACT-2552) Add Solaris processors facts
* (FACT-2552) Fix rspec failure
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
3 participants