Extensions aren't actually required

This commit is contained in:
Brandon Keepers
2014-11-17 20:00:09 -05:00
parent 63c83d014b
commit cd7549390e
2 changed files with 2 additions and 8 deletions

View File

@@ -595,9 +595,9 @@ module Linguist
:ace_mode => options['ace_mode'],
:wrap => options['wrap'],
:group_name => options['group'],
:searchable => options.key?('searchable') ? options['searchable'] : true,
:searchable => options.fetch('searchable', true),
:search_term => options['search_term'],
:extensions => [options['extensions'].first] + options['extensions'][1..-1].sort,
:extensions => Array(options['extensions']),
:interpreters => options['interpreters'].sort,
:filenames => options['filenames'],
:popular => popular.include?(name)

View File

@@ -349,12 +349,6 @@ class TestLanguage < Test::Unit::TestCase
assert_equal '.coffee', Language['CoffeeScript'].primary_extension
assert_equal '.t', Language['Turing'].primary_extension
assert_equal '.ts', Language['TypeScript'].primary_extension
# This is a nasty requirement, but there's some code in GitHub that
# expects this. Really want to drop this.
Language.all.each do |language|
assert language.primary_extension, "#{language} has no primary extension"
end
end
def test_eql