mikehale-rat-hole 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ === 0.1.4 / 2008-12-18
2
+
3
+ * update process_server_response hook to include rack_request
4
+
1
5
  === 0.1.2 / 2008-12-17
2
6
 
3
7
  * use patched-hoe from newgem
data/README.rdoc CHANGED
@@ -20,7 +20,7 @@ You can also modify the response from the server to cleanup html tweak headers e
20
20
  rack_request
21
21
  end
22
22
 
23
- def process_server_response(rack_response)
23
+ def process_server_response(rack_response, rack_request)
24
24
  # For any html pages proxied replace all links with http://ronpaul.com and
25
25
  # add a Ron-Paul header.
26
26
 
data/lib/rat_hole.rb CHANGED
@@ -6,7 +6,7 @@ require 'util'
6
6
 
7
7
  class RatHole
8
8
 
9
- VERSION = '0.1.3'
9
+ VERSION = '0.1.4'
10
10
 
11
11
  def initialize(host)
12
12
  @host = host
@@ -16,7 +16,7 @@ class RatHole
16
16
  rack_request
17
17
  end
18
18
 
19
- def process_server_response(rack_response)
19
+ def process_server_response(rack_response, rack_request)
20
20
  rack_response
21
21
  end
22
22
 
@@ -44,7 +44,7 @@ class RatHole
44
44
  body = response.body || ''
45
45
  headers.delete('transfer-encoding')
46
46
 
47
- process_server_response(Rack::Response.new(body, code, headers)).finish
47
+ process_server_response(Rack::Response.new(body, code, headers), source_request).finish
48
48
  end
49
49
  end
50
50
 
data/rat-hole.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{rat-hole}
3
- s.version = "0.1.3"
3
+ s.version = "0.1.4"
4
4
 
5
5
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
6
6
  s.authors = ["Michael Hale", "David Bogus"]
@@ -209,7 +209,7 @@ class TestRatHole < Test::Unit::TestCase
209
209
  end
210
210
 
211
211
  class PoliticalAgendaRatHole < RatHole
212
- def process_server_response(rack_response)
212
+ def process_server_response(rack_response, rack_request)
213
213
  if(rack_response.content_type == 'text/html')
214
214
  doc = Hpricot(rack_response.body.first)
215
215
  (doc/"a").set('href', 'http://ronpaul.com')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mikehale-rat-hole
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Hale