gorp 0.16.5 → 0.16.6
Sign up to get free protection for your applications and to get access to all the features.
- data/gorp.gemspec +1 -1
- data/lib/gorp/net.rb +5 -2
- data/lib/version.rb +1 -1
- metadata +1 -1
data/gorp.gemspec
CHANGED
data/lib/gorp/net.rb
CHANGED
@@ -47,8 +47,11 @@ def snap response, form=nil
|
|
47
47
|
%w{ a[@href] form[@action] }.each do |xpath|
|
48
48
|
name = xpath[/@(\w+)/,1]
|
49
49
|
body.search("//#{xpath}").each do |element|
|
50
|
-
|
51
|
-
|
50
|
+
if element[name] =~ /^http:\/\//
|
51
|
+
element[name] = element[name].sub('127.0.0.1', 'localhost')
|
52
|
+
else
|
53
|
+
element[name]=URI.join("http://localhost:#{$PORT}/", element[name]).to_s
|
54
|
+
end
|
52
55
|
end
|
53
56
|
end
|
54
57
|
|
data/lib/version.rb
CHANGED