Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use zeitwerk/bundler friendly namespaced gem 'require'
There is no need create a file called lib/my-gem.rb. Bundler will automatically treat this as a namespace due to the hyphen, so it will try a my-gem require first and then fallback on my/gem. See: https://github.com/rubygems/rubygems/blob/a223274e4627e8a76112415c0e38f8a45a42f97e/bundler/lib/bundler/runtime.rb#L72-L73 Because we're moving towards zeitwerk, ruby files should be named based on their namespace/class names. 1) Moving / renaming based on a namespaced gem name works automatically with bundler. 2) Zeitwerk knows to ignore this file, so we don't need to.
- Loading branch information