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

facts_spec: Pathname class is missing #165

Merged
merged 1 commit into from
Dec 29, 2020
Merged

Conversation

lelutin
Copy link
Contributor

@lelutin lelutin commented Dec 27, 2020

In debian's CI environment, running the spec tests fails with the
following error:

RUBYLIB=. GEM_PATH=/<<PKGBUILDDIR>>/debian/facterdb/usr/share/rubygems-integration/all:/<<PKGBUILDDIR>>/debian/.debhelper/generated/_source/home/.local/share/gem/ruby/2.7.0:/var/lib/gems/2.7.0:/usr/local/lib/ruby/gems/2.7.0:/usr/lib/ruby/gems/2.7.0:/usr/lib/x86_64-linux-gnu/ruby/gems/2.7.0:/usr/share/rubygems-integration/2.7.0:/usr/share/rubygems-integration/all:/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0 ruby2.7 -S rake -f debian/ruby-tests.rake
/usr/bin/ruby2.7 -I/usr/share/rubygems-integration/all/gems/rspec-support-3.9.3/lib:/usr/share/rubygems-integration/all/gems/rspec-core-3.9.2/lib /usr/share/rubygems-integration/all/gems/rspec-core-3.9.2/exe/rspec --pattern ./spec/\*\*/\*_spec.rb --format documentation

An error occurred while loading ./spec/facts_spec.rb.
Failure/Error: project_dir = Pathname.new(__dir__).parent

NameError:
  uninitialized constant Pathname
# ./spec/facts_spec.rb:84:in `block in <top (required)>'
# ./spec/facts_spec.rb:42:in `<top (required)>'

Finished in 0.00003 seconds (files took 0.16545 seconds to load)
0 examples, 0 failures, 1 error occurred outside of examples

To fix this we simply need to make sure that the 'pathname' stdlib is
"require"d at the top of the file.

@coveralls
Copy link

coveralls commented Dec 27, 2020

Coverage Status

Coverage remained the same at 100.0% when pulling ebe5e4b on lelutin:master into f7b1bd1 on camptocamp:master.

@lelutin
Copy link
Contributor Author

lelutin commented Dec 27, 2020

according to travis this breaks down with ruby 2.3. is 2.3 still intended to be supported onwards?

@mcanevet
Copy link
Member

Could you please rebase since #166 as been merged

In debian's CI environment, running the spec tests fails with the
following error:

    RUBYLIB=. GEM_PATH=/<<PKGBUILDDIR>>/debian/facterdb/usr/share/rubygems-integration/all:/<<PKGBUILDDIR>>/debian/.debhelper/generated/_source/home/.local/share/gem/ruby/2.7.0:/var/lib/gems/2.7.0:/usr/local/lib/ruby/gems/2.7.0:/usr/lib/ruby/gems/2.7.0:/usr/lib/x86_64-linux-gnu/ruby/gems/2.7.0:/usr/share/rubygems-integration/2.7.0:/usr/share/rubygems-integration/all:/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0 ruby2.7 -S rake -f debian/ruby-tests.rake
    /usr/bin/ruby2.7 -I/usr/share/rubygems-integration/all/gems/rspec-support-3.9.3/lib:/usr/share/rubygems-integration/all/gems/rspec-core-3.9.2/lib /usr/share/rubygems-integration/all/gems/rspec-core-3.9.2/exe/rspec --pattern ./spec/\*\*/\*_spec.rb --format documentation

    An error occurred while loading ./spec/facts_spec.rb.
    Failure/Error: project_dir = Pathname.new(__dir__).parent

    NameError:
      uninitialized constant Pathname
    # ./spec/facts_spec.rb:84:in `block in <top (required)>'
    # ./spec/facts_spec.rb:42:in `<top (required)>'

    Finished in 0.00003 seconds (files took 0.16545 seconds to load)
    0 examples, 0 failures, 1 error occurred outside of examples

To fix this we simply need to make sure that the 'pathname' stdlib is
"require"d at the top of the file.
@lelutin
Copy link
Contributor Author

lelutin commented Dec 28, 2020

@mcanevet I've rebased on top of master and foce-pushed on my side. the new check results are in!

@mcanevet mcanevet merged commit db991cc into voxpupuli:master Dec 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants