lib/linguist/generated.rb in github-linguist-5.3.3 vs lib/linguist/generated.rb in github-linguist-6.0.0
- old
+ new
@@ -50,10 +50,12 @@
# `test/test_blob.rb#test_generated` if you make any changes.
#
# Return true or false
def generated?
xcode_file? ||
+ cocoapods? ||
+ carthage_build? ||
generated_net_designer_file? ||
generated_net_specflow_feature_file? ||
composer_lock? ||
node_modules? ||
go_vendor? ||
@@ -91,9 +93,23 @@
# file extension.
#
# Returns true of false.
def xcode_file?
['.nib', '.xcworkspacedata', '.xcuserstate'].include?(extname)
+ end
+
+ # Internal: Is the blob part of Pods/, which contains dependencies not meant for humans in pull requests.
+ #
+ # Returns true or false.
+ def cocoapods?
+ !!name.match(/(^Pods|\/Pods)\//)
+ end
+
+ # Internal: Is the blob part of Carthage/Build/, which contains dependencies not meant for humans in pull requests.
+ #
+ # Returns true or false.
+ def carthage_build?
+ !!name.match(/(^|\/)Carthage\/Build\//)
end
# Internal: Is the blob minified files?
#
# Consider a file minified if the average line length is