Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

move to platform_family syntax

  • Loading branch information...
commit 39723e754a95d4dbcf91d251bb598428ec7fd2da 1 parent 51a2c2a
Chris Lundquist authored
2  metadata.rb
View
@@ -4,6 +4,8 @@
description "Installs/Configures nodejs"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version "1.0.1"
+name "nodejs"
+provides "nodejs"
recipe "nodejs", "Installs Node.JS based on the default installation method"
recipe "nodejs::install_from_source", "Installs Node.JS from source"
6 recipes/install_from_package.rb
View
@@ -18,8 +18,8 @@
# limitations under the License.
#
-case node['platform']
- when 'centos', 'redhat', 'scientific', 'amazon', 'fedora'
+case node['platform_family']
+ when 'rhel', 'fedora'
file = '/usr/local/src/nodejs-stable-release.noarch.rpm'
remote_file file do
@@ -35,7 +35,7 @@
%w{ nodejs nodejs-compat-symlinks npm }.each do |pkg|
package pkg
end
- when 'ubuntu'
+ when 'debian'
apt_repository 'node.js' do
uri 'http://ppa.launchpad.net/chris-lea/node.js/ubuntu'
distribution node['lsb']['codename']
8 recipes/install_from_source.rb
View
@@ -20,10 +20,10 @@
include_recipe "build-essential"
-case node['platform']
- when 'centos','redhat','fedora','amazon','scientific'
+case node['platform_family']
+ when 'rhel','fedora'
package "openssl-devel"
- when 'debian','ubuntu'
+ when 'debian'
package "libssl-dev"
end
@@ -38,7 +38,7 @@
source nodejs_src_url
checksum node['nodejs']['checksum']
mode 0644
- action :create_if_missing
+ action :create_if_missing
end
# --no-same-owner required overcome "Cannot change ownership" bug
Please sign in to comment.
Something went wrong with that request. Please try again.