diff --git a/lib/linguist/blob_helper.rb b/lib/linguist/blob_helper.rb index 50337956..96184c65 100644 --- a/lib/linguist/blob_helper.rb +++ b/lib/linguist/blob_helper.rb @@ -353,12 +353,6 @@ module Linguist end end - shebangs = YAML.load_file(File.expand_path("../shebangs.yml", __FILE__)) - Shebangs = shebangs.inject({}) { |h, (name, scripts)| - scripts.each { |script| h[script] = Language[name] } - h - } - # Internal: Get Language for shebang script # # Matches script name with shebang script name mappings in "shebangs.yml" @@ -366,12 +360,8 @@ module Linguist # Returns the Language or nil def shebang_language if script = shebang_script - if lang = Shebangs[script] - lang - else - lang = Language[script] - lang != Language['Text'] ? lang : nil - end + lang = Language[script] + lang != Language['Text'] ? lang : nil end end diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index ad605fb9..a46b91cd 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -271,6 +271,7 @@ Groovy: JavaScript: :aliases: - js + - node :ext: - .js - .sjs @@ -334,6 +335,8 @@ Myghty: - .myt Nu: :lexer: scheme + :aliases: + - nush :ext: - .nu - Nukefile @@ -437,6 +440,11 @@ Redcode: :ext: - .cw Ruby: + :aliases: + - jruby + - macruby + - rake + - rbx :ext: - .rb - .ru diff --git a/lib/linguist/shebangs.yml b/lib/linguist/shebangs.yml deleted file mode 100644 index 8a6c47b6..00000000 --- a/lib/linguist/shebangs.yml +++ /dev/null @@ -1,23 +0,0 @@ -# Maps shebang script names to Language names -# -# Language names are implicitly mapped to their downcased versions, -# so this would be redundant: -# -# Ruby: -# - ruby - -Java: -- groovy - -# JavaScript interpreters -JavaScript: -- node - -# Ruby interpreters and runners -Ruby: -- macruby -- rake - -# Nu shell -Nu: -- nush