From 8d20c1fb593fc57b485a8641c618ddc161196683 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Tue, 11 Aug 2015 09:39:41 +0100 Subject: [PATCH] More inclusive documentation matches for License and Readme files --- lib/linguist/documentation.yml | 2 ++ test/test_blob.rb | 3 +++ 2 files changed, 5 insertions(+) diff --git a/lib/linguist/documentation.yml b/lib/linguist/documentation.yml index 04649b5b..230cd423 100644 --- a/lib/linguist/documentation.yml +++ b/lib/linguist/documentation.yml @@ -22,7 +22,9 @@ - (^|/)COPYING(\.|$) - (^|/)INSTALL(\.|$) - (^|/)LICEN[CS]E(\.|$) +- (^|/)[Ll]icen[cs]e(\.|$) - (^|/)README(\.|$) +- (^|/)[Rr]eadme(\.|$) # Samples folders - ^[Ss]amples/ diff --git a/test/test_blob.rb b/test/test_blob.rb index 6c705379..0a1cefe9 100644 --- a/test/test_blob.rb +++ b/test/test_blob.rb @@ -514,6 +514,8 @@ class TestBlob < Minitest::Test assert_predicate fixture_blob("README"), :documentation? assert_predicate fixture_blob("README.md"), :documentation? assert_predicate fixture_blob("README.txt"), :documentation? + assert_predicate fixture_blob("Readme"), :documentation? + assert_predicate fixture_blob("readme"), :documentation? assert_predicate fixture_blob("foo/README"), :documentation? assert_predicate fixture_blob("CHANGE"), :documentation? @@ -541,6 +543,7 @@ class TestBlob < Minitest::Test assert_predicate fixture_blob("LICENSE"), :documentation? assert_predicate fixture_blob("LICENCE.md"), :documentation? + assert_predicate fixture_blob("License.txt"), :documentation? assert_predicate fixture_blob("LICENSE.txt"), :documentation? assert_predicate fixture_blob("foo/LICENSE"), :documentation?