Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

work with symbolized strings #175

Merged
merged 2 commits into from
Jun 9, 2024

Conversation

bastelfreak
Copy link
Member

No description provided.

@bastelfreak bastelfreak marked this pull request as draft June 7, 2024 18:10
@bastelfreak bastelfreak force-pushed the facterdbstrings branch 3 times, most recently from bd0646e to 12307af Compare June 7, 2024 21:08
@bastelfreak bastelfreak marked this pull request as ready for review June 7, 2024 21:15
@bastelfreak
Copy link
Member Author

This contains #176

Copy link

codecov bot commented Jun 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.80%. Comparing base (09cb9e9) to head (3fdbb05).
Report is 9 commits behind head on master.

Current head 3fdbb05 differs from pull request most recent head f5fcdb5

Please upload reports for the commit f5fcdb5 to get more accurate results.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #175      +/-   ##
==========================================
+ Coverage   95.34%   95.80%   +0.45%     
==========================================
  Files           2        2              
  Lines         172      167       -5     
==========================================
- Hits          164      160       -4     
+ Misses          8        7       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

I'd be tempted to remove all symbol keys from facterdb and then do the .to_sym here in rspec-puppet-facts if requested. Any thoughts on that?

lib/rspec-puppet-facts.rb Outdated Show resolved Hide resolved
lib/rspec-puppet-facts.rb Outdated Show resolved Hide resolved
lib/rspec-puppet-facts.rb Show resolved Hide resolved
@bastelfreak
Copy link
Member Author

bastelfreak commented Jun 8, 2024

I'd be tempted to remove all symbol keys from FacterDB and then do the .to_sym here in rspec-puppet-facts if requested. Any thoughts on that?

I considered that, but that would be another breaking change. I think with the current implementation it allows us to release it as an enhancement and then we can use the new rspec-puppet-facts + FacterDB version. Afterwards I would like to update FacterDB as you mentioned and also switch to strings by default in rspec-puppet-facts.

Basically:

@bastelfreak bastelfreak force-pushed the facterdbstrings branch 3 times, most recently from 6b7e25f to af8ba4c Compare June 8, 2024 13:59
Comment on lines 152 to 154
operatingsystemmajrelease = os['release']['major']
operatingsystem = os['name'].downcase
hardwaremodel = os['hardware']
Copy link
Member Author

Choose a reason for hiding this comment

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

voxpupuli/facterdb#367 proove that this works always

@bastelfreak bastelfreak force-pushed the facterdbstrings branch 3 times, most recently from 363ba5d to ac69504 Compare June 8, 2024 22:07
Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

I was further looking at the changes and thought that moving to modern facts deserved its own PR for a cleaner history. #178 does that. I'd prefer to rebase this PR on top. As you can see, I already introduce the os_fact variable there, so it should be easy to modify.

lib/rspec-puppet-facts.rb Outdated Show resolved Hide resolved
lib/rspec-puppet-facts.rb Outdated Show resolved Hide resolved
spec/rspec_puppet_facts_spec.rb Outdated Show resolved Hide resolved
@ekohl
Copy link
Member

ekohl commented Jun 9, 2024

Did you intend to squash all your changes in a single commit?

@bastelfreak bastelfreak merged commit cfa4977 into voxpupuli:master Jun 9, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants