Skip to content
This repository has been archived by the owner on Dec 18, 2019. It is now read-only.

Commit

Permalink
@pkgupgrade_whiltelist was not used (also closes #12)
Browse files Browse the repository at this point in the history
  • Loading branch information
timurb committed Feb 26, 2015
1 parent 5d6d6d2 commit 8d55b7f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions rules.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@
tags %w{correctness recipe etsy}
recipe do |ast|
pres = find_resources(ast, :type => 'package').find_all do |cmd|
cmd_str = (resource_attribute(cmd, 'action') || resource_name(cmd)).to_s
cmd_str.include?('upgrade')
cmd_action = resource_attribute(cmd, 'action').to_s
cmd_name = (resource_attribute(cmd, 'package_name') || resource_name(cmd)).to_s
cmd_action.include?('upgrade') && !@pkgupgrade_whitelist.include?(cmd_name)
end
ypres = find_resources(ast, :type => 'yum_package').find_all do |cmd|
cmd_str = (resource_attribute(cmd, 'action') || resource_name(cmd)).to_s
cmd_str.include?('upgrade')
cmd_action = resource_attribute(cmd, 'action').to_s
cmd_name = (resource_attribute(cmd, 'package_name') || resource_name(cmd)).to_s
cmd_action.include?('upgrade') && !@pkgupgrade_whitelist.include?(cmd_name)
end
pres.concat(ypres).map{|cmd| match(cmd)}
pres.concat(ypres).map{|cmd| match(cmd)}
end
end

Expand Down

0 comments on commit 8d55b7f

Please sign in to comment.