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

Plugin bundles #102

Merged
merged 3 commits into from Sep 23, 2011

Conversation

Projects
None yet
5 participants
@sstephenson
Contributor

sstephenson commented Sep 23, 2011

The purpose of this branch is to provide a way to install self-contained plugin bundles into the $RBENV_ROOT/plugins directory without any additional configuration. These plugin bundles make use of existing conventions for providing rbenv commands and hooking into core commands.

(Note that this branch renames the recently-added $RBENV_PLUGIN_PATH environment variable to $RBENV_HOOK_PATH, and rbenv plugin-scripts to rbenv hooks. The rbenv.d directories are now referred to as hook directories, not plugin directories.)

Say you have a plugin named foo. It provides an rbenv foo command and hooks into the rbenv exec and rbenv which core commands. Its plugin bundle directory structure would be as follows:

foo/
  bin/
    rbenv-foo
  etc/
    rbenv.d/
      exec/
        foo.bash
      which/
        foo.bash

When the plugin bundle directory is installed into ~/.rbenv/plugins, the rbenv command will automatically add ~/.rbenv/plugins/foo/bin to $PATH and ~/.rbenv/plugins/foo/etc/rbenv.d/exec:~/.rbenv/plugins/foo/etc/rbenv.d/which to $RBENV_HOOK_PATH.

The structure is designed so that plugins may also be installed via traditional means. For example, a Homebrew package of the plugin could simply merge the bin and etc directories into /usr/local.

Inspired by #99.

@josh

This comment has been minimized.

Show comment
Hide comment
@josh

josh Sep 23, 2011

Contributor

👍 👍

Contributor

josh commented Sep 23, 2011

👍 👍

@sstephenson

This comment has been minimized.

Show comment
Hide comment
@sstephenson

sstephenson Sep 23, 2011

Contributor

Soliciting feedback from @scoz (#99), @jamis (rbenv-gemset), @carsomyr (rbenv-bundler).

Contributor

sstephenson commented Sep 23, 2011

Soliciting feedback from @scoz (#99), @jamis (rbenv-gemset), @carsomyr (rbenv-bundler).

@scoz

This comment has been minimized.

Show comment
Hide comment
@scoz

scoz Sep 23, 2011

Looks good, covers all the needs I had.

scoz commented Sep 23, 2011

Looks good, covers all the needs I had.

@jamis

This comment has been minimized.

Show comment
Hide comment
@jamis

jamis Sep 23, 2011

Contributor

I like. This cleans up the whole "rbenv gemset install" noise. Good insight on this one!

Contributor

jamis commented Sep 23, 2011

I like. This cleans up the whole "rbenv gemset install" noise. Good insight on this one!

@carsomyr

This comment has been minimized.

Show comment
Hide comment
@carsomyr

carsomyr Sep 23, 2011

Contributor

Looking forward to trying it out! I've only used a subset of the features described above.

Contributor

carsomyr commented Sep 23, 2011

Looking forward to trying it out! I've only used a subset of the features described above.

@sstephenson

This comment has been minimized.

Show comment
Hide comment
@sstephenson

sstephenson Sep 23, 2011

Contributor

Sounds like a consensus then :)

Contributor

sstephenson commented Sep 23, 2011

Sounds like a consensus then :)

sstephenson added a commit that referenced this pull request Sep 23, 2011

@sstephenson sstephenson merged commit a3deeba into master Sep 23, 2011

@carsomyr

This comment has been minimized.

Show comment
Hide comment
@carsomyr

carsomyr Sep 24, 2011

Contributor

I restructured rbenv-bundler to use the new plugin conventions, and it works great! Do you think it would be appropriate to add a gitignore file to the plugins directory just to get it to exist? The ignore pattern would be /*.

Contributor

carsomyr commented Sep 24, 2011

I restructured rbenv-bundler to use the new plugin conventions, and it works great! Do you think it would be appropriate to add a gitignore file to the plugins directory just to get it to exist? The ignore pattern would be /*.

@sstephenson

This comment has been minimized.

Show comment
Hide comment
@sstephenson

sstephenson Sep 24, 2011

Contributor

I don't think we should have an empty plugins directory in the repo itself, but we should add /plugins to the root .gitignore file. (Reason being I'd like to start moving away from the current installation instructions which suggest symlinking your rbenv checkout to ~/.rbenv.)

Contributor

sstephenson commented Sep 24, 2011

I don't think we should have an empty plugins directory in the repo itself, but we should add /plugins to the root .gitignore file. (Reason being I'd like to start moving away from the current installation instructions which suggest symlinking your rbenv checkout to ~/.rbenv.)

@scoz

This comment has been minimized.

Show comment
Hide comment
@scoz

scoz Sep 24, 2011

Are you planning on suggesting a root or system-wide installation?

scoz commented Sep 24, 2011

Are you planning on suggesting a root or system-wide installation?

cehoffman pushed a commit to cehoffman/rbenv that referenced this pull request Apr 8, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment