Bacon_Rack 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/Bacon_Rack/module.rb +1 -1
- data/lib/Bacon_Rack/version.rb +1 -1
- data/spec/Bacon_Rack.rb +1 -1
- metadata +1 -1
data/lib/Bacon_Rack/module.rb
CHANGED
@@ -29,7 +29,7 @@ module Bacon_Rack
|
|
29
29
|
|
30
30
|
status.should.include last_response.status
|
31
31
|
|
32
|
-
last_response['Location'].sub(File.join(last_request.env['SERVER_NAME'],'/'), '/')
|
32
|
+
last_response['Location'].sub(File.join(last_request.env['SERVER_NAME'],'/'), '/').sub(%r!https?:///!, '/')
|
33
33
|
.should == path
|
34
34
|
end
|
35
35
|
|
data/lib/Bacon_Rack/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
Bacon_Rack_Version = "0.2.
|
1
|
+
Bacon_Rack_Version = "0.2.2"
|
data/spec/Bacon_Rack.rb
CHANGED
@@ -29,7 +29,7 @@ describe ":redirects_to" do
|
|
29
29
|
end
|
30
30
|
|
31
31
|
it "ignores SERVER_NAME in location header" do
|
32
|
-
last_request.env['SERVER_NAME'] = "
|
32
|
+
last_request.env['SERVER_NAME'] = "random.org/"
|
33
33
|
last_response.status = 301
|
34
34
|
last_response['Location'] = "http://random.org/new"
|
35
35
|
|