src/helper-scripts/rack-preloader.rb in passenger-5.0.20 vs src/helper-scripts/rack-preloader.rb in passenger-5.0.21
- old
+ new
@@ -1,11 +1,12 @@
#!/usr/bin/env ruby
# encoding: binary
# Phusion Passenger - https://www.phusionpassenger.com/
-# Copyright (c) 20132-2014 Phusion
+# Copyright (c) 20132-2014 Phusion Holding B.V.
#
-# "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
+# "Passenger", "Phusion Passenger" and "Union Station" are registered
+# trademarks of Phusion Holding B.V.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@@ -98,10 +99,12 @@
LoaderSharedHelpers.before_loading_app_code_step1('config.ru', options)
LoaderSharedHelpers.run_load_path_setup_code(options)
LoaderSharedHelpers.before_loading_app_code_step2(options)
LoaderSharedHelpers.activate_gem 'rack'
- rackup_file = options["startup_file"] || "config.ru"
+ app_root = options["app_root"]
+ rackup_file = LoaderSharedHelpers.maybe_make_path_relative_to_app_root(
+ app_root, options["startup_file"] || "#{app_root}/config.ru")
rackup_code = ::File.open(rackup_file, 'rb') do |f|
f.read
end
@@app = eval("Rack::Builder.new {( #{rackup_code}\n )}.to_app",
TOPLEVEL_BINDING, rackup_file)