mirror of
https://github.com/KevinMidboe/linguist.git
synced 2026-01-09 10:55:32 +00:00
require shebang when building samples
This commit is contained in:
@@ -6,6 +6,7 @@ end
|
|||||||
|
|
||||||
require 'linguist/md5'
|
require 'linguist/md5'
|
||||||
require 'linguist/classifier'
|
require 'linguist/classifier'
|
||||||
|
require 'linguist/shebang'
|
||||||
|
|
||||||
module Linguist
|
module Linguist
|
||||||
# Model for accessing classifier training data.
|
# Model for accessing classifier training data.
|
||||||
@@ -61,7 +62,7 @@ module Linguist
|
|||||||
yield({
|
yield({
|
||||||
:path => path,
|
:path => path,
|
||||||
:language => category,
|
:language => category,
|
||||||
:interpreter => Linguist.interpreter_from_shebang(File.read(path)),
|
:interpreter => Shebang.interpreter(File.read(path)),
|
||||||
:extname => File.extname(filename)
|
:extname => File.extname(filename)
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user