added VCR Cassette to the 'generated' list so they get suppressed

This commit is contained in:
Nayeem Syed
2014-03-06 12:00:54 +00:00
parent 115ac6b999
commit 210ca9a86f
3 changed files with 33 additions and 1 deletions

View File

@@ -62,7 +62,8 @@ module Linguist
generated_protocol_buffer? ||
generated_jni_header? ||
composer_lock? ||
node_modules?
node_modules? ||
vcr_cassette?
end
# Internal: Is the blob an XCode project file?
@@ -235,5 +236,13 @@ module Linguist
def composer_lock?
!!name.match(/composer.lock/)
end
# Is the blob a VCR Cassette file?
#
# Returns true or false
def vcr_cassette?
# VCR Cassettes have "recorded_with: VCR" in the second last line.
return lines[-2].include?("recorded_with: VCR")
end
end
end