recurly 3.3.1 → 3.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.bumpversion.cfg +1 -1
- data/CHANGELOG.md +24 -15
- data/lib/data/ca-certificates.crt +3464 -29
- data/lib/recurly.rb +1 -0
- data/lib/recurly/client.rb +115 -83
- data/lib/recurly/connection_pool.rb +40 -0
- data/lib/recurly/errors.rb +30 -0
- data/lib/recurly/errors/network_errors.rb +2 -0
- data/lib/recurly/http.rb +10 -6
- data/lib/recurly/version.rb +1 -1
- data/recurly.gemspec +0 -3
- metadata +4 -38
- data/lib/recurly/client/adapter.rb +0 -39
@@ -1,39 +0,0 @@
|
|
1
|
-
require "openssl"
|
2
|
-
|
3
|
-
module Recurly
|
4
|
-
class Client
|
5
|
-
module NetHttpPersistentAdapter
|
6
|
-
protected
|
7
|
-
|
8
|
-
def configure_net_adapter(faraday)
|
9
|
-
faraday.adapter :net_http_persistent do |http|
|
10
|
-
# yields Net::HTTP::Persistent
|
11
|
-
# for net-http-persistent 2.X, alternative is for 3.X
|
12
|
-
if http.respond_to? :keep_alive_timeout
|
13
|
-
http.keep_alive_timeout = 60
|
14
|
-
else
|
15
|
-
http.keep_alive = 60
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
module NetHttpAdapter
|
22
|
-
protected
|
23
|
-
|
24
|
-
def configure_net_adapter(faraday)
|
25
|
-
faraday.adapter :net_http do |http|
|
26
|
-
# yields Net::HTTP
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
include NetHttpAdapter
|
32
|
-
|
33
|
-
begin
|
34
|
-
require "net/http/persistent"
|
35
|
-
include NetHttpPersistentAdapter
|
36
|
-
rescue LoadError
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|