update a few things

This commit is contained in:
John Bintz 2012-02-12 18:42:29 -05:00
parent b2c4e2808f
commit d7015e9608
7 changed files with 34 additions and 1 deletions

View File

@ -32,6 +32,10 @@ http {
gzip_types text/plain text/html text/css application/x-javascript text/xml
application/xml application/xml+rss text/javascript;
passenger_root /usr/local/ruby/lib/ruby/gems/1.9.1/gems/passenger-<%= version %>;
passenger_ruby /usr/local/ruby/bin/ruby;
passenger_max_pool_size 10;
include /etc/nginx/fastcgi.conf;
include /etc/nginx/sites-enabled/*;
}

View File

@ -0,0 +1,10 @@
class ruby-debian {
$packages = [
'libyaml-dev', 'libreadline-dev', 'libssl-dev', 'libffi-dev',
'libncurses5-dev', 'libcurl4-openssl-dev',
'libxml2', 'libxml2-dev', 'libxslt1.1', 'libxslt1-dev'
]
package { $packages: ensure => installed }
}

View File

@ -11,6 +11,7 @@ class ruby($version) {
gem { 'bundler':
require => Build_and_install[$name],
path => $with_ruby_path,
options => '--pre',
ensure => present
}

View File

@ -20,11 +20,22 @@ Puppet::Type.type(:gem).provide(:install) do
if @resource[:version] && !@resource[:version].empty?
version = " -v #{@resource[:version]}"
end
version
end
def options
options = ''
if @resource[:options] && !@resource[:options].empty?
options = " #{@resource[:options]}"
end
options
end
def gem_command(what)
command = %{bash -c 'PATH=#{@resource[:path]} gem #{what} #{@resource[:name]} #{version}'}
command = %{bash -c 'PATH=#{@resource[:path]} gem #{what} #{@resource[:name]} #{options} #{version}'}.tap { |o| p o }
command
end
end

View File

@ -14,5 +14,9 @@ Puppet::Type.newtype(:gem) do
newparam(:path) do
desc "The binary search path"
end
newparam(:options) do
desc "Gem install options"
end
end

View File

@ -0,0 +1,3 @@
define init_d($template) {
}