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

Generic method to install rbenv plugins? #101

Open
chino opened this issue May 24, 2014 · 4 comments
Open

Generic method to install rbenv plugins? #101

chino opened this issue May 24, 2014 · 4 comments

Comments

@chino
Copy link

chino commented May 24, 2014

I copied the pattern used for rbenv-vars and ruby-build in the cookbook to create a generic function that would let me install any plugin.

Something like this could be provided as a way for a user to install any plugin instead of hard coding various plugins into the cookbook?

def install_plugin name, git_url, git_ref
        include_recipe "git"
        plugin_path = "#{node[:rbenv][:root]}/plugins/#{name}"
        with_home_for_user(node[:rbenv][:user]) do
                git plugin_path do
                        repository git_url
                        reference  git_ref
                        action :sync
                        user node[:rbenv][:user]
                        group node[:rbenv][:group]
                end
        end
end
@chino
Copy link
Author

chino commented Jul 25, 2014

Is there a better chance of getting this accepted if I make a pull request?

@MrMMorris
Copy link

I would love this functionality!

@chino
Copy link
Author

chino commented Sep 17, 2014

Would be nice if someone answered..

@ivey
Copy link
Contributor

ivey commented Sep 18, 2014

We're not actively working on this cookbook, and we don't use rbenv plugins - but we'd be happy to review a PR.

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

No branches or pull requests

3 participants