diff --git a/attributes/default.rb b/attributes/default.rb index 51a7743..1fc045b 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -46,4 +46,4 @@ # The name of the tarball to download (this is automatically calculated from # the phantomjs version and kernel type) -default['phantomjs']['basename'] = "phantomjs-#{node['phantomjs']['version']}-linux-#{node['kernel']['machine']}" +default['phantomjs']['basename'] = "phantomjs-%{version}-linux-%{machine}" diff --git a/recipes/source.rb b/recipes/source.rb index ae17671..181d70f 100644 --- a/recipes/source.rb +++ b/recipes/source.rb @@ -28,9 +28,9 @@ node['phantomjs']['packages'].each { |name| package name } version = node['phantomjs']['version'] -base_url = node['phantomjs']['base_url'] +base_url = node['phantomjs']['base_url'] % { version: version } src_dir = node['phantomjs']['src_dir'] -basename = node['phantomjs']['basename'] +basename = node['phantomjs']['basename'] % { version: version, machine: node['kernel']['machine'] } checksum = node['phantomjs']['checksum'] remote_file "#{src_dir}/#{basename}.tar.bz2" do