Added node_modules/ to generated files.

This commit is contained in:
Frans Krojegård
2013-11-05 09:00:58 +01:00
committed by Frans Krojegård
parent 6ae6882e1a
commit 562ec13696
2 changed files with 12 additions and 1 deletions

View File

@@ -59,7 +59,8 @@ module Linguist
generated_net_docfile? ||
generated_net_designer_file? ||
generated_protocol_buffer? ||
generated_jni_header?
generated_jni_header? ||
node_modules?
end
# Internal: Is the blob an XCode project file?
@@ -193,5 +194,13 @@ module Linguist
return lines[0].include?("/* DO NOT EDIT THIS FILE - it is machine generated */")
return lines[1].include?("#include <jni.h>")
end
# node_modules/ can contain large amounts of files, in general not meant
# for humans in pull requests.
#
# Returns true or false.
def node_modules?
!!name.match(/node_modules\//)
end
end
end

View File

@@ -204,6 +204,8 @@ class TestBlob < Test::Unit::TestCase
# Minified CSS
assert !blob("CSS/bootstrap.css").generated?
assert blob("CSS/bootstrap.min.css").generated?
assert Linguist::Generated.generated?("node_modules/grunt/lib/grunt.js", nil)
end
def test_vendored