alias_method :get_orig, :get
def get(*args)
easy = get_orig(*args)
+
if ENV['CURL_CA_BUNDLE']
Ethon::Curl.set_option(:cainfo, ENV['CURL_CA_BUNDLE'], easy.handle)
else
Ethon::Curl.set_option(:cainfo, ca, easy.handle)
end
end
+
if OSDN::CLI._show_progress
Ethon::Curl.set_option(:noprogress, false, easy.handle)
-
else
Ethon::Curl.set_option(:noprogress, true, easy.handle)
end
+
+ if OSDN::CLI._rate_limit
+ Ethon::Curl.set_option(:max_send_speed_large, OSDN::CLI._rate_limit, easy.handle)
+ Ethon::Curl.set_option(:max_recv_speed_large, OSDN::CLI._rate_limit, easy.handle)
+ end
+
easy
end
end