Skip to content

Commit

Permalink
Merge pull request #173 from maoe/new_resource
Browse files Browse the repository at this point in the history
Add missing new_resource prefixes
  • Loading branch information
bdangit authored Oct 31, 2018
2 parents 30f3491 + 6e3dd5c commit 930d0e2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions resources/install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
end
when 'file'
if platform_family? 'rhel'
file_name = "#{package_name}-#{install_version}.x86_64.rpm"
file_name = "#{new_resource.package_name}-#{new_resource.install_version}.x86_64.rpm"
remote_file "#{Chef::Config[:file_cache_path]}/#{file_name}" do
source "#{node['influxdb']['download_urls']['rhel']}/#{file_name}"
checksum new_resource.checksum
Expand All @@ -68,7 +68,7 @@
end
elsif platform_family? 'debian'
# NOTE: file_name would be influxdb_<version> instead.
file_name = "#{package_name}_#{install_version}_amd64.deb"
file_name = "#{new_resource.package_name}_#{new_resource.install_version}_amd64.deb"
remote_file "#{Chef::Config[:file_cache_path]}/#{file_name}" do
source "#{node['influxdb']['download_urls']['debian']}/#{file_name}"
checksum new_resource.checksum
Expand All @@ -84,7 +84,7 @@
raise "I do not support your platform: #{platform_family?}"
end
else
raise "#{install_type} is not a valid install type."
raise "#{new_resource.install_type} is not a valid install type."
end
end
# rubocop:enable Metrics/BlockLength
Expand Down

0 comments on commit 930d0e2

Please sign in to comment.