gorp 0.16.5 → 0.16.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/gorp.gemspec +1 -1
  2. data/lib/gorp/net.rb +5 -2
  3. data/lib/version.rb +1 -1
  4. metadata +1 -1
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{gorp}
5
- s.version = "0.16.5"
5
+ s.version = "0.16.6"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Sam Ruby"]
@@ -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
- next if element[name] =~ /^http:\/\//
51
- element[name] = URI.join("http://localhost:#{$PORT}/", element[name]).to_s
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
 
@@ -2,7 +2,7 @@ module Gorp
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 16
5
- TINY = 5
5
+ TINY = 6
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gorp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.5
4
+ version: 0.16.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Ruby