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 gzip_types text/plain text/html text/css application/x-javascript text/xml
application/xml application/xml+rss text/javascript; 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/fastcgi.conf;
include /etc/nginx/sites-enabled/*; 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': gem { 'bundler':
require => Build_and_install[$name], require => Build_and_install[$name],
path => $with_ruby_path, path => $with_ruby_path,
options => '--pre',
ensure => present ensure => present
} }

View File

@ -20,11 +20,22 @@ Puppet::Type.type(:gem).provide(:install) do
if @resource[:version] && !@resource[:version].empty? if @resource[:version] && !@resource[:version].empty?
version = " -v #{@resource[:version]}" version = " -v #{@resource[:version]}"
end end
version version
end end
def options
options = ''
if @resource[:options] && !@resource[:options].empty?
options = " #{@resource[:options]}"
end
options
end
def gem_command(what) 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 command
end end
end end

View File

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

View File

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