Skip to content

Conversation

@richpeck
Copy link

This fixes the problem with globbing. Despite what the readme says, "native" globbing doesn't work - with this addition, it does.

This fixes the problem with globbing. Despite what the readme says, "native" globbing support doesn't work - with this addition, it does.
@jarmo
Copy link
Owner

jarmo commented Oct 10, 2020

Please describe more what problem did you experience and what does it fix. Also, add a spec for it.

@richpeck
Copy link
Author

richpeck commented Oct 10, 2020

I'm running Windows 10 with Ruby 2.7.2 and if I used the glob syntax without explicitly calling glob, it would fail, citing the file as not being present:

require_all 'app', 'lib', 'config/*.rb'

ruby

This could easily be resolved by using the Dir.glob syntax (require_all Dir.glob("x/y/**/z.rb"), but I didn't want to.

After digging through the gem's code, I found that the require_all method was treating "config/*.rb" as a file. Thus, I was able to determine that wrapping the file in Dir[], it treated it as a glob path, and worked. It also worked for single files.

I'll do a spec when I get a minute.

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.

2 participants