Created
November 9, 2011 22:51
-
-
Save daveaugustine/1353424 to your computer and use it in GitHub Desktop.
Check JS Jammit Manifest for untracked files
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
# Check the jammit asset manifest for files that have not been tracked | |
# Only javascripts for now since we gitignore sass generated .css files | |
# TODO check for .css and .scss files | |
require 'rubygems' | |
require 'jammit' | |
j = Jammit.load_configuration(Jammit::DEFAULT_CONFIG_PATH) | |
files = j.configuration[:javascripts].values.flatten.uniq | |
errors = [] | |
files.each do |f| | |
errors.push f if `git ls-files #{f}`.empty? | |
end | |
if errors.length > 0 | |
puts 'Jammit doesn\'t have: ' << errors.join(", ") | |
flag = true | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment