Closed bschonec closed 8 months ago
I am not sure what you are trying to do. This is a puppet module, so it should be invoked by puppet agent, which comes with its own ruby distribution and a necessary set of gems installed.
This is for running the tests from the command line. Since there is no puppet-module-posix-default gem higher than 2.7, the spec tests fail as bundle-er cannot find an appropriate gem. 'bundle install' doesn't fail on RHEL7 but it does fail on RHEL8 and above (typically, because Ruby 3.x is the default for those releases). Probably what needs to happen is a "pdk update" (or whatver the command is) to update the Gemfile to newer standards."
Something like #23. This updates Gemfile, Rakefile and a few other things that do fix the ruby gem version problem.
I see, you've got newer PDK. Updated PDK to 3.0 and pushed under a new tag v1.4.7. Check it out.
spec/classes/crowdstrike_spec.rb needs to have the check for "unalbe to parse falconctl" fixed to match the error that manifests/init.pp gives... #21 addressed the typo but I didn't have any experience on spec tests so I didn't know to update the spec .rb file.
Fixed and pushed to forge as v1.4.7.
On Red Hat EL 8.9 and using ruby 3.1.2p20, I get the following error:
bundle install
Could not find gem 'puppet-module-posix-default-r3.1 (~> 1.0)' in rubygems repository https://rubygems.org/ or installed locally.
A search at ruby.org shows that no version higher than 2.7 is available for puppet-module-posix-default.
I don't know anything about Ruby so I don't know how to fix this.