Browse files

Merge branch 'change_namespace' into nginx_change_namespace

Conflicts:

	.gitignore
	Rakefile
	bin/passenger-install-apache2-module
	lib/passenger/templates/apache2/apache_must_be_compiled_with_compatible_mpm.txt.erb
	lib/passenger/templates/apache2/config_snippets.txt.erb
	lib/passenger/templates/apache2/no_write_permission_to_passenger_root.txt.erb
	lib/passenger/templates/apache2_config_snippets.txt.erb
	lib/passenger/templates/apache_must_be_compiled_with_compatible_mpm.txt.erb
	lib/passenger/templates/deployment_example.txt.erb
	lib/passenger/templates/nginx/deployment_example.txt.erb
	lib/passenger/templates/nginx/possible_solutions_for_compilation_and_installation_problems.txt.erb
	lib/passenger/templates/nginx/run_installer_as_root.txt.erb
	lib/passenger/templates/nginx/welcome.txt.erb
	lib/passenger/templates/no_write_permission_to_passenger_root.txt.erb
	lib/passenger/templates/possible_solutions_for_compilation_and_installation_problems.txt.erb
	lib/passenger/templates/run_installer_as_root.txt.erb
	lib/passenger/templates/welcome.txt.erb
	lib/phusion_passenger/templates/apache2_config_snippets.txt.erb
	lib/phusion_passenger/templates/apache_must_be_compiled_with_compatible_mpm.txt.erb
	lib/phusion_passenger/templates/deployment_example.txt.erb
	lib/phusion_passenger/templates/no_write_permission_to_passenger_root.txt.erb
	lib/phusion_passenger/templates/possible_solutions_for_compilation_and_installation_problems.txt.erb
	lib/phusion_passenger/templates/run_installer_as_root.txt.erb
	lib/phusion_passenger/templates/welcome.txt.erb
  • Loading branch information...
2 parents 0a98b7f + 71d1513 commit 9e1994106d9b6cd0068cff3cc8d835b8e8303bc0 @FooBarWidget FooBarWidget committed Feb 3, 2009
Showing with 224 additions and 255 deletions.
  1. +2 −1 .gitignore
  2. +9 −3 DEVELOPERS.TXT
  3. +28 −20 Rakefile
  4. +1 −1 benchmark/dispatcher.rb
  5. +5 −5 bin/passenger-install-apache2-module
  6. +1 −1 bin/passenger-memory-stats
  7. +4 −4 bin/passenger-spawn-server
  8. +2 −2 bin/passenger-status
  9. +5 −5 bin/passenger-stress-test
  10. 0 ext/{passenger → phusion_passenger}/extconf.rb
  11. +1 −1 ext/{passenger → phusion_passenger}/native_support.c
  12. 0 lib/{passenger → phusion_passenger}/abstract_installer.rb
  13. +4 −15 lib/{passenger → phusion_passenger}/abstract_request_handler.rb
  14. +5 −5 lib/{passenger → phusion_passenger}/abstract_server.rb
  15. +3 −3 lib/{passenger → phusion_passenger}/abstract_server_collection.rb
  16. +2 −2 lib/{passenger → phusion_passenger}/admin_tools.rb
  17. +4 −4 lib/{passenger → phusion_passenger}/admin_tools/control_process.rb
  18. +3 −3 lib/{passenger → phusion_passenger}/application.rb
  19. +2 −2 lib/{passenger → phusion_passenger}/console_text_template.rb
  20. +1 −1 lib/{passenger → phusion_passenger}/constants.rb
  21. +3 −3 lib/{passenger → phusion_passenger}/dependencies.rb
  22. +2 −2 lib/{passenger → phusion_passenger}/exceptions.rb
  23. +2 −2 lib/{passenger → phusion_passenger}/html_template.rb
  24. +2 −2 lib/{passenger → phusion_passenger}/message_channel.rb
  25. +5 −5 lib/{passenger → phusion_passenger}/platform_info.rb
  26. +7 −8 lib/{passenger → phusion_passenger}/rack/application_spawner.rb
  27. +3 −3 lib/{passenger → phusion_passenger}/rack/request_handler.rb
  28. +13 −15 lib/{passenger → phusion_passenger}/railz/application_spawner.rb
  29. +2 −2 lib/{passenger → phusion_passenger}/railz/cgi_fixed.rb
  30. +8 −9 lib/{passenger → phusion_passenger}/railz/framework_spawner.rb
  31. +4 −4 lib/{passenger → phusion_passenger}/railz/request_handler.rb
  32. 0 lib/{passenger → phusion_passenger}/simple_benchmarking.rb
  33. +20 −20 lib/{passenger → phusion_passenger}/spawn_manager.rb
  34. 0 ...senger/templates → phusion_passenger/templates/apache2}/app_exited_during_initialization.html.erb
  35. 0 lib/{passenger/templates → phusion_passenger/templates/apache2}/app_init_error.html.erb
  36. 0 lib/{passenger/templates → phusion_passenger/templates/apache2}/database_error.html.erb
  37. 0 lib/{passenger/templates → phusion_passenger/templates/apache2}/error_layout.html.erb
  38. 0 lib/{passenger/templates → phusion_passenger/templates/apache2}/framework_init_error.html.erb
  39. 0 lib/{passenger/templates → phusion_passenger/templates/apache2}/general_error.html.erb
  40. 0 lib/{passenger/templates → phusion_passenger/templates/apache2}/invalid_app_root.html.erb
  41. 0 lib/{passenger/templates → phusion_passenger/templates/apache2}/load_error.html.erb
  42. 0 lib/{passenger/templates → phusion_passenger/templates/apache2}/version_not_found.html.erb
  43. 0 ...es/apache2/config_snippets.txt.erb → phusion_passenger/templates/apache2_config_snippets.txt.erb}
  44. 0 ...plates/apache2 → phusion_passenger/templates}/apache_must_be_compiled_with_compatible_mpm.txt.erb
  45. 0 lib/{passenger/templates/apache2 → phusion_passenger/templates}/deployment_example.txt.erb
  46. 0 lib/{passenger → phusion_passenger}/templates/error_layout.css
  47. 0 lib/{passenger → phusion_passenger}/templates/nginx/ask_for_extra_configure_flags.txt.erb
  48. 0 lib/{passenger → phusion_passenger}/templates/nginx/cannot_write_to_dir.txt.erb
  49. 0 lib/{passenger → phusion_passenger}/templates/nginx/config_snippets.txt.erb
  50. 0 lib/{passenger → phusion_passenger}/templates/nginx/config_snippets_inserted.txt.erb
  51. 0 lib/{passenger → phusion_passenger}/templates/nginx/confirm_extra_configure_flags.txt.erb
  52. 0 lib/{passenger → phusion_passenger}/templates/nginx/deployment_example.txt.erb
  53. 0 lib/{passenger → phusion_passenger}/templates/nginx/pcre_could_not_be_downloaded.txt.erb
  54. 0 lib/{passenger → phusion_passenger}/templates/nginx/pcre_could_not_be_extracted.txt.erb
  55. 0 ...n_passenger}/templates/nginx/possible_solutions_for_compilation_and_installation_problems.txt.erb
  56. 0 ...husion_passenger}/templates/nginx/possible_solutions_for_download_and_extraction_problems.txt.erb
  57. 0 lib/{passenger → phusion_passenger}/templates/nginx/query_download_and_install.txt.erb
  58. 0 lib/{passenger → phusion_passenger}/templates/nginx/run_installer_as_root.txt.erb
  59. 0 lib/{passenger → phusion_passenger}/templates/nginx/welcome.txt.erb
  60. 0 ...er/templates/apache2 → phusion_passenger/templates}/no_write_permission_to_passenger_root.txt.erb
  61. 0 ...phusion_passenger/templates}/possible_solutions_for_compilation_and_installation_problems.txt.erb
  62. 0 lib/{passenger/templates/apache2 → phusion_passenger/templates}/run_installer_as_root.txt.erb
  63. 0 lib/{passenger/templates/apache2 → phusion_passenger/templates}/welcome.txt.erb
  64. +25 −56 lib/{passenger → phusion_passenger}/utils.rb
  65. 0 lib/{passenger → phusion_passenger}/version.rb
  66. +5 −5 lib/{passenger → phusion_passenger}/wsgi/application_spawner.rb
  67. 0 lib/{passenger → phusion_passenger}/wsgi/request_handler.py
  68. +1 −1 misc/render_error_pages.rb
  69. +1 −1 test/integration_tests.rb
  70. +2 −2 test/ruby/abstract_request_handler_spec.rb
  71. +3 −3 test/ruby/abstract_server_collection_spec.rb
  72. +3 −3 test/ruby/application_spec.rb
  73. +2 −2 test/ruby/message_channel_spec.rb
  74. +3 −3 test/ruby/rack/application_spawner_spec.rb
  75. +3 −3 test/ruby/rails/application_spawner_spec.rb
  76. +3 −3 test/ruby/rails/framework_spawner_spec.rb
  77. +3 −3 test/ruby/spawn_manager_spec.rb
  78. +2 −2 test/ruby/utils_spec.rb
  79. +5 −5 test/ruby/wsgi/application_spawner_spec.rb
  80. +2 −2 test/stub/message_channel.rb
  81. +2 −2 test/stub/message_channel_2.rb
  82. +3 −3 test/stub/message_channel_3.rb
  83. +2 −2 test/stub/spawn_server.rb
  84. +1 −1 test/support/apache2_controller.rb
