hayesdavis-grackle 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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{grackle}
5
- s.version = "0.1.3"
5
+ s.version = "0.1.4"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Hayes Davis"]
@@ -1,7 +1,7 @@
1
1
  module Grackle
2
2
 
3
3
  # :stopdoc:
4
- VERSION = '0.1.3'
4
+ VERSION = '0.1.4'
5
5
  LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
6
6
  PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
7
7
  # :startdoc:
@@ -69,7 +69,7 @@ module Grackle
69
69
  res = http.request(req)
70
70
  dump_response(res) if debug
71
71
  redirect_limit = options[:redirect_limit] || DEFAULT_REDIRECT_LIMIT
72
- if res.code.to_s =~ /^30\d$/ && redirect_limit > 0
72
+ if res.code.to_s =~ /^3\d\d$/ && redirect_limit > 0 && res['location']
73
73
  execute_request(method,URI.parse(res['location']),options.merge(:redirect_limit=>redirect_limit-1))
74
74
  else
75
75
  Response.new(method,url.to_s,res.code.to_i,res.body)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hayesdavis-grackle
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
  - Hayes Davis