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 bindir flag to pristine #2361
Conversation
@@ -46,6 +46,12 @@ def initialize | |||
options[:env_shebang] = value | |||
end | |||
|
|||
add_option('-n', '--bindir DIR', | |||
'Directory where binary files are', |
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.
should this be binstubs
instead of binary files
?
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.
rubygems/lib/rubygems/install_update_options.rb
Lines 27 to 31 in 672ddcb
add_option(:"Install/Update", '-n', '--bindir DIR', | |
'Directory where binary files are', | |
'located') do |value, options| | |
options[:bin_dir] = File.expand_path(value) | |
end |
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.
Even if it’s copy-pasted from elsewhere... the “bin” files RubyGems installs aren’t actually binary
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'd agree. The terms 'binary' and 'binstubs' are used both as above and in docs. What's a better name? Maybe 'launch scripts', 'CLI scripts', 'scripts', etc. I don't know...
I'd agree. The terms 'binary' and 'binstubs' are used both as above and in docs. What's a better name? Maybe 'launch scripts', 'CLI scripts', 'scripts', etc. I don't know...
I would say "wrappers", or "executable wrappers". This is how I'm
used to see them called in RubyGems, and how some option flags are
currently named. "scripts" alone is very good too in my opinion, but I
think that the same term should be used everywhere ideally.
"binary scripts", "bin scripts" is a bit wrong technically as said,
but I think it's still understandable, given its frequent and
conventional usage in directory names (`/bin`, `/usr/bin`… in many
operating systems, `./bin` directory in a ruby gem, `$GEM_HOME/bin`
etc…).
"binstubs" IMHO is confusing, the first time I saw it was with
909b5fb when `--[no-]regenerate-binstubs` was introduced for setup
command, and it took me a little while to understand if it was really
the same thing as the executable wrappers. Except here, I don't think
I ever saw this term.
|
The reason the message is what it is, is because I wanted to be consistent with the install/update |
@bronzdoc`
Doubt I'm part of the 'we' (not complaining), but since you've matched install/update, I think it's as it should be. The issue of what to call these files should also account for (or fix) what's currently shown in the UI prompts, which I believe is 'executables'... |
My opinion is that we should merge this and and open a new issue to discuss how this things should be named, then i could follow up with a PR that changes where appropriate. what you think? @segiddins @MSP-Greg @tjouan |
Agreed... |
@bundlerbot r+ |
📌 Commit cc8c63b has been approved by |
Add bindir flag to pristine # Description: closes #1997 I will abide by the [code of conduct](https://github.com/rubygems/rubygems/blob/master/CODE_OF_CONDUCT.md).
☀️ Test successful - status-travis |
My opinion is that we should merge this and and open a new issue to discuss how this things should be named, then i could follow up with a PR that changes where appropriate. what you think? @segiddins @MSP-Greg @tjouan
Yes, I think it should be handled separately too. I commented
because I also got confused by the different names in the past, but
this is irrelevant to changes in this branch.
|
Since PR rubygems#2361, the `@bin_dir` is set in `Gem::Installer#initialize`, while it was already properly set via preceeding `process_options` call.
Since PR rubygems#2361, the `@bin_dir` is set in `Gem::Installer#initialize`, while it was already properly set via preceding `process_options` call.
Since PR rubygems#2361, the `@bin_dir` is set in `Gem::Installer#initialize`, while it was already properly set via preceding `process_options` call.
2947: Refactor keyword argument test for Ruby 2.7 r=hsbt a=hsbt # Description: ruby/ruby@3e3cc08 ______________ # Tasks: - [ ] Describe the problem / feature - [ ] Write tests - [ ] Write code to solve the problem - [ ] Get code review from coworkers / friends I will abide by the [code of conduct](https://github.com/rubygems/rubygems/blob/master/CODE_OF_CONDUCT.md). 2950: Don't set `bin_dir` twice. r=hsbt a=voxik Since PR #2361, the `@bin_dir` is set in `Gem::Installer#initialize` [[1]], while it was already properly set via preceding `process_options` call [[2]]. [1]: https://github.com/rubygems/rubygems/blob/6b2b09ac0ddf41c0824e1244aaa9c8120c3081c4/lib/rubygems/installer.rb#L199 [2]: https://github.com/rubygems/rubygems/blob/6b2b09ac0ddf41c0824e1244aaa9c8120c3081c4/lib/rubygems/installer.rb#L697 Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org> Co-authored-by: Vít Ondruch <vondruch@redhat.com>
2947: Refactor keyword argument test for Ruby 2.7 r=hsbt a=hsbt # Description: ruby/ruby@3e3cc08 ______________ # Tasks: - [ ] Describe the problem / feature - [ ] Write tests - [ ] Write code to solve the problem - [ ] Get code review from coworkers / friends I will abide by the [code of conduct](https://github.com/rubygems/rubygems/blob/master/CODE_OF_CONDUCT.md). 2950: Don't set `bin_dir` twice. r=hsbt a=voxik Since PR #2361, the `@bin_dir` is set in `Gem::Installer#initialize` [[1]], while it was already properly set via preceding `process_options` call [[2]]. [1]: https://github.com/rubygems/rubygems/blob/6b2b09ac0ddf41c0824e1244aaa9c8120c3081c4/lib/rubygems/installer.rb#L199 [2]: https://github.com/rubygems/rubygems/blob/6b2b09ac0ddf41c0824e1244aaa9c8120c3081c4/lib/rubygems/installer.rb#L697 Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org> Co-authored-by: Vít Ondruch <vondruch@redhat.com>
Description:
closes #1997
I will abide by the code of conduct.