RiotGamesCookbooks / rbenv-cookbook

Installs and configures rbenv
http://community.opscode.com/cookbooks/rbenv
Apache License 2.0
137 stars 109 forks source link

Generic method to install rbenv plugins? #101

Open chino opened 10 years ago

chino commented 10 years ago

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 commented 10 years ago

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

MrMMorris commented 9 years ago

I would love this functionality!

chino commented 9 years ago

Would be nice if someone answered..

ivey commented 9 years ago

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