-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Enhance bundle open
command to allow opening subdir/file of gem
#6146
Enhance bundle open
command to allow opening subdir/file of gem
#6146
Conversation
Thanks for opening a pull request and helping make RubyGems and Bundler better! Someone from the RubyGems team will take a look at your pull request shortly and leave any feedback. Please make sure that your pull request has tests for any changes or added functionality. We use GitHub Actions to test and make sure your change works functionally and uses acceptable conventions, you can review the current progress of GitHub Actions in the PR status window below. If you have any questions or concerns that you wish to ask, feel free to leave a comment in this PR or join our #rubygems or #bundler channel on Slack. For more information about contributing to the RubyGems project feel free to review our CONTRIBUTING guide |
Can you elaborate? That seems much better to me. 🤔 |
Thanks for coding this enhancement! I agree with @simi. If it's because of clarity, we could add a specific flag for it, like Also using |
Alright fellas, --path opt sounds reasonable to me. I'll make the necessary changes. |
25f3f41
to
ea08168
Compare
dbdee74
to
c6d8e07
Compare
bundle open
command to allow opening subdir/file of gem
c6d8e07
to
b537d3b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, just added a small comment about handling a missing value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙌
e483cfb
to
c242311
Compare
Enhance `bundle open` command to allow opening subdir/file of gem (cherry picked from commit 6bd5aa8)
What was the end-user or developer problem that led to this PR?
I had an development workflow halt when vscode + remote containers combo was used. The scenario was following:
I wanted to open up specific gems specific file, but as remote containers use filesystem from within the docker container I could not use bundle open command to be able to see within a specific file of a gem.
Even though remote containers does not allow easy "mount n+1 dirs" mechanisms, it would have been sufficient enough to be able to scope my bundle open command to a specific file that my tests were failing at.
I had the expectation that
bundle open
command would have allowed to open specific file with some syntax, but my expectations were not met.What is your fix for the problem, implemented in this PR?
As the first intuitive command to open a specific file was to try
bundle open GEM/some/file.rb
this is what was implemented.I did try out adding second argument too, so that
bundle open GEM some/file.rb
would have worked, but that felt kind of off.So, wrote the tests for the core of this enhancement and tests that make sure all the other fuzz matching & "did you mean" features would work just like they've been working before this enhancement.
Make sure the following tasks are checked