lib/linguist/generated.rb in github-linguist-2.10.11 vs lib/linguist/generated.rb in github-linguist-2.10.13
- old
+ new
@@ -60,11 +60,12 @@
generated_net_designer_file? ||
generated_postscript? ||
generated_protocol_buffer? ||
generated_jni_header? ||
composer_lock? ||
- node_modules?
+ node_modules? ||
+ vcr_cassette?
end
# Internal: Is the blob an XCode project file?
#
# Generated if the file extension is an XCode project
@@ -232,8 +233,18 @@
# Internal: Is the blob a generated php composer lock file?
#
# Returns true or false.
def composer_lock?
!!name.match(/composer.lock/)
+ end
+
+ # Is the blob a VCR Cassette file?
+ #
+ # Returns true or false
+ def vcr_cassette?
+ return false unless extname == '.yml'
+ return false unless lines.count > 2
+ # VCR Cassettes have "recorded_with: VCR" in the second last line.
+ return lines[-2].include?("recorded_with: VCR")
end
end
end