Skip to content
This repository has been archived by the owner on Dec 2, 2020. It is now read-only.

Commit

Permalink
Merge pull request #141 from salimane/plugin
Browse files Browse the repository at this point in the history
Fix plugin type throwing error when not installing through hiera yaml
  • Loading branch information
jacobbednarz committed May 29, 2016
2 parents ed33a20 + a2ed663 commit e34cf9f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
7 changes: 0 additions & 7 deletions manifests/rbenv.pp
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,6 @@
}

if !empty($plugins) and $ensure != 'absent' {

file { "${prefix}/plugins":
ensure => directory,
require => Repository[$prefix]
}

create_resources('ruby::rbenv::plugin', $plugins)

}
}
7 changes: 7 additions & 0 deletions manifests/rbenv/plugin.pp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@
require ruby

if $ruby::provider == 'rbenv' {

$plugins_dir_params = {
ensure => directory,
require => Repository[$ruby::rbenv::prefix]
}
ensure_resource('file', "${ruby::rbenv::prefix}/plugins", $plugins_dir_params)

repository { "${ruby::rbenv::prefix}/plugins/${name}":
ensure => $ensure,
force => true,
Expand Down
1 change: 1 addition & 0 deletions spec/defines/ruby_rbenv_plugin_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
context "ensure => present" do
it do
should contain_class('ruby')
should contain_file('/test/boxen/rbenv/plugins')
should contain_repository('/test/boxen/rbenv/plugins/rbenv-vars')
end
end
Expand Down

0 comments on commit e34cf9f

Please sign in to comment.