Detect language from shebang script

This commit is contained in:
Joshua Peek
2011-05-13 16:18:30 -05:00
parent 74b26fdfc9
commit 5edd3a02be
22 changed files with 155 additions and 0 deletions

3
test/fixtures/blob/Capfile vendored Normal file
View 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
View File

@@ -0,0 +1,2 @@
README
======

3
test/fixtures/blob/Rakefile vendored Normal file
View File

@@ -0,0 +1,3 @@
task :default do
puts "Rake"
end

View 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
View File

@@ -0,0 +1 @@
(print "Dude!")

1
test/fixtures/blob/dude.js vendored Normal file
View File

@@ -0,0 +1 @@
alert("dude!")

2
test/fixtures/blob/grit.rb vendored Normal file
View File

@@ -0,0 +1,2 @@
module Grit
end

2
test/fixtures/blob/script.bash vendored Normal file
View File

@@ -0,0 +1,2 @@
#!/bin/bash
echo "bash"

2
test/fixtures/blob/script.foo vendored Normal file
View File

@@ -0,0 +1,2 @@
#!/bin/foo
???

2
test/fixtures/blob/script.groovy vendored Normal file
View File

@@ -0,0 +1,2 @@
#!/usr/bin/env groovy
println "Groovy!"

2
test/fixtures/blob/script.js vendored Normal file
View File

@@ -0,0 +1,2 @@
#!/usr/bin/env node
console.log("Node")

2
test/fixtures/blob/script.mrb vendored Normal file
View File

@@ -0,0 +1,2 @@
#!/usr/bin/env macruby
puts "MacRuby"

2
test/fixtures/blob/script.pl vendored Normal file
View File

@@ -0,0 +1,2 @@
#!/usr/local/bin/perl
print "Perl\n"

2
test/fixtures/blob/script.py vendored Normal file
View File

@@ -0,0 +1,2 @@
#!/usr/bin/env python2.4
print "Python"

4
test/fixtures/blob/script.rake vendored Normal file
View File

@@ -0,0 +1,4 @@
#!/usr/bin/env rake
task :default do
puts "Rake"
end

2
test/fixtures/blob/script.rb vendored Normal file
View File

@@ -0,0 +1,2 @@
#!/usr/bin/env ruby
puts "Ruby"

2
test/fixtures/blob/script.sh vendored Normal file
View File

@@ -0,0 +1,2 @@
#!/bin/sh
echo "sh"

2
test/fixtures/blob/script.zsh vendored Normal file
View File

@@ -0,0 +1,2 @@
#!/bin/zsh
echo "zsh"

2
test/fixtures/blob/script2.rb vendored Normal file
View File

@@ -0,0 +1,2 @@
#! /usr/bin/env ruby -w -Ilib:test
echo "Ruby"

3
test/fixtures/blob/subdir/Rakefile vendored Normal file
View File

@@ -0,0 +1,3 @@
task :default do
puts "Rake (subdir)"
end