Skip to content

Commit

Permalink
Vendor Rack in order to work around broken applications that depend o…
Browse files Browse the repository at this point in the history
…n rack == 0.4.0.
  • Loading branch information
FooBarWidget committed Jan 30, 2009
1 parent f050a46 commit ea7fb0a
Show file tree
Hide file tree
Showing 211 changed files with 32,716 additions and 3 deletions.
2 changes: 2 additions & 0 deletions NEWS
Expand Up @@ -25,3 +25,5 @@
- Configurable temp dir.
- Better error messages, more error checking, and other small things
which makes your live easier.
- Rack is now vendored in order to work around broken applications that
depend on rack == 0.4.0.
2 changes: 1 addition & 1 deletion Rakefile
Expand Up @@ -474,7 +474,6 @@ spec = Gem::Specification.new do |s|
s.require_path = ["lib", "ext"]
s.add_dependency 'rake', '>= 0.8.1'
s.add_dependency 'fastthread', '>= 1.0.1'
s.add_dependency 'rack', '>= 0.1.0'
s.extensions << 'ext/passenger/extconf.rb'
s.files = FileList[
'Rakefile',
Expand Down Expand Up @@ -511,6 +510,7 @@ spec = Gem::Specification.new do |s|
'ext/passenger/*.{c,rb}',
'benchmark/*.{cpp,rb}',
'misc/*',
'vendor/**/*',
'test/*.{rb,cpp,example}',
'test/support/*',
'test/oxt/*.cpp',
Expand Down
3 changes: 1 addition & 2 deletions bin/passenger-install-apache2-module
Expand Up @@ -49,8 +49,7 @@ class Installer
Dependencies::Apache2_DevHeaders,
Dependencies::APR_DevHeaders,
Dependencies::APU_DevHeaders,
Dependencies::FastThread,
Dependencies::Rack
Dependencies::FastThread
]

def start(automatic = false)
Expand Down
3 changes: 3 additions & 0 deletions lib/passenger/rack/application_spawner.rb
Expand Up @@ -14,13 +14,16 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + "/../../../vendor/rack-0.9.1/lib"))
require 'rack'

require 'socket'
require 'passenger/application'
require 'passenger/message_channel'
require 'passenger/abstract_request_handler'
require 'passenger/utils'
require 'passenger/rack/request_handler'

module Passenger
module Rack

Expand Down
12 changes: 12 additions & 0 deletions vendor/README
@@ -0,0 +1,12 @@
You might be wondering why the Rack library is vendored, and why we don't
just depend on the Rack gem. The reason for this is because there are broken
applications out there that have a hard dependency on rack == 0.4.0 (the
latest version of Rack is 0.9.1 at the time of writing). If Passenger
depends on the Rack gem, then the application will crash with a gem version
conflict error upon executing 'gem "rack", "=0.4.0"'.

To fix this conflict, we vendor Rack. When we load our vendored Rack library,
it won't be registered as a gem, so no RubyGems version conflict exception
will be raised.

Rack is backwards-compatible so there shouldn't be any problems.
1 change: 1 addition & 0 deletions vendor/README_FOR_PACKAGERS
@@ -0,0 +1 @@
Rack is vendored for a reason, don't try to remove it. See README.
8 changes: 8 additions & 0 deletions vendor/rack-0.9.1/AUTHORS
@@ -0,0 +1,8 @@
* Christian Neukirchen <chneukirchen@gmail.com>
* HTTP authentication: Tim Fletcher <twoggle@gmail.com>
* Cookie sessions, Static handler: Luc Heinrich <luc@honk-honk.com>
* Pool sessions, OpenID authentication: blink <blinketje@gmail.com>
* Rack::Deflater: Christoffer Sawicki <christoffer.sawicki@gmail.com>
* LiteSpeed handler: Adrian Madrid
* SCGI handler: Jeremy Evans
* Official Logo: Armin Ronacher
18 changes: 18 additions & 0 deletions vendor/rack-0.9.1/COPYING
@@ -0,0 +1,18 @@
Copyright (c) 2007 Christian Neukirchen <purl.org/net/chneukirchen>

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 copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0 comments on commit ea7fb0a

Please sign in to comment.