Skip to content

Commit

Permalink
stringify fact keys by default
Browse files Browse the repository at this point in the history
for a long long time, the first level of keys in a factsets were
symbols. Following nested hashes always had strings. This doesn't make
sense and looks confusing. Also the original data contains only strings,
we we actually iterated on the data and converted it to symbols. We now
flip the default. This saves performance and makes code more readable.
  • Loading branch information
bastelfreak committed Jul 8, 2024
1 parent 56c2f65 commit 63d0cb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rspec-puppet-facts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -426,5 +426,5 @@ def self.facter_version_for_puppet_version(puppet_version)

RSpec.configure do |c|
c.add_setting :default_facter_version, default: RspecPuppetFacts.facter_version_for_puppet_version(Puppet.version)
c.add_setting :facterdb_string_keys, default: false
c.add_setting :facterdb_string_keys, default: true
end

0 comments on commit 63d0cb1

Please sign in to comment.