Merge pull request #332 from mlinksva/rst

Nominally support README.rst
This commit is contained in:
Mike Linksvayer 2018-09-04 17:27:44 +00:00 committed by GitHub
commit d4ab04f33b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -1,7 +1,7 @@
module Licensee
module ProjectFiles
class ReadmeFile < Licensee::ProjectFiles::LicenseFile
EXTENSIONS = %w[md markdown mdown txt rdoc].freeze
EXTENSIONS = %w[md markdown mdown txt rdoc rst].freeze
SCORES = {
/\AREADME\z/i => 1.0,
/\AREADME\.(#{Regexp.union(EXTENSIONS).source})\z/i => 0.9

View File

@ -12,6 +12,7 @@ RSpec.describe Licensee::ProjectFiles::ReadmeFile do
'readme.txt' => 0.9,
'readme.mdown' => 0.9,
'readme.rdoc' => 0.9,
'readme.rst' => 0.9,
'LICENSE' => 0.0
}.each do |filename, expected_score|
context "with a file named #{filename}" do