Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #16 from yarrow/tweaks

3 Tweaks - RedHat, specific rvm version, fixup for Ruby 1.8
  • Loading branch information...
commit 0ed76e0babe1a1c88a5b08fc6bbc00f2d357615e 2 parents 20f9f91 + d597ff6
@blt04 blt04 authored
View
8 lib/puppet/provider/rvm_system_ruby/rvm_system_ruby.rb
@@ -1,3 +1,11 @@
+# Backport :lines to 1.8 if necessary
+# See http://oreilly.com/ruby/excerpts/ruby-best-practices/writing-backward-compatible.html
+class String
+ unless "".respond_to?(:lines)
+ alias_method :lines, :to_a
+ end
+end
+
Puppet::Type.type(:rvm_system_ruby).provide(:rvm) do
desc "Ruby RVM support."
View
2  manifests/classes/dependencies.pp
@@ -1,6 +1,6 @@
class rvm::dependencies {
case $operatingsystem {
Ubuntu: { require rvm::dependencies::ubuntu }
- CentOS: { require rvm::dependencies::centos }
+ CentOS,RedHat: { require rvm::dependencies::centos }
}
}
View
4 manifests/classes/passenger.pp
@@ -11,7 +11,7 @@
case $operatingsystem {
Ubuntu: { include rvm::passenger::apache::ubuntu::pre }
- CentOS: { include rvm::passenger::apache::centos::pre }
+ CentOS,RedHat: { include rvm::passenger::apache::centos::pre }
}
class {
@@ -28,6 +28,6 @@
case $operatingsystem {
Ubuntu: { include rvm::passenger::apache::ubuntu::post }
- CentOS: { include rvm::passenger::apache::centos::post }
+ CentOS,RedHat: { include rvm::passenger::apache::centos::post }
}
}
View
4 manifests/classes/system.pp
@@ -1,10 +1,10 @@
-class rvm::system {
+class rvm::system($version='latest') {
include rvm::dependencies
exec { 'system-rvm':
path => '/usr/bin:/usr/sbin:/bin',
- command => 'bash -c \'/usr/bin/curl -s https://rvm.beginrescueend.com/install/rvm -o rvm-installer ; chmod +x rvm-installer ; rvm_bin_path=/usr/local/rvm/bin rvm_man_path=/usr/local/rvm/man ./rvm-installer\'',
+ command => "bash -c '/usr/bin/curl -s https://rvm.beginrescueend.com/install/rvm -o rvm-installer ; chmod +x rvm-installer ; rvm_bin_path=/usr/local/rvm/bin rvm_man_path=/usr/local/rvm/man ./rvm-installer --version ${version}'",
creates => '/usr/local/rvm/bin/rvm',
require => [
Class['rvm::dependencies'],
Please sign in to comment.
Something went wrong with that request. Please try again.