Giter Club home page Giter Club logo

Comments (5)

baurmatt avatar baurmatt commented on July 17, 2024

@mcanevet Could you please elaborate why the originally implemented version was good enough for Puppet 6? From my understanding, if Puppet.features.augeas? doesn't require Augeas to be present.

from rspec-puppet-facts.

baurmatt avatar baurmatt commented on July 17, 2024

I see three options fixing this:

  1. Change rescue => e to rescue LoadError => e
    This still throws Failed to retrieve Augeas version: cannot load such file -- augeas warnings, which aren't really nice.

  2. Revert 5156ec4 - it worked for us with with Puppet 6.0.0

  3. Add the augeas gem as a dependency for this gem.

from rspec-puppet-facts.

DavidS avatar DavidS commented on July 17, 2024

I see the same in https://travis-ci.org/puppetlabs/cisco_ios/jobs/445535959#L933-L942 :

An error occurred while loading ./spec/classes/proxy_spec.rb.
Failure/Error:
    on_supported_os(proxy_os).each do |os, os_facts|
      context "on #{os}" do
        let(:facts) { os_facts }
  
        it { is_expected.to compile }
      end
    end
LoadError:
  cannot load such file -- augeas
# ./vendor/bundle/ruby/2.4.0/gems/rspec-puppet-2.7.1/lib/rspec-puppet/monkey_patches.rb:350:in `require'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-puppet-2.7.1/lib/rspec-puppet/monkey_patches.rb:350:in `require'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-puppet-facts-1.9.1/lib/rspec-puppet-facts.rb:220:in `common_facts'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-puppet-facts-1.9.1/lib/rspec-puppet-facts.rb:134:in `block in on_supported_os'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-puppet-facts-1.9.1/lib/rspec-puppet-facts.rb:117:in `map'
# ./vendor/bundle/ruby/2.4.0/gems/rspec-puppet-facts-1.9.1/lib/rspec-puppet-facts.rb:117:in `on_supported_os'
# ./spec/classes/proxy_spec.rb:4:in `block in <top (required)>'
# ./spec/classes/proxy_spec.rb:3:in `<top (required)>'

from rspec-puppet-facts.

DavidS avatar DavidS commented on July 17, 2024

@baurmatt the issue seems to be that Puppet.features.augeas? now always returns false, even if augeas is present in the bundle. You first option, rescuing the LoadError seems to be the way to go then.

from rspec-puppet-facts.

baurmatt avatar baurmatt commented on July 17, 2024

Alright then, opened up #74 for the fix.

from rspec-puppet-facts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.