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

Missing Dir.mktmpdir #36

Open
djberg96 opened this issue Apr 17, 2022 · 1 comment
Open

Missing Dir.mktmpdir #36

djberg96 opened this issue Apr 17, 2022 · 1 comment

Comments

@djberg96
Copy link
Contributor

djberg96 commented Apr 17, 2022

The tmpdir library in the stdlib implements a single method called mktmpdir. I'd like to be able to use it for an eloop test that looks something like this:

  require 'tmpdir'
  Dir.chdir(Dir.mktmpdir) do
    File.symlink('eloop0', 'eloop1')
    File.symlink('eloop1', 'eloop0')
    expected = ['./eloop0', './eloop1']

    results = described_class.new(:path => '.', :follow => true).find
    expect(results.sort).to eq(expected)
  end

However, with memfs I'm getting:

undefined method 'mktmpdir' for MemFs::Dir:Class

Can that be implemented?

@simonc
Copy link
Owner

simonc commented May 3, 2022

Hi. Thanks for reporting this issue. Sadly I'm on an extremely tight schedule and can't spend to much time maintaining the project. I'm open to reviewing a PR if you'd like to have a stab at it though 😊

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

No branches or pull requests

2 participants