Permalink
Browse files

Auto-detecting PHP

Change-Id: I78db0764da59c793720e392efef1ce6a752cadcc
  • Loading branch information...
Lucas Carlson Patrick Bozeman
Lucas Carlson authored and Patrick Bozeman committed Jul 5, 2011
1 parent f7cf181 commit 195535ea664ac733a30988ddfeba6f4dc1632131
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/cli/frameworks.rb
View
@@ -13,6 +13,7 @@ class Framework
'JavaWeb' => ['java_web', { :mem => '512M', :description => 'Java Web Application'}],
'Sinatra' => ['sinatra', { :mem => '128M', :description => 'Sinatra Application'}],
'Node' => ['node', { :mem => '64M', :description => 'Node.js Application'}],
+ 'PHP' => ['php', { :mem => '128M', :description => 'PHP Application'}],
'Erlang/OTP Rebar' => ['otp_rebar', { :mem => '64M', :description => 'Erlang/OTP Rebar Application'}]
}
@@ -73,6 +74,10 @@ def detect(path)
return Framework.lookup('Node')
end
+ # PHP
+ elsif !Dir.glob('*.php').empty?
+ return Framework.lookup('PHP')
+
# Erlang/OTP using Rebar
elsif !Dir.glob('releases/*/*.rel').empty? && !Dir.glob('releases/*/*.boot').empty?
return Framework.lookup('Erlang/OTP Rebar')

0 comments on commit 195535e

Please sign in to comment.