From 3e63ce3c71620433dc135959b2743aa010b28fe1 Mon Sep 17 00:00:00 2001 From: varac Date: Tue, 17 May 2016 12:52:57 +0200 Subject: update submodules so "rake test" doesnt complain anymore --- puppet/modules/bundler | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'puppet/modules/bundler/manifests/install.pp') diff --git a/puppet/modules/bundler b/puppet/modules/bundler index b4a4a843..bacec3e0 160000 --- a/puppet/modules/bundler +++ b/puppet/modules/bundler @@ -1 +1 @@ -Subproject commit b4a4a8434616247156e59b860b47cc6256ead8d1 +Subproject commit bacec3e072649be4ade56f7df8506b46ae9c5166 -- cgit v1.2.3 From 7ce3190986cf8e5fe037a7ccd4c1076505b117f4 Mon Sep 17 00:00:00 2001 From: Micah Date: Tue, 12 Jul 2016 16:41:59 -0400 Subject: remove submodules in preparation for move to subrepos Change-Id: Ia7655153b556337f676e3d909559c4a7306bedd6 --- puppet/modules/bundler | 1 - 1 file changed, 1 deletion(-) delete mode 160000 puppet/modules/bundler (limited to 'puppet/modules/bundler/manifests/install.pp') diff --git a/puppet/modules/bundler b/puppet/modules/bundler deleted file mode 160000 index bacec3e0..00000000 --- a/puppet/modules/bundler +++ /dev/null @@ -1 +0,0 @@ -Subproject commit bacec3e072649be4ade56f7df8506b46ae9c5166 -- cgit v1.2.3 From b5c3c14ae094bff896d19ee37f967e8fc8c34017 Mon Sep 17 00:00:00 2001 From: Micah Date: Tue, 12 Jul 2016 16:46:00 -0400 Subject: git subrepo clone https://leap.se/git/puppet_bundler puppet/modules/bundler subrepo: subdir: "puppet/modules/bundler" merged: "bacec3e" upstream: origin: "https://leap.se/git/puppet_bundler" branch: "master" commit: "bacec3e" git-subrepo: version: "0.3.0" origin: "https://github.com/ingydotnet/git-subrepo" commit: "1e79595" Change-Id: I7596e2c4abf326acbce2a01c363e9694626e230f --- puppet/modules/bundler/manifests/install.pp | 64 +++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 puppet/modules/bundler/manifests/install.pp (limited to 'puppet/modules/bundler/manifests/install.pp') diff --git a/puppet/modules/bundler/manifests/install.pp b/puppet/modules/bundler/manifests/install.pp new file mode 100644 index 00000000..1524de31 --- /dev/null +++ b/puppet/modules/bundler/manifests/install.pp @@ -0,0 +1,64 @@ +# Class bundler::install +# +# Installs bundler Ruby gem manager +# +# == Parameters +# +# [*install_method*] +# How to install bundler, 'rvm' is the default +# [*ruby_version*] +# Ruby version that bundler will use. +# +# == Examples +# +# +# == Requires: +# +# If use_rvm = 'true': +# include rvm +# +class bundler::install ( + $ruby_version = undef, + $ensure = 'present', + $install_method = 'rvm', + $use_rvm = '', + ) inherits bundler::params { + + # deprecation warning + if $use_rvm != '' { + warning('$use_rvm is deprecated, please use $install_method instead') + } + + if ( $install_method == undef ) or ( $install_method == 'package' ) { + $provider_method = undef + } + else { + # backwards compatibility + if $use_rvm == false { + $provider_method = gem + } + else { + $provider_method = $bundler::params::install_method + } + } + + if $provider_method == 'rvm' { + if $ruby_version == undef { + fail('When using rvm, you must pass a ruby_version') + } + else { + #Install bundler with correct RVM + rvm_gem { 'bundler': + ensure => $ensure, + ruby_version => $ruby_version, + } + } + } + else { + package { 'bundler': + ensure => $ensure, + provider => $provider_method, + } + } + +} -- cgit v1.2.3