Skip to content

Instantly share code, notes, and snippets.

@leonid-shevtsov
Created March 14, 2011 09:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leonid-shevtsov/868931 to your computer and use it in GitHub Desktop.
Save leonid-shevtsov/868931 to your computer and use it in GitHub Desktop.
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