Created
March 14, 2011 09:26
-
-
Save leonid-shevtsov/868931 to your computer and use it in GitHub Desktop.
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
found = %w(html body h1 h2 h3 h4 h5 h6 a ul ol li p div i b strong em) | |
not_found = [] | |
File.read('app/stylesheets/common.sass').each do |line| | |
next if line =~ /^[\s|@|\/]/ | |
elements = line.strip.split(/[^\w\-_]/).reject{|l| l==''}.reject{|l| found.include?(l) || not_found.include?(l)} | |
elements.each do |element| | |
result = `ack-grep #{element} --nocss` | |
if result.length>0 | |
puts element | |
found << element | |
else | |
puts "#{element} == not found ==" | |
not_found << element | |
File.open('not_found.txt','w') {|f| f.puts not_found.join("\n")} | |
end | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment