mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Detect language from shebang script
This commit is contained in:
3
test/fixtures/blob/Capfile
vendored
Normal file
3
test/fixtures/blob/Capfile
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
load 'deploy'
|
||||
Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
|
||||
load 'config/deploy'
|
||||
2
test/fixtures/blob/README
vendored
Normal file
2
test/fixtures/blob/README
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
README
|
||||
======
|
||||
3
test/fixtures/blob/Rakefile
vendored
Normal file
3
test/fixtures/blob/Rakefile
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
task :default do
|
||||
puts "Rake"
|
||||
end
|
||||
4
test/fixtures/blob/dude-thing-okay--001.patch
vendored
Normal file
4
test/fixtures/blob/dude-thing-okay--001.patch
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
diff --git a/lib/linguist.rb b/lib/linguist.rb
|
||||
index d472341..8ad9ffb 100644
|
||||
--- a/lib/linguist.rb
|
||||
+++ b/lib/linguist.rb
|
||||
1
test/fixtures/blob/dude.el
vendored
Normal file
1
test/fixtures/blob/dude.el
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(print "Dude!")
|
||||
1
test/fixtures/blob/dude.js
vendored
Normal file
1
test/fixtures/blob/dude.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
alert("dude!")
|
||||
2
test/fixtures/blob/grit.rb
vendored
Normal file
2
test/fixtures/blob/grit.rb
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
module Grit
|
||||
end
|
||||
2
test/fixtures/blob/script.bash
vendored
Normal file
2
test/fixtures/blob/script.bash
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
echo "bash"
|
||||
2
test/fixtures/blob/script.foo
vendored
Normal file
2
test/fixtures/blob/script.foo
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/bin/foo
|
||||
???
|
||||
2
test/fixtures/blob/script.groovy
vendored
Normal file
2
test/fixtures/blob/script.groovy
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env groovy
|
||||
println "Groovy!"
|
||||
2
test/fixtures/blob/script.js
vendored
Normal file
2
test/fixtures/blob/script.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env node
|
||||
console.log("Node")
|
||||
2
test/fixtures/blob/script.mrb
vendored
Normal file
2
test/fixtures/blob/script.mrb
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env macruby
|
||||
puts "MacRuby"
|
||||
2
test/fixtures/blob/script.pl
vendored
Normal file
2
test/fixtures/blob/script.pl
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/usr/local/bin/perl
|
||||
print "Perl\n"
|
||||
2
test/fixtures/blob/script.py
vendored
Normal file
2
test/fixtures/blob/script.py
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env python2.4
|
||||
print "Python"
|
||||
4
test/fixtures/blob/script.rake
vendored
Normal file
4
test/fixtures/blob/script.rake
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env rake
|
||||
task :default do
|
||||
puts "Rake"
|
||||
end
|
||||
2
test/fixtures/blob/script.rb
vendored
Normal file
2
test/fixtures/blob/script.rb
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env ruby
|
||||
puts "Ruby"
|
||||
2
test/fixtures/blob/script.sh
vendored
Normal file
2
test/fixtures/blob/script.sh
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
echo "sh"
|
||||
2
test/fixtures/blob/script.zsh
vendored
Normal file
2
test/fixtures/blob/script.zsh
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/bin/zsh
|
||||
echo "zsh"
|
||||
2
test/fixtures/blob/script2.rb
vendored
Normal file
2
test/fixtures/blob/script2.rb
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
#! /usr/bin/env ruby -w -Ilib:test
|
||||
echo "Ruby"
|
||||
3
test/fixtures/blob/subdir/Rakefile
vendored
Normal file
3
test/fixtures/blob/subdir/Rakefile
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
task :default do
|
||||
puts "Rake (subdir)"
|
||||
end
|
||||
Reference in New Issue
Block a user