lib/passenger/dependencies.rb in passenger-1.0.5 vs lib/passenger/dependencies.rb in passenger-2.0.1
- old
+ new
@@ -1,8 +1,10 @@
# Phusion Passenger - http://www.modrails.com/
# Copyright (C) 2008 Phusion
#
+# Phusion Passenger is a trademark of Hongli Lai & Ninh Bui.
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
@@ -137,11 +139,11 @@
end
elsif RUBY_PLATFORM =~ /freebsd/
dep.install_command = "make -C /usr/ports/lang/ruby18 install"
end
dep.website = "http://www.ruby-lang.org/"
- dep.install_instructions = "Please reinstall Ruby by downloading it from <bold>#{dep.website}</b>"
+ dep.install_instructions = "Please reinstall Ruby by downloading it from <b>#{dep.website}</b>"
end
Ruby_OpenSSL = Dependency.new do |dep|
dep.name = "OpenSSL support for Ruby"
dep.define_checker do |result|
@@ -155,14 +157,15 @@
if RUBY_PLATFORM =~ /linux/
case LINUX_DISTRO
when :ubuntu, :debian
dep.install_command = "apt-get install libopenssl-ruby"
end
- else
+ end
+ if dep.install_command.nil?
dep.website = "http://www.ruby-lang.org/"
dep.install_instructions = "Please (re)install Ruby with OpenSSL " <<
- "support by downloading it from <bold>#{dep.website}</bold>."
+ "support by downloading it from <b>#{dep.website}</b>."
end
end
RubyGems = Dependency.new do |dep|
dep.name = "RubyGems"
@@ -281,9 +284,26 @@
rescue LoadError
result.not_found
end
end
dep.install_instructions = "Please install RubyGems first, then run <b>gem install fastthread</b>"
+ end
+
+ Rack = Dependency.new do |dep|
+ dep.name = "rack"
+ dep.define_checker do |result|
+ begin
+ begin
+ require 'rubygems'
+ rescue LoadError
+ end
+ require 'rack'
+ result.found
+ rescue LoadError
+ result.not_found
+ end
+ end
+ dep.install_instructions = "Please install RubyGems first, then run <b>gem install rack</b>"
end
end
end # module Passenger