should be

```ruby
 Pathname.glob(glob_pattern).select{|f| f.basename.to_s.include?(file_pattern) }.map(&:dirname).uniq.map(&:realpath)
```
Else it will always check against the base name of the directories which will rarely include the file pattern