diff --git a/attributes/passenger.rb b/attributes/passenger.rb index 89110e3e2..361b142e0 100644 --- a/attributes/passenger.rb +++ b/attributes/passenger.rb @@ -33,6 +33,9 @@ node.default['nginx']['passenger']['ruby'] = '/usr/bin/ruby' end +node.default['nginx']['passenger']['packages']['rhel'] = %w[ruby-devel curl-devel] +node.default['nginx']['passenger']['packages']['debian'] = %w[ruby-dev libcurl4-gnutls-dev] + node.default['nginx']['passenger']['spawn_method'] = 'smart-lv2' node.default['nginx']['passenger']['buffer_response'] = 'on' node.default['nginx']['passenger']['max_pool_size'] = 6 diff --git a/recipes/passenger.rb b/recipes/passenger.rb index 36f2d6561..5b6cfbf4e 100644 --- a/recipes/passenger.rb +++ b/recipes/passenger.rb @@ -18,12 +18,14 @@ # packages = value_for_platform_family( - %w[rhel] => %w[ruby-devel curl-devel], - %w[debian] => %w[ruby-dev libcurl4-gnutls-dev] + %w[rhel] => node['nginx']['passenger']['packages']['rhel'], + %w[debian] => node['nginx']['passenger']['packages']['debian'] ) -packages.each do |name| - package name +unless packages.empty? + packages.each do |name| + package name + end end gem_package 'rake'