Skip to content
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

Pull from upstream rbenv 1.2.0 #207

Merged
merged 64 commits into from
Feb 21, 2023
Merged

Pull from upstream rbenv 1.2.0 #207

merged 64 commits into from
Feb 21, 2023

Conversation

jasonkarns
Copy link
Member

No description provided.

advaitju and others added 30 commits July 5, 2017 18:15
Clarified how to finish installation by setting a Ruby version either globally or locally.
This allows to run a single test file more easily, although that could be
done by calling bats directly.
…stem_ruby

libexec/rbenv-version: get rid of misleading "set by $(rbenv-version-origin)" message when system ruby is in use
fish ships with a much more capable rbenv completion script since fish 2.0.

Fixes #1212
Looks like the zsh completion script was removed by mistake.

Fixes: rbenv/rbenv#1215
Refs: rbenv/rbenv@569d464
…ve_fish

Re-add zsh completion script and remove fish completion script
Since fish 3.10 at least, the current way of loading rbenv in `fish` is misbehaving, at least in some environments:

```
source: Error encountered while sourcing file '/var/folders/pj/jn249gcn7ddfrjzj2_9mxjhw0000gp/T//.psub.f0iJSWRByB':
source: No such file or directory
```

This changes the initialization to the method recommended by a `fish` developer here: fish-shell/fish-shell#6613 (comment)
Silver Searcher respects .gitignore, so having an .agignore file is
redundant. (Both patterns present in .agignore are already present in
.gitignore.)

It's also worth noting that silver searcher uses .agignore _in addition
to_ .gitignore, so removing this file will not cause ag to start
ignoring _additional_ patterns from .gitignore (it's already respecting
those patterns).
GitHub's expected filename is CODE_OF_CONDUCT.md. Whether that is the best name or even the current de facto standard is to be debated. But moving forward, this is likely the filename that will become the most common within the community, as that is the name GitHub expects and suggests.

This simply renames the existing code of conduct file from CONDUCT.md to CODE_OF_CONDUCT.md to conform to GitHub's preference.
Rename CONDUCT.md to CODE_OF_CONDUCT.md
bash completion: avoid unintentional globbing
test/run: handle optional paths/args for bats
Documentation unclear about installing Ruby version
jasonkarns and others added 18 commits May 4, 2021 16:20
Updated rbenv-doctor url to reflect renaming master branch to main
Supply `head -n` flag explicitly
Make work in set -u (nounset) mode
This speeds up subsequent `rbenv init -` executions for the user who
followed these instructions because the shell will no longer have to be
detected each time.
Improve init: warn about missing shell and use it in the template
Before (20 ruby versions, producing 200 shims total):

    mean:    0.124 s
    stdev:   0.003

After:

    mean:    0.090 s
    stdev:   0.004
Homebrew places the rbenv executable in a location such as
`/usr/local/bin/rbenv`, which is in PATH. However, that is a symlink to
`/usr/local/Cellar/rbenv/<VERSION>/bin/rbenv`, which is itself a symlink to
`/usr/local/Cellar/rbenv/<VERSION>/libexec/rbenv`. Upon executing, rbenv
will add its own directory to PATH so that it can easily invoke its
subcommands.

When generating shims during `rbenv rehash`, rbenv will try to put the
absolute path to itself inside each shim so that shims would work even
if rbenv itself isn't in PATH. Under Homebrew, rbenv's directory will be
the versioned directory in Homebrew's Cellar. However, due to Homebrew's
auto-cleanup functionality, shims generated this way will be broken
after upgrading rbenv because of the versioned Cellar path.

This changes how rbenv discovers itself in PATH: it will look at the
original PATH, not in the one modified by rbenv, with the intention of
excluding results under rbenv's own `libexec/`. If rbenv wasn't found in
PATH, return the absolute path to rbenv's own `bin/rbenv`.
Have shims survive upgrades via Homebrew
@mislav
Copy link
Contributor

mislav commented Feb 19, 2023

I would suggest pulling from rbenv head instead! I was going to tag a new version of rbenv soon anyway. Most importantly for your project, the head version of rbenv does away with the whole native bash extension bit, removing a GPL dependency rbenv/rbenv#1395

jasonkarns and others added 3 commits February 19, 2023 17:20
* commit 'rbenv-tags/v1.2.0':
  rbenv 1.2.0
  Clarify bash config for Ubuntu Desktop vs. other platforms
  💅 Clean up version sorting and add test
  Sort versions semantically in rbenv versions
  Have shims survive symlinked rbenv updates a la Homebrew
  GitHub now auto-generates a Table of Contents
  Speed up rehash
  Have `rbenv init` print instructions that hardcode the detected shell
  Supply `head -n` flag explicitly
  Update rbenv-doctor link master -> main
  Updated rbenv-doctor url to reflect renaming master branch to main
  Fix link to rbenv-doctor
  test(init): remove misleading arg in detect from parent shell case
  feat(init): strip -<suffix> when autodetecting shell
  [DOCS] Typo and formatting fix.
  Use a better PS4 as recommeneded by Bash Hackers Wiki
  Update README.md
  README: reflect changes in rbenv/ruby-build#1402
  Rename CONDUCT.md to CODE_OF_CONDUCT.md
  bash completion: avoid unintentional globbing
  Make work in set -u (nounset) mode
  Spelling fix
  Remove agignore
  Fix fish instructions test
  Remove another `fish` psub usage
  Fix fish shell initialization
  Use `actions/checkout` v2
  Run CI for pull requests from forks
  Re-add zsh completion script and remove fish completion script
  Remove fish completion script
  Fix (revert) test/version-origin.bats
  libexec/rbenv-version{,-origin}: move "missing rbenv-version-file detection" logic as per @mislav
  Fix tests for #1203
  libexec/rbenv-version{,-origin}: fix earlier commit to allow for RBENV_VERSION env var
  libexec/rbenv-version: get rid of misleading "set by $(rbenv-version-origin)" message when system ruby is in use
  test/run: handle optional paths/args for bats
  Documentation unclear
@jasonkarns
Copy link
Member Author

Understood. I usually try to pull in chunks to keep the diff size down. (In fact, sometimes I pull pr by pr).

I'm about ready to merge this one and will follow quickly with latest head before releasing.

Thanks! (Aside, was it mentions from commits that caught your attention? I don't mean to spam you each time we pull)

@jasonkarns jasonkarns marked this pull request as ready for review February 21, 2023 13:37
@jasonkarns jasonkarns merged commit fe203ab into master Feb 21, 2023
@jasonkarns jasonkarns deleted the pull-rbenv branch February 21, 2023 13:54
@mislav
Copy link
Contributor

mislav commented Mar 3, 2023

Aside, was it mentions from commits that caught your attention?

Yeah! one of the commits has an @-mention

jasonkarns added a commit that referenced this pull request May 27, 2024
fixup! Merge pull request #207 from nodenv/pull-rbenv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.