We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Fixnum
1 parent 5cf2baa commit a70b696Copy full SHA for a70b696
lib/oai/client.rb
@@ -92,11 +92,11 @@ def initialize(base_url, options={})
92
@http_client = options.fetch(:http) do
93
Faraday.new(:url => @base.clone) do |builder|
94
follow_redirects = options.fetch(:redirects, true)
95
- if follow_redirects
96
- count = follow_redirects.is_a?(Fixnum) ? follow_redirects : 5
+ follow_redirects = 5 if follow_redirects == true
97
+ if follow_redirects
98
require 'faraday_middleware'
99
- builder.response :follow_redirects, :limit => count
+ builder.response :follow_redirects, :limit => follow_redirects.to_i
100
end
101
builder.adapter :net_http
102
0 commit comments