View
3 .gitignore
@@ -13,7 +13,8 @@ ext/apache2/*.slo
ext/apache2/.libs
ext/apache2/ApplicationPoolServerExecutable
ext/nginx/HelperServer
-ext/passenger/Makefile
+ext/phusion_passenger/Makefile
+ext/*.a
doc/rdoc
doc/cxxapi
doc/*.html
View
12 DEVELOPERS.TXT
@@ -27,9 +27,9 @@ Run the following command to compile everything:
== Directory structure
The most important directories are:
-[ lib/passenger ]
+[ lib/phusion_passenger ]
The source code for the spawn server, which is written in Ruby.
-[ ext/passenger ]
+[ ext/phusion_passenger ]
Native extensions for Ruby, used by the spawn server.
[ ext/apache2 ]
The Phusion Passenger Apache 2 module (mod_passenger).
@@ -48,7 +48,13 @@ Less important directories:
[ lib/rake ]
Rake tasks.
[ ext/boost ]
- A vendor copy of the Boost C++ library (www.boost.org).
+ A stripped-down and customized version of the Boost C++ library
+ (www.boost.org).
+[ ext/oxt ]
+ The "OS eXtensions for boosT" library, which provides various important
+ functionality necessary for writing robust server software. It provides
+ things like support for interruptable system calls and portable backtraces
+ for C++. Boost was modified to make use of the functionality provided by OXT.
[ benchmark ]
Benchmark tools.
[ misc ]
View
48 Rakefile
@@ -23,8 +23,8 @@ require 'rake/rdoctask'
require 'rake/gempackagetask'
require 'rake/extensions'
require 'rake/cplusplus'
-require 'passenger/platform_info'
-require 'passenger/version'
+require 'phusion_passenger/platform_info'
+require 'phusion_passenger/version'
verbose true
@@ -68,7 +68,7 @@ task :clobber
##### Ruby C extension
-subdir 'ext/passenger' do
+subdir 'ext/phusion_passenger' do
task :native_support => ["native_support.#{LIBEXT}"]
file 'Makefile' => 'extconf.rb' do
@@ -580,7 +580,10 @@ Rake::RDocTask.new(:clobber_rdoc => "rdoc:clobber", :rerdoc => "rdoc:force") do
rd.main = "README"
rd.rdoc_dir = "doc/rdoc"
rd.rdoc_files.include("README", "DEVELOPERS.TXT",
- "lib/passenger/*.rb", "lib/rake/extensions.rb", "ext/passenger/*.c")
+ "lib/phusion_passenger/*.rb",
+ "lib/phusion_passenger/*/*.rb",
+ "lib/rake/extensions.rb",
+ "ext/phusion_passenger/*.c")
rd.template = "./doc/template/horo"
rd.title = "Passenger Ruby API"
rd.options << "-S" << "-N" << "-p" << "-H"
@@ -599,10 +602,10 @@ spec = Gem::Specification.new do |s|
s.author = "Phusion - http://www.phusion.nl/"
s.email = "info@phusion.nl"
s.requirements << "fastthread" << "Apache 2 with development headers"
- s.require_path = ["lib", "ext"]
+ s.require_paths = ["lib", "ext"]
s.add_dependency 'rake', '>= 0.8.1'
s.add_dependency 'fastthread', '>= 1.0.1'
- s.extensions << 'ext/passenger/extconf.rb'
+ s.extensions << 'ext/phusion_passenger/extconf.rb'
s.files = FileList[
'Rakefile',
'README',
@@ -612,9 +615,9 @@ spec = Gem::Specification.new do |s|
'NEWS',
'lib/**/*.rb',
'lib/**/*.py',
- 'lib/passenger/templates/*',
- 'lib/passenger/templates/apache2/*',
- 'lib/passenger/templates/nginx/*',
+ 'lib/phusion_passenger/templates/*',
+ 'lib/phusion_passenger/templates/apache2/*',
+ 'lib/phusion_passenger/templates/nginx/*',
'bin/*',
'doc/*',
@@ -640,7 +643,7 @@ spec = Gem::Specification.new do |s|
'ext/oxt/*.hpp',
'ext/oxt/*.cpp',
'ext/oxt/detail/*.hpp',
- 'ext/passenger/*.{c,rb}',
+ 'ext/phusion_passenger/*.{c,rb}',
'benchmark/*.{cpp,rb}',
'misc/*',
'vendor/**/*',
@@ -704,20 +707,20 @@ task :fakeroot => [:apache2, :native_support, :doc] do
libdir = "#{fakeroot}/usr/lib/ruby/#{CONFIG['ruby_version']}"
extdir = "#{libdir}/#{CONFIG['arch']}"
bindir = "#{fakeroot}/usr/bin"
- docdir = "#{fakeroot}/usr/share/doc/passenger"
- libexecdir = "#{fakeroot}/usr/lib/passenger"
+ docdir = "#{fakeroot}/usr/share/doc/phusion_passenger"
+ libexecdir = "#{fakeroot}/usr/lib/phusion_passenger"
sh "rm -rf #{fakeroot}"
sh "mkdir -p #{fakeroot}"
sh "mkdir -p #{libdir}"
- sh "cp -R lib/passenger #{libdir}/"
+ sh "cp -R lib/phusion_passenger #{libdir}/"
sh "mkdir -p #{fakeroot}/etc"
sh "echo -n '#{PACKAGE_VERSION}' > #{fakeroot}/etc/passenger_version.txt"
- sh "mkdir -p #{extdir}/passenger"
- sh "cp -R ext/passenger/*.#{LIBEXT} #{extdir}/passenger/"
+ sh "mkdir -p #{extdir}/phusion_passenger"
+ sh "cp -R ext/phusion_passenger/*.#{LIBEXT} #{extdir}/phusion_passenger/"
sh "mkdir -p #{bindir}"
sh "cp bin/* #{bindir}/"
@@ -742,9 +745,14 @@ task 'package:debian' => :fakeroot do
end
fakeroot = "pkg/fakeroot"
- arch = `uname -m`.strip
- if arch =~ /^i.86$/
- arch = "i386"
+ raw_arch = `uname -m`.strip
+ arch = case raw_arch
+ when /^i\.86$/
+ "i386"
+ when /^x86_64/
+ "amd64"
+ else
+ raw_arch
end
sh "sed -i 's/Version: .*/Version: #{PACKAGE_VERSION}/' debian/control"
@@ -772,12 +780,12 @@ task :sloccount do
end
sh "sloccount", *Dir[
"#{tmpdir}/*",
- "lib/passenger/*",
+ "lib/phusion_passenger/*",
"lib/rake/{cplusplus,extensions}.rb",
"ext/apache2",
"ext/nginx",
"ext/oxt",
- "ext/passenger/*.c",
+ "ext/phusion_passenger/*.c",
"test/**/*.{cpp,rb}",
"benchmark/*.{cpp,rb}"
]
View
2 benchmark/dispatcher.rb
@@ -24,7 +24,7 @@ def start(iterations)
milestone = 1 if milestone == 0
result = Benchmark.measure do
iterations.times do |i|
- cgi = Passenger::Railz::CGIFixed.new(headers, output, output)
+ cgi = PhusionPassenger::Railz::CGIFixed.new(headers, output, output)
::Dispatcher.dispatch(cgi,
::ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS,
cgi.stdoutput)
View
10 bin/passenger-install-apache2-module
@@ -28,13 +28,13 @@ $LOAD_PATH.unshift("#{PASSENGER_ROOT}/ext")
ENV["PATH"] += ":/usr/sbin:/sbin:/usr/local/sbin"
require 'optparse'
-require 'passenger/platform_info'
-require 'passenger/dependencies'
-require 'passenger/abstract_installer'
+require 'phusion_passenger/platform_info'
+require 'phusion_passenger/dependencies'
+require 'phusion_passenger/abstract_installer'
include PlatformInfo
-class Installer < Passenger::AbstractInstaller
- include Passenger
+class Installer < PhusionPassenger::AbstractInstaller
+ include PhusionPassenger
def dependencies
result = [
View
2 bin/passenger-memory-stats
@@ -18,7 +18,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
$LOAD_PATH.unshift("#{File.dirname(__FILE__)}/../lib")
-require 'passenger/platform_info'
+require 'phusion_passenger/platform_info'
# ANSI color codes
RESET = "\e[0m"
View
8 bin/passenger-spawn-server
@@ -41,13 +41,13 @@ begin
exit
end
- require 'passenger/spawn_manager'
- spawn_manager = Passenger::SpawnManager.new
+ require 'phusion_passenger/spawn_manager'
+ spawn_manager = PhusionPassenger::SpawnManager.new
spawn_manager.start_synchronously(input)
spawn_manager.cleanup
rescue => e
- require 'passenger/utils'
- include Passenger::Utils
+ require 'phusion_passenger/utils'
+ include PhusionPassenger::Utils
print_exception("spawn manager", e)
exit 10
end
View
4 bin/passenger-status
@@ -19,9 +19,9 @@
$LOAD_PATH << File.expand_path(File.dirname(__FILE__) + "/../lib")
$LOAD_PATH << File.expand_path(File.dirname(__FILE__) + "/../ext")
-require 'passenger/admin_tools/control_process'
+require 'phusion_passenger/admin_tools/control_process'
-include Passenger::AdminTools
+include PhusionPassenger::AdminTools
# ANSI color codes
RESET = "\e[0m"
View
10 bin/passenger-stress-test
@@ -23,12 +23,12 @@ require 'rubygems'
require 'optparse'
require 'socket'
require 'thread'
-require 'passenger/platform_info'
-require 'passenger/message_channel'
-require 'passenger/utils'
+require 'phusion_passenger/platform_info'
+require 'phusion_passenger/message_channel'
+require 'phusion_passenger/utils'
-include Passenger
-include Passenger::Utils
+include PhusionPassenger
+include PhusionPassenger::Utils
include PlatformInfo
# A thread or a process, depending on the Ruby VM implementation.
View
0 ext/passenger/extconf.rb → ext/phusion_passenger/extconf.rb
File renamed without changes.
View
2 ext/passenger/native_support.c → ext/phusion_passenger/native_support.c
@@ -268,7 +268,7 @@ Init_native_support() {
struct sockaddr_un addr;
/* */
- mPassenger = rb_define_module("Passenger"); // Do not remove the above comment. We want the Passenger module's rdoc to be empty.
+ mPassenger = rb_define_module("PhusionPassenger"); // Do not remove the above comment. We want the Passenger module's rdoc to be empty.
/*
* Utility functions for accessing system functionality.
View
0 lib/passenger/abstract_installer.rb → lib/phusion_passenger/abstract_installer.rb
File renamed without changes.
View
19 lib/passenger/abstract_request_handler.rb → ...ion_passenger/abstract_request_handler.rb
@@ -18,9 +18,9 @@
require 'socket'
require 'fcntl'
-require 'passenger/message_channel'
-require 'passenger/utils'
-module Passenger
+require 'phusion_passenger/message_channel'
+require 'phusion_passenger/utils'
+module PhusionPassenger
# The request handler is the layer which connects Apache with the underlying application's
# request dispatcher (i.e. either Rails's Dispatcher class or Rack).
@@ -169,13 +169,6 @@ def main_loop_running?
# Enter the request handler's main loop.
def main_loop
- if defined?(::Passenger::AbstractRequestHandler)
- # Some applications have a model named 'Passenger'.
- # So we temporarily remove it from the global namespace
- # and restore it later.
- phusion_passenger_namespace = ::Passenger
- Object.send(:remove_const, :Passenger)
- end
reset_signal_handlers
begin
@graceful_termination_pipe = IO.pipe
@@ -226,10 +219,6 @@ def main_loop
@graceful_termination_pipe[0].close rescue nil
@graceful_termination_pipe[1].close rescue nil
revert_signal_handlers
- if phusion_passenger_namespace
- Object.send(:remove_const, :Passenger) rescue nil
- Object.const_set(:Passenger, phusion_passenger_namespace)
- end
@main_loop_thread_lock.synchronize do
@main_loop_running = false
@main_loop_thread_cond.broadcast
@@ -446,4 +435,4 @@ def self.determine_passenger_header
PASSENGER_HEADER = determine_passenger_header
end
-end # module Passenger
+end # module PhusionPassenger
View
10 lib/passenger/abstract_server.rb → lib/phusion_passenger/abstract_server.rb
@@ -19,9 +19,9 @@
require 'socket'
require 'set'
require 'timeout'
-require 'passenger/message_channel'
-require 'passenger/utils'
-module Passenger
+require 'phusion_passenger/message_channel'
+require 'phusion_passenger/utils'
+module PhusionPassenger
# An abstract base class for a server, with the following properties:
#
@@ -42,7 +42,7 @@ module Passenger
#
# Here's an example on using AbstractServer:
#
-# class MyServer < Passenger::AbstractServer
+# class MyServer < PhusionPassenger::AbstractServer
# def initialize
# super()
# define_message_handler(:hello, :handle_hello)
@@ -346,4 +346,4 @@ def main_loop
end
end
-end # module Passenger
+end # module PhusionPassenger
View
6 lib/passenger/abstract_server_collection.rb → ...n_passenger/abstract_server_collection.rb
@@ -16,9 +16,9 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-require 'passenger/utils'
+require 'phusion_passenger/utils'
-module Passenger
+module PhusionPassenger
# This class maintains a collection of AbstractServer objects. One can add new
# AbstractServer objects, or look up existing ones via a key.
@@ -298,4 +298,4 @@ def eligable_for_cleanup?(server)
end
end
-end # module Passenger
+end # module PhusionPassenger
View
4 lib/passenger/admin_tools.rb → lib/phusion_passenger/admin_tools.rb
@@ -1,4 +1,4 @@
-module Passenger
+module PhusionPassenger
module AdminTools
def self.tmpdir
@@ -22,4 +22,4 @@ def self.process_is_alive?(pid)
end
end # module AdminTools
-end # module Passenger
+end # module PhusionPassenger
View
8 lib/passenger/admin_tools/control_process.rb → ..._passenger/admin_tools/control_process.rb
@@ -1,9 +1,9 @@
require 'rexml/document'
require 'fileutils'
-require 'passenger/admin_tools'
-require 'passenger/message_channel'
+require 'phusion_passenger/admin_tools'
+require 'phusion_passenger/message_channel'
-module Passenger
+module PhusionPassenger
module AdminTools
class ControlProcess
@@ -104,4 +104,4 @@ def reload
end
end # module AdminTools
-end # module Passenger
+end # module PhusionPassenger
View
6 lib/passenger/application.rb → lib/phusion_passenger/application.rb
@@ -17,8 +17,8 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
require 'rubygems'
-require 'passenger/exceptions'
-module Passenger
+require 'phusion_passenger/exceptions'
+module PhusionPassenger
# Represents a single application instance.
class Application
@@ -105,4 +105,4 @@ def close
end
end
-end # module Passenger
+end # module PhusionPassenger
View
4 lib/passenger/console_text_template.rb → ...husion_passenger/console_text_template.rb
@@ -17,7 +17,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
require 'erb'
-module Passenger
+module PhusionPassenger
class ConsoleTextTemplate
TEMPLATE_DIR = "#{File.dirname(__FILE__)}/templates"
@@ -58,4 +58,4 @@ def substitute_color_tags(data)
end
end
-end # module Passenger
+end # module PhusionPassenger
View
2 lib/passenger/constants.rb → lib/phusion_passenger/constants.rb
@@ -14,7 +14,7 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-module Passenger
+module PhusionPassenger
DEFAULT_FRAMEWORK_SPAWNER_MAX_IDLE_TIME = 30 * 60
DEFAULT_APP_SPAWNER_MAX_IDLE_TIME = 10 * 60
end
View
6 lib/passenger/dependencies.rb → lib/phusion_passenger/dependencies.rb
@@ -16,8 +16,8 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-require 'passenger/platform_info'
-module Passenger
+require 'phusion_passenger/platform_info'
+module PhusionPassenger
# Represents a dependency software that Passenger requires. It's used by the
# installer to check whether all dependencies are available. A Dependency object
@@ -323,4 +323,4 @@ module Dependencies # :nodoc: all
end
end
-end # module Passenger
+end # module PhusionPassenger
View
4 lib/passenger/exceptions.rb → lib/phusion_passenger/exceptions.rb
@@ -16,7 +16,7 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-module Passenger
+module PhusionPassenger
# Indicates that there is no Ruby on Rails version installed that satisfies
# a given Ruby on Rails Gem version specification.
@@ -95,4 +95,4 @@ def initialize(message, class_name, backtrace)
class InvalidPath < StandardError
end
-end # module Passenger
+end # module PhusionPassenger
View
4 lib/passenger/html_template.rb → lib/phusion_passenger/html_template.rb
@@ -18,7 +18,7 @@
require 'erb'
-module Passenger
+module PhusionPassenger
# A convenience utility class for rendering our error pages.
class HTMLTemplate
@@ -101,4 +101,4 @@ def starts_with(str, substr)
end
end
-end # module Passenger
+end # module PhusionPassenger
View
4 lib/passenger/message_channel.rb → lib/phusion_passenger/message_channel.rb
@@ -16,7 +16,7 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-module Passenger
+module PhusionPassenger
# This class provides convenience methods for:
# - sending and receiving raw data over an IO channel.
@@ -220,4 +220,4 @@ def check_argument(arg)
end
end
-end # module Passenger
+end # module PhusionPassenger
View
10 lib/passenger/platform_info.rb → lib/phusion_passenger/platform_info.rb
@@ -228,11 +228,11 @@ def self.determine_multi_arch_flags
end
def self.determine_multi_arch_ldflags
- if RUBY_PLATFORM =~ /solaris/
- '-lxnet -lrt -lsocket -lnsl'
- else
- ''
- end
+ if RUBY_PLATFORM =~ /solaris/
+ return '-lxnet -lrt -lsocket -lnsl'
+ else
+ return ''
+ end
end
def self.determine_library_extension
View
15 lib/passenger/rack/application_spawner.rb → ...ion_passenger/rack/application_spawner.rb
@@ -18,13 +18,13 @@
require 'rack'
require 'socket'
-require 'passenger/application'
-require 'passenger/message_channel'
-require 'passenger/abstract_request_handler'
-require 'passenger/utils'
-require 'passenger/rack/request_handler'
+require 'phusion_passenger/application'
+require 'phusion_passenger/message_channel'
+require 'phusion_passenger/abstract_request_handler'
+require 'phusion_passenger/utils'
+require 'phusion_passenger/rack/request_handler'
-module Passenger
+module PhusionPassenger
module Rack
# Class for spawning Rack applications.
@@ -84,7 +84,6 @@ def run(channel, app_root, options)
if options["lower_privilege"]
lower_privilege('config.ru', options["lowest_user"])
end
- remove_phusion_passenger_namespace
app = load_rack_app
end
@@ -113,4 +112,4 @@ def load_rack_app
end
end # module Rack
-end # module Passenger
+end # module PhusionPassenger
View
6 lib/passenger/rack/request_handler.rb → ...phusion_passenger/rack/request_handler.rb
@@ -14,8 +14,8 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-require 'passenger/abstract_request_handler'
-module Passenger
+require 'phusion_passenger/abstract_request_handler'
+module PhusionPassenger
module Rack
# A request handler for Rack applications.
@@ -86,4 +86,4 @@ def process_request(env, input, output)
end
end # module Rack
-end # module Passenger
+end # module PhusionPassenger
View
28 lib/passenger/railz/application_spawner.rb → ...on_passenger/railz/application_spawner.rb
@@ -20,16 +20,16 @@
require 'socket'
require 'etc'
require 'fcntl'
-require 'passenger/application'
-require 'passenger/abstract_server'
-require 'passenger/application'
-require 'passenger/constants'
-require 'passenger/railz/request_handler'
-require 'passenger/rack/request_handler'
-require 'passenger/exceptions'
-require 'passenger/utils'
+require 'phusion_passenger/application'
+require 'phusion_passenger/abstract_server'
+require 'phusion_passenger/application'
+require 'phusion_passenger/constants'
+require 'phusion_passenger/railz/request_handler'
+require 'phusion_passenger/rack/request_handler'
+require 'phusion_passenger/exceptions'
+require 'phusion_passenger/utils'
-module Passenger
+module PhusionPassenger
module Railz
# This class is capable of spawning instances of a single Ruby on Rails application.
@@ -113,7 +113,7 @@ def spawn_application
return Application.new(@app_root, pid, socket_name,
socket_type, owner_pipe)
rescue SystemCallError, IOError, SocketError => e
- raise Error, "The application spawner server exited unexpectedly"
+ raise Error, "The application spawner server exited unexpectedly: #{e}"
end
# Spawn an instance of the RoR application. When successful, an Application object
@@ -147,7 +147,6 @@ def spawn_application!
if @lower_privilege
lower_privilege('config/environment.rb', @lowest_user)
end
- remove_phusion_passenger_namespace
# require Rails' environment, using the same path as the original rails dispatcher,
# which normally does: require File.dirname(__FILE__) + "/../config/environment"
@@ -192,9 +191,9 @@ def start
super
begin
unmarshal_and_raise_errors(server)
- rescue IOError, SystemCallError, SocketError
+ rescue IOError, SystemCallError, SocketError => e
stop
- raise Error, "The application spawner server exited unexpectedly"
+ raise Error, "The application spawner server exited unexpectedly: #{e}"
rescue
stop
raise
@@ -224,7 +223,6 @@ def initialize_server # :nodoc:
if @lower_privilege
lower_privilege('config/environment.rb', @lowest_user)
end
- remove_phusion_passenger_namespace
preload_application
end
end
@@ -343,4 +341,4 @@ def start_request_handler(channel)
end
end # module Railz
-end # module Passenger
+end # module PhusionPassenger
View
4 lib/passenger/railz/cgi_fixed.rb → lib/phusion_passenger/railz/cgi_fixed.rb
@@ -26,7 +26,7 @@
require 'cgi'
-module Passenger
+module PhusionPassenger
module Railz
# Modifies CGI so that we can use it. Main thing it does is expose
@@ -65,4 +65,4 @@ def stdoutput
end
end # module Railz
-end # module Passenger
+end # module PhusionPassenger
View
17 lib/passenger/railz/framework_spawner.rb → ...sion_passenger/railz/framework_spawner.rb
@@ -17,13 +17,13 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
require 'rubygems'
-require 'passenger/abstract_server'
-require 'passenger/abstract_server_collection'
-require 'passenger/railz/application_spawner'
-require 'passenger/exceptions'
-require 'passenger/constants'
-require 'passenger/utils'
-module Passenger
+require 'phusion_passenger/abstract_server'
+require 'phusion_passenger/abstract_server_collection'
+require 'phusion_passenger/railz/application_spawner'
+require 'phusion_passenger/exceptions'
+require 'phusion_passenger/constants'
+require 'phusion_passenger/utils'
+module PhusionPassenger
module Railz
# This class is capable of spawning Ruby on Rails application instances
@@ -222,7 +222,6 @@ def initialize_server # :nodoc:
@spawners = AbstractServerCollection.new
begin
preload_rails
- remove_phusion_passenger_namespace
rescue StandardError, ScriptError, NoMemoryError => e
client.write('exception')
client.write_scalar(marshal_exception(e))
@@ -330,4 +329,4 @@ def handle_reload(app_root = nil)
end
end # module Railz
-end # module Passenger
+end # module PhusionPassenger
View
8 lib/passenger/railz/request_handler.rb → ...husion_passenger/railz/request_handler.rb
@@ -14,9 +14,9 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-require 'passenger/abstract_request_handler'
-require 'passenger/railz/cgi_fixed'
-module Passenger
+require 'phusion_passenger/abstract_request_handler'
+require 'phusion_passenger/railz/cgi_fixed'
+module PhusionPassenger
module Railz
# A request handler for Ruby on Rails applications.
@@ -58,4 +58,4 @@ def perform_action(*whatever)
end
end # module Railz
-end # module Passenger
+end # module PhusionPassenger
View
0 lib/passenger/simple_benchmarking.rb → lib/phusion_passenger/simple_benchmarking.rb
File renamed without changes.
View
40 lib/passenger/spawn_manager.rb → lib/phusion_passenger/spawn_manager.rb
@@ -16,17 +16,17 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-require 'passenger/abstract_server'
-require 'passenger/abstract_server_collection'
-require 'passenger/constants'
-require 'passenger/utils'
+require 'phusion_passenger/abstract_server'
+require 'phusion_passenger/abstract_server_collection'
+require 'phusion_passenger/constants'
+require 'phusion_passenger/utils'
# Define a constant with a name that's unlikely to clash with anything the
# application defines, so that they can detect whether they're running under
# Phusion Passenger.
IN_PHUSION_PASSENGER = true
-module Passenger
+module PhusionPassenger
# The spawn manager is capable of spawning Ruby on Rails or Rack application
# instances. It acts like a simple fascade for the rest of the spawn manager
@@ -66,13 +66,13 @@ def initialize
if GC.copy_on_write_friendly?
# Preload libraries for copy-on-write semantics.
require 'base64'
- require 'passenger/application'
- require 'passenger/railz/framework_spawner'
- require 'passenger/railz/application_spawner'
- require 'passenger/rack/application_spawner'
- require 'passenger/html_template'
- require 'passenger/platform_info'
- require 'passenger/exceptions'
+ require 'phusion_passenger/application'
+ require 'phusion_passenger/railz/framework_spawner'
+ require 'phusion_passenger/railz/application_spawner'
+ require 'phusion_passenger/rack/application_spawner'
+ require 'phusion_passenger/html_template'
+ require 'phusion_passenger/platform_info'
+ require 'phusion_passenger/exceptions'
# Commonly used libraries.
['mysql', 'sqlite3'].each do |lib|
@@ -141,20 +141,20 @@ def spawn_application(options)
if options["app_type"] == "rails"
if !defined?(Railz::FrameworkSpawner)
- require 'passenger/application'
- require 'passenger/railz/framework_spawner'
- require 'passenger/railz/application_spawner'
+ require 'phusion_passenger/application'
+ require 'phusion_passenger/railz/framework_spawner'
+ require 'phusion_passenger/railz/application_spawner'
end
return spawn_rails_application(options)
elsif options["app_type"] == "rack"
if !defined?(Rack::ApplicationSpawner)
- require 'passenger/rack/application_spawner'
+ require 'phusion_passenger/rack/application_spawner'
end
return Rack::ApplicationSpawner.spawn_application(
options["app_root"], options
)
elsif options["app_type"] == "wsgi"
- require 'passenger/wsgi/application_spawner'
+ require 'phusion_passenger/wsgi/application_spawner'
return WSGI::ApplicationSpawner.spawn_application(
options["app_root"],
options["lower_privilege"],
@@ -332,8 +332,8 @@ def handle_reload(app_root)
end
def send_error_page(channel, template_name, options = {})
- require 'passenger/html_template' unless defined?(HTMLTemplate)
- require 'passenger/platform_info' unless defined?(PlatformInfo)
+ require 'phusion_passenger/html_template' unless defined?(HTMLTemplate)
+ require 'phusion_passenger/platform_info' unless defined?(PlatformInfo)
options["enterprisey"] = File.exist?("#{File.dirname(__FILE__)}/../../enterprisey.txt") ||
File.exist?("/etc/passenger_enterprisey.txt")
data = HTMLTemplate.new(template_name, options).result
@@ -367,4 +367,4 @@ def app_name(app_type)
end
end
-end # module Passenger
+end # module PhusionPassenger
View
0 ...app_exited_during_initialization.html.erb → ...app_exited_during_initialization.html.erb
File renamed without changes.
View
0 ...ssenger/templates/app_init_error.html.erb → ...templates/apache2/app_init_error.html.erb
File renamed without changes.
View
0 ...ssenger/templates/database_error.html.erb → ...templates/apache2/database_error.html.erb
File renamed without changes.
View
0 ...passenger/templates/error_layout.html.erb → ...r/templates/apache2/error_layout.html.erb
File renamed without changes.
View
0 ...r/templates/framework_init_error.html.erb → ...tes/apache2/framework_init_error.html.erb
File renamed without changes.
View
0 ...assenger/templates/general_error.html.erb → .../templates/apache2/general_error.html.erb
File renamed without changes.
View
0 ...enger/templates/invalid_app_root.html.erb → ...mplates/apache2/invalid_app_root.html.erb
File renamed without changes.
View
0 lib/passenger/templates/load_error.html.erb → ...ger/templates/apache2/load_error.html.erb
File renamed without changes.
View
0 ...nger/templates/version_not_found.html.erb → ...plates/apache2/version_not_found.html.erb
File renamed without changes.
View
0 ...templates/apache2/config_snippets.txt.erb → ...templates/apache2_config_snippets.txt.erb
File renamed without changes.
View
0 ...t_be_compiled_with_compatible_mpm.txt.erb → ...t_be_compiled_with_compatible_mpm.txt.erb
File renamed without changes.
View
0 ...plates/apache2/deployment_example.txt.erb → ...nger/templates/deployment_example.txt.erb
File renamed without changes.
View
0 lib/passenger/templates/error_layout.css → ...sion_passenger/templates/error_layout.css
File renamed without changes.
View
0 ...inx/ask_for_extra_configure_flags.txt.erb → ...inx/ask_for_extra_configure_flags.txt.erb
File renamed without changes.
View
0 ...mplates/nginx/cannot_write_to_dir.txt.erb → ...mplates/nginx/cannot_write_to_dir.txt.erb
File renamed without changes.
View
0 ...r/templates/nginx/config_snippets.txt.erb → ...r/templates/nginx/config_snippets.txt.erb
File renamed without changes.
View
0 ...es/nginx/config_snippets_inserted.txt.erb → ...es/nginx/config_snippets_inserted.txt.erb
File renamed without changes.
View
0 ...inx/confirm_extra_configure_flags.txt.erb → ...inx/confirm_extra_configure_flags.txt.erb
File renamed without changes.
View
0 ...emplates/nginx/deployment_example.txt.erb → ...emplates/nginx/deployment_example.txt.erb
File renamed without changes.
View
0 ...ginx/pcre_could_not_be_downloaded.txt.erb → ...ginx/pcre_could_not_be_downloaded.txt.erb
File renamed without changes.
View
0 ...nginx/pcre_could_not_be_extracted.txt.erb → ...nginx/pcre_could_not_be_extracted.txt.erb
File renamed without changes.
View
0 ...ilation_and_installation_problems.txt.erb → ...ilation_and_installation_problems.txt.erb
File renamed without changes.
View
0 ..._download_and_extraction_problems.txt.erb → ..._download_and_extraction_problems.txt.erb
File renamed without changes.
View
0 .../nginx/query_download_and_install.txt.erb → .../nginx/query_download_and_install.txt.erb
File renamed without changes.
View
0 ...lates/nginx/run_installer_as_root.txt.erb → ...lates/nginx/run_installer_as_root.txt.erb
File renamed without changes.
View
0 ...passenger/templates/nginx/welcome.txt.erb → ...passenger/templates/nginx/welcome.txt.erb
File renamed without changes.
View
0 ...rite_permission_to_passenger_root.txt.erb → ...rite_permission_to_passenger_root.txt.erb
File renamed without changes.
View
0 ...ilation_and_installation_problems.txt.erb → ...ilation_and_installation_problems.txt.erb
File renamed without changes.
View
0 ...tes/apache2/run_installer_as_root.txt.erb → ...r/templates/run_installer_as_root.txt.erb
File renamed without changes.
View
0 ...ssenger/templates/apache2/welcome.txt.erb → ...usion_passenger/templates/welcome.txt.erb
File renamed without changes.
View
81 lib/passenger/utils.rb → lib/phusion_passenger/utils.rb
@@ -25,17 +25,17 @@
require 'etc'
require 'fcntl'
require 'tempfile'
-require 'passenger/exceptions'
+require 'phusion_passenger/exceptions'
if !defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby"
- require 'passenger/native_support'
+ require 'phusion_passenger/native_support'
end
-module Passenger
+module PhusionPassenger
# Utility functions.
module Utils
protected
- GENUINE_PHUSION_PASSENGER_NAMESPACE = Passenger
+ GENUINE_PHUSION_PASSENGER_NAMESPACE = PhusionPassenger
# Return the absolute version of +path+. This path is guaranteed to
# to be "normal", i.e. it doesn't contain stuff like ".." or "/",
@@ -98,28 +98,26 @@ def close_all_io_objects_for_fds(file_descriptors_to_leave_open)
end
def marshal_exception(exception)
- temporarily_restore_phusion_passenger_namespace do
- data = {
- :message => exception.message,
- :class => exception.class.to_s,
- :backtrace => exception.backtrace
- }
- if exception.is_a?(InitializationError)
- data[:is_initialization_error] = true
- if exception.child_exception
- data[:child_exception] = marshal_exception(exception.child_exception)
- end
- else
- begin
- data[:exception] = Marshal.dump(exception)
- rescue ArgumentError, TypeError
- e = UnknownError.new(exception.message, exception.class.to_s,
- exception.backtrace)
- data[:exception] = Marshal.dump(e)
- end
+ data = {
+ :message => exception.message,
+ :class => exception.class.to_s,
+ :backtrace => exception.backtrace
+ }
+ if exception.is_a?(InitializationError)
+ data[:is_initialization_error] = true
+ if exception.child_exception
+ data[:child_exception] = marshal_exception(exception.child_exception)
+ end
+ else
+ begin
+ data[:exception] = Marshal.dump(exception)
+ rescue ArgumentError, TypeError
+ e = UnknownError.new(exception.message, exception.class.to_s,
+ exception.backtrace)
+ data[:exception] = Marshal.dump(e)
end
- return Marshal.dump(data)
end
+ return Marshal.dump(data)
end
def unmarshal_exception(data)
@@ -319,35 +317,6 @@ def switch_to_user(user)
end
end
- # Some applications have a model named 'Passenger'.
- # This method removes the Passenger module from the
- # global namespace.
- def remove_phusion_passenger_namespace
- if defined?(::Passenger) && ::Passenger == GENUINE_PHUSION_PASSENGER_NAMESPACE
- Object.send(:remove_const, :Passenger)
- end
- end
-
- # The current 'Passenger' namespace might be reserved by an application.
- # This method temporarily restores the 'Passenger' namespace to that of
- # Phusion Passenger's, runs the block, then restores the 'Passenger'
- # namespace back to what it was before.
- def temporarily_restore_phusion_passenger_namespace
- if defined?(::Passenger)
- old_passenger_namespace = ::Passenger
- Object.send(:remove_const, :Passenger)
- end
- Object.const_set(:Passenger, GENUINE_PHUSION_PASSENGER_NAMESPACE)
- begin
- yield
- ensure
- Object.send(:remove_const, :Passenger)
- if old_passenger_namespace
- Object.const_set(:Passenger, old_passenger_namespace)
- end
- end
- end
-
def sanitize_spawn_options(options)
defaults = {
"lower_privilege" => true,
@@ -380,7 +349,7 @@ def passenger_tmpdir(create = true)
end
end
-end # module Passenger
+end # module PhusionPassenger
class Exception
def backtrace_string(current_location = nil)
@@ -443,13 +412,13 @@ def timed_wait!(mutex, secs)
end
class IO
- if defined?(Passenger::NativeSupport)
+ if defined?(PhusionPassenger::NativeSupport)
# ApplicationSpawner/FrameworkSpawner might temporarily undefine
# the 'Passenger' module in order to avoid namespace collissions
# with the spawned application. So we save the NativeSupport
# module in a constant so that we can access it whether
# our 'Passenger' module is defined or not.
- NATIVE_SUPPORT = Passenger::NativeSupport
+ NATIVE_SUPPORT = PhusionPassenger::NativeSupport
# Send an IO object (i.e. a file descriptor) over this IO channel.
# This only works if this IO channel is a Unix socket.
View
0 lib/passenger/version.rb → lib/phusion_passenger/version.rb
File renamed without changes.
View
10 lib/passenger/wsgi/application_spawner.rb → ...ion_passenger/wsgi/application_spawner.rb
@@ -15,10 +15,10 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
require 'socket'
-require 'passenger/application'
-require 'passenger/message_channel'
-require 'passenger/utils'
-module Passenger
+require 'phusion_passenger/application'
+require 'phusion_passenger/message_channel'
+require 'phusion_passenger/utils'
+module PhusionPassenger
module WSGI
# Class for spawning WSGI applications.
@@ -94,4 +94,4 @@ def run(channel, app_root, lower_privilege, lowest_user, environment)
end
end # module WSGI
-end # module Passenger
+end # module PhusionPassenger
View
0 lib/passenger/wsgi/request_handler.py → ...phusion_passenger/wsgi/request_handler.py
File renamed without changes.
View
2 misc/render_error_pages.rb
@@ -19,7 +19,7 @@
require 'passenger/html_template'
require 'passenger/spawn_manager'
require 'passenger/platform_info'
-include Passenger
+include PhusionPassenger
if !defined?(Mysql::Error)
module Mysql
View
2 test/integration_tests.rb
@@ -8,7 +8,7 @@
require 'support/test_helper'
require 'support/multipart'
require 'support/apache2_controller'
-require 'passenger/platform_info'
+require 'phusion_passenger/platform_info'
include PlatformInfo
View
4 test/ruby/abstract_request_handler_spec.rb
@@ -1,10 +1,10 @@
require 'support/config'
require 'support/test_helper'
-require 'passenger/abstract_request_handler'
+require 'phusion_passenger/abstract_request_handler'
require 'fileutils'
-include Passenger
+include PhusionPassenger
describe AbstractRequestHandler do
before :each do
View
6 test/ruby/abstract_server_collection_spec.rb
@@ -1,9 +1,9 @@
require 'support/config'
require 'support/test_helper'
-require 'passenger/abstract_server'
-require 'passenger/abstract_server_collection'
+require 'phusion_passenger/abstract_server'
+require 'phusion_passenger/abstract_server_collection'
-include Passenger
+include PhusionPassenger
describe AbstractServerCollection do
before :each do
View
6 test/ruby/application_spec.rb
@@ -1,7 +1,7 @@
require 'support/config'
require 'support/test_helper'
-require 'passenger/application'
-include Passenger
+require 'phusion_passenger/application'
+include PhusionPassenger
describe Application do
include TestHelper
@@ -38,6 +38,6 @@
content.sub(/^RAILS_GEM_VERSION = .*$/, "RAILS_GEM_VERSION = '1.9.1972'")
end
detector = lambda { Application.detect_framework_version(@stub.app_root) }
- detector.should raise_error(::Passenger::VersionNotFound)
+ detector.should raise_error(::PhusionPassenger::VersionNotFound)
end
end
View
4 test/ruby/message_channel_spec.rb
@@ -1,7 +1,7 @@
require 'socket'
require 'support/config'
-require 'passenger/message_channel'
-include Passenger
+require 'phusion_passenger/message_channel'
+include PhusionPassenger
describe MessageChannel do
describe "scenarios with a single channel" do
View
6 test/ruby/rack/application_spawner_spec.rb
@@ -1,8 +1,8 @@
require 'support/config'
require 'support/test_helper'
-require 'passenger/rack/application_spawner'
+require 'phusion_passenger/rack/application_spawner'
-describe Passenger::Rack::ApplicationSpawner do
+describe PhusionPassenger::Rack::ApplicationSpawner do
include TestHelper
before :each do
@@ -35,7 +35,7 @@
end if Process.euid == 0
def spawn(*args)
- Passenger::Rack::ApplicationSpawner.spawn_application(*args)
+ PhusionPassenger::Rack::ApplicationSpawner.spawn_application(*args)
end
end
View
6 test/ruby/rails/application_spawner_spec.rb
@@ -1,14 +1,14 @@
require 'support/config'
require 'support/test_helper'
-require 'passenger/railz/application_spawner'
+require 'phusion_passenger/railz/application_spawner'
require 'ruby/rails/minimal_spawner_spec'
require 'ruby/spawn_server_spec'
require 'ruby/rails/spawner_privilege_lowering_spec'
require 'ruby/rails/spawner_error_handling_spec'
-include Passenger
-include Passenger::Railz
+include PhusionPassenger
+include PhusionPassenger::Railz
describe ApplicationSpawner do
include TestHelper
View
6 test/ruby/rails/framework_spawner_spec.rb
@@ -1,13 +1,13 @@
require 'support/config'
require 'support/test_helper'
-require 'passenger/railz/framework_spawner'
+require 'phusion_passenger/railz/framework_spawner'
require 'ruby/rails/minimal_spawner_spec'
require 'ruby/spawn_server_spec'
require 'ruby/rails/spawner_privilege_lowering_spec'
require 'ruby/rails/spawner_error_handling_spec'
-include Passenger
-include Passenger::Railz
+include PhusionPassenger
+include PhusionPassenger::Railz
# TODO: test whether FrameworkSpawner restarts ApplicationSpawner if it crashed
View
6 test/ruby/spawn_manager_spec.rb
@@ -1,13 +1,13 @@
require 'support/config'
require 'support/test_helper'
-require 'passenger/spawn_manager'
+require 'phusion_passenger/spawn_manager'
require 'ruby/abstract_server_spec'
require 'ruby/rails/minimal_spawner_spec'
require 'ruby/rails/spawner_privilege_lowering_spec'
require 'ruby/rails/spawner_error_handling_spec'
-include Passenger
-include Passenger::Utils
+include PhusionPassenger
+include PhusionPassenger::Utils
# TODO: test whether SpawnManager restarts FrameworkSpawner if it crashed
View
4 test/ruby/utils_spec.rb
@@ -1,9 +1,9 @@
require 'support/config'
require 'tempfile'
-require 'passenger/utils'
+require 'phusion_passenger/utils'
-include Passenger
+include PhusionPassenger
describe Utils do
include Utils
View
10 test/ruby/wsgi/application_spawner_spec.rb
@@ -1,13 +1,13 @@
require 'support/config'
require 'support/test_helper'
-require 'passenger/wsgi/application_spawner'
-require 'passenger/utils'
+require 'phusion_passenger/wsgi/application_spawner'
+require 'phusion_passenger/utils'
require 'fileutils'
require 'tempfile'
-describe Passenger::WSGI::ApplicationSpawner do
+describe PhusionPassenger::WSGI::ApplicationSpawner do
include TestHelper
- include Passenger::Utils
+ include PhusionPassenger::Utils
before :each do
ENV['PHUSION_PASSENGER_TMP'] = "#{Dir.tmpdir}/wsgi_test.tmp"
@@ -41,7 +41,7 @@
end
def spawn(*args)
- Passenger::WSGI::ApplicationSpawner.spawn_application(*args)
+ PhusionPassenger::WSGI::ApplicationSpawner.spawn_application(*args)
end
end
View
4 test/stub/message_channel.rb
@@ -1,8 +1,8 @@
#!/usr/bin/env ruby
$LOAD_PATH << "#{File.dirname(__FILE__)}/../../lib"
-require 'passenger/message_channel'
+require 'phusion_passenger/message_channel'
-include Passenger
+include PhusionPassenger
reader = MessageChannel.new(STDIN)
writer = MessageChannel.new(STDOUT)
writer.write(*(reader.read << "!!"))
View
4 test/stub/message_channel_2.rb
@@ -1,8 +1,8 @@
#!/usr/bin/env ruby
$LOAD_PATH << "#{File.dirname(__FILE__)}/../../lib"
-require 'passenger/message_channel'
+require 'phusion_passenger/message_channel'
-include Passenger
+include PhusionPassenger
reader = MessageChannel.new(STDIN)
writer = MessageChannel.new(STDOUT)
writer.write_scalar(reader.read_scalar << "!!")
View
6 test/stub/message_channel_3.rb
@@ -1,10 +1,10 @@
#!/usr/bin/env ruby
$LOAD_PATH << "#{File.dirname(__FILE__)}/../../lib"
$LOAD_PATH << "#{File.dirname(__FILE__)}/../../ext"
-require 'passenger/message_channel'
-require 'passenger/utils'
+require 'phusion_passenger/message_channel'
+require 'phusion_passenger/utils'
-include Passenger
+include PhusionPassenger
channel = MessageChannel.new(IO.new(3))
channel.write(*channel.read)
channel.write_scalar(channel.read_scalar)
View
4 test/stub/spawn_server.rb
@@ -1,9 +1,9 @@
#!/usr/bin/env ruby
$LOAD_PATH << "#{File.dirname(__FILE__)}/../../lib"
$LOAD_PATH << "#{File.dirname(__FILE__)}/../../ext"
-require 'passenger/spawn_manager'
+require 'phusion_passenger/spawn_manager'
-include Passenger
+include PhusionPassenger
class SpawnManager
def handle_spawn_application(*options)
client.write('ok')
View
2 test/support/apache2_controller.rb
@@ -1,6 +1,6 @@
require 'erb'
require 'fileutils'
-require 'passenger/platform_info'
+require 'phusion_passenger/platform_info'
# A class for starting, stopping and restarting Apache, and for manipulating
# its configuration file. This is used by the integration tests.

0 comments on commit 9e19941

Please sign in to comment.