Skip to content
This repository was archived by the owner on Dec 2, 2018. It is now read-only.

Commit c191f6e

Browse files
committed
Update docs and change license.
* More relevant. They are pretty much the same as when the software was first released and several aspects are not longer valid. Also some things could be clearer. * This was under MIT but I really prefer my stuff to be public domain. Switched license. There are a few patches from others but they are not [legally significant](https://www.gnu.org/prep/maintain/maintain.html#Legally-Significant) and will soon be mostly removed anyway since they mostly relate to the error page which I will be removing. * Took the wiki content, made it less verbose and moved it into the readme file.
1 parent 2055d0d commit c191f6e

File tree

4 files changed

+75
-41
lines changed

4 files changed

+75
-41
lines changed

README

Lines changed: 0 additions & 21 deletions
This file was deleted.

README.rdoc

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
= Purpose
2+
3+
Rack Legacy tries to provide interaction with legacy environments like
4+
PHP and CGI while still getting the Rack portability so you don't need
5+
a full Apache stack.
6+
7+
This software is currently BETA quality. Use at your own risk.
8+
9+
= Purpose
10+
11+
The PRIMARY use case for this software is for development of an
12+
application where Ruby is being used but there are also some legacy
13+
PHP or CGI that is running along-side the Ruby application. This
14+
middleware allows you to do that development without the full Apache
15+
stack.
16+
17+
When you take the application to a production environment you can either
18+
leave this middleware in or use a full Apache stack to get added
19+
performance and security.
20+
21+
= USAGE
22+
23+
== Installation
24+
25+
gem install rack-legacy
26+
27+
== Generic Rack Integration
28+
29+
Put the following in your rack stack:
30+
31+
require 'rack-legacy'
32+
use Rack::Legacy::Php, 'public'
33+
34+
== Rails Usage
35+
36+
In your Gemfile
37+
38+
gem 'rack-legacy'
39+
40+
In your application.rb:
41+
42+
config.middleware.insert_before \
43+
ActionDispatch::Static, Rack::Legacy::Php, Rails.public_path
44+
45+
Rails < 3 is not well supported. This is because Rack::Static (later
46+
turned into ActionDispatch::Static) is not in the Rails stack but
47+
instead processed in the stack that loads Rails prior to Rails running.
48+
This means you cannot insert any middleware before it. This software
49+
previously had some hacks to work around this but with the release of
50+
Rails 3 the hacks where not necessary and therefore removed.
51+
52+
If you still need to use rack-legacy on a Rails 2 app see version 0.1.5.
53+
54+
== Pure PHP/CGI
55+
56+
Got a project that is nothing but PHP or CGI? Run `rack_legacy` in the
57+
website root directory and it will start serving the files.
58+
59+
= LICENSE
60+
61+
This is free and unencumbered software released into the public domain.
62+
63+
= CREDIT
64+
65+
This gem was developed by Eric Anderson (http://pixelwareinc.com)
66+
partially via work done under Red Tusk Studios (http://redtusk.com) and
67+
Southern Web Group (http://www.southernwebgroup.com).
Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,19 @@
11
Things I will probably not implement but I welcome others to do.
22

3-
== Security
3+
= Security
44

55
I tried to not do anything dumb but this code isn't audited either.
66
For that reason I recommend this tool be used for only for development
7-
purposes and not used in production until someone takes a closer look
8-
at security.
7+
purposes.
98

10-
== Performance
9+
= Performance
1110

1211
We could possibly support FastCGI and some sort of mod_php-like
1312
interface to allow greater performance. Useful if someone uses this
1413
in production.
1514

16-
== Corner Cases
17-
18-
I doubt I am supporting the full CGI spec. I am sure there are corner
19-
cases where this software doesn't work. Also I don't know what the
20-
implications are for things like php safe mode and other php corner
21-
cases.
22-
23-
== Standard Error Capture Hacks
15+
= Standard Error Capture Hacks
2416

2517
Currently I am using a tempfile to capture the standard error from
2618
the CGI script. This seems a little hackish. Would like to just
2719
capture the standard error directly.
28-
29-
== Forward Thinking
30-
31-
This code is un-tested in Ruby 1.9

rack-legacy.gemspec

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
Gem::Specification.new do |s|
22
s.name = 'rack-legacy'
33
s.version = '0.3.7'
4-
s.homepage = 'http://wiki.github.com/eric1234/rack-legacy/'
4+
s.homepage = 'https://github.com/eric1234/rack-legacy'
55
s.author = 'Eric Anderson'
66
s.email = '[email protected]'
7+
s.licenses = ['Public Domain']
78
s.executables << 'rack_legacy'
89
s.add_dependency 'rack'
910
s.add_development_dependency 'rake'
@@ -12,9 +13,8 @@ Gem::Specification.new do |s|
1213
s.add_development_dependency 'nokogiri'
1314
s.add_development_dependency 'mechanize', '>= 2.0'
1415
s.files = Dir['lib/**/*.rb'] + Dir['bin/*'] + Dir['share/*']
15-
s.has_rdoc = true
16-
s.extra_rdoc_files << 'README' << 'WISHLIST'
17-
s.rdoc_options << '--main' << 'README'
16+
s.extra_rdoc_files << 'README.rdoc' << 'WISHLIST.rdoc'
17+
s.rdoc_options << '--main' << 'README.rdoc'
1818
s.summary = 'Rack-based handler for legacy CGI and PHP'
1919
s.description = <<-DESCRIPTION
2020
Rack legacy is a rack handler to help your run legacy code

0 commit comments

Comments
 (0)