-
-
Notifications
You must be signed in to change notification settings - Fork 192
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
Add brew integration description #415
Open
gonzalom
wants to merge
2
commits into
postmodern:master
Choose a base branch
from
gonzalom:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I wonder if it's worth showing
brew --cellar
to accommodate alternative brew prefixes?On the other hand, the hardcoded
/usr/local
version is prettier.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.
I didn't think about that option.
Not sure if it could be a custom path for it. However, as it's documentation, not a script, it could have both options documented.
In my case, I rather set the path, as this would be one command less to execute every time I start a terminal session.
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.
Those are good points. I think it's fine to hard code to the brew prefix.
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.
It'd be nice to add
engine-version
toRUBIES
rather than justversion
. With Ruby 2.6.3 for example, it'd currently be2.6.3
instead ofruby-2.6.3
.I also wonder about other Ruby engines that brew has packages for. Is it worth adding those too, or maybe just separate examples for Ruby and JRuby?
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.
I can't tell about the jruby ones, as I just use homebrew for it. Sounds good to me, but as I can't test it, I wouldn't dear :D
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.
I was going to propose you this:
But here is my experience...
First of all, I installed (throw homebrew) jruby and mruby to check it out.
The binary directories would be then:
/usr/local/Cellar/ruby/2.6.5/bin/
/usr/local/Cellar/jruby/9.2.9.0/bin/
/usr/local/Cellar/mruby/2.0.1/bin/
If I run your loop, it would check for this:
Which is not right, as you can see, so you can just run it like:
But what would be the point? It would do the same as what I propose:
But there is a problem here:
You see what it's doing? and why it fails? is because it is trying to get the
{path}/bin/ruby
binary, but in the case of jruby and mruby, the binaries are calledjruby
andmruby
, so it fails.In conclusion:
*
wildcard.So I suggest to get stick with the current proposal.