Created
January 31, 2013 10:19
-
-
Save rentalcustard/4681932 to your computer and use it in GitHub Desktop.
Check your Gemfile.lock for unverified Rubygems
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#unverified.list obtained from https://gist.github.com/raw/865b05630be54544ca72/a1a0c114d5eab0e65efccc941ca013fd06e6f43c/unverified.list | |
File.readlines("unverified.list").map do |line| | |
line.split.last.gsub("./", "").gsub(/-(\d+).*/, "") | |
end.sort.uniq.each do |gem| | |
in_gemfile_lock = system "grep -q #{gem} Gemfile.lock" | |
puts "Unsafe #{gem}" if in_gemfile_lock | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment