Skip to content

Instantly share code, notes, and snippets.

@urbanautomaton
Forked from rentalcustard/gist:4681932
Last active December 12, 2015 00:09
Show Gist options
  • Save urbanautomaton/4682050 to your computer and use it in GitHub Desktop.
Save urbanautomaton/4682050 to your computer and use it in GitHub Desktop.
#unverified.list obtained from https://gist.github.com/raw/865b05630be54544ca72/a1a0c114d5eab0e65efccc941ca013fd06e6f43c/unverified.list
File.readlines("unverified.list").map do |line|
gem_file = line.split.last.gsub("./", "")
m = gem_file.match(/(.*)-((?:\d+.)*\d+.*)\.gem/)
[m[1], m[2]]
end.sort.uniq.each do |gem, version|
in_gemfile_lock = system %Q{grep -q "#{gem} (#{version})" Gemfile.lock}
puts "Unsafe #{gem} (#{version})" if in_gemfile_lock
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment