bernd / fpm-cookery

A tool for building software packages with fpm.
Other
460 stars 88 forks source link

Rejiggered Facter-related code to use `Facter.value` #167

Closed tomeon closed 8 years ago

tomeon commented 8 years ago

I saw testing failures in #165 that traced to Facter.fact(:somefact).value returning nil. This PR addresses the issue by using the Facter.value method instead of Facter.fact, adding the FPM::Cookery::Facts.value wrapper method to short-circuit prior to calling .downcase.to_sym when the requested value is nil. I also updated the related spec file to call Facter.value, and simplified testing of the :lsbcodename fact.

The PR also bumps the rspec dependency to 3.3 in order to gain access to the --bisect option that helps track down ordering-dependent test failures.

bernd commented 8 years ago

Thank you!