faraday_persistent_excon 0.3.1 → 0.3.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '098cfd97e416642ae98c160f6bf13f986dd46759cdfc75a9ac4659ed226d8912'
4
- data.tar.gz: 64438f71f4e73b8a7a5d3661bcf447cba33132324fa3f8623ed6644beec461c9
3
+ metadata.gz: 82866baa3a86492bdf4dc3e79eb55e352f855bd60360cd000f246fa3798afaf4
4
+ data.tar.gz: d0b44e4d3bb02f8371d6d77995787d2a17bb7dedf83197f29bc382a85121123e
5
5
  SHA512:
6
- metadata.gz: f41a63fea72edb19d8099d417d09a4acbb1318669691904a202db843266b92aec4825a0ff553dcbb3c090c6941d9182aadb03e97ed5beedb69a69bf7fa622cd0
7
- data.tar.gz: 88ef2fe4d7d3028a9d5ed9b414dcfed31ef775fb6216d2c3cb603c74d6c6871868be5822298da70eb8a7babc4403163712ffb4e3b56d174836532c513dfa1587
6
+ metadata.gz: 9f54cb909b7da1c79fe9624df0e2960afa2ffe0c7739383c7540aa43358628e2731bee8cebb1ebfb267f93da2422f57097af93c08430df9fe5a1d3c8426cff11
7
+ data.tar.gz: f22a61676115de77989f686819dc1955ee44f391f9bf03d95fe7d5e32ea7cf6ab21b4d343edb40fafecc18ff80c2e67ff2966991874f31e486a45b7417459d30
@@ -14,7 +14,7 @@ module FaradayPersistentExcon
14
14
  end
15
15
 
16
16
  def expired?
17
- return false if last_use.nil?
17
+ return false if last_use.nil? || idle_timeout == 0
18
18
 
19
19
  Time.now.utc - last_use > idle_timeout
20
20
  end
@@ -33,8 +33,10 @@ module FaradayPersistentExcon
33
33
  Connection.new(
34
34
  excon: ::Excon.new(
35
35
  url,
36
- persistent: true,
37
- thread_safe_sockets: false
36
+ {
37
+ persistent: true,
38
+ thread_safe_sockets: false
39
+ }.merge(config.fetch(:connection_options, {}))
38
40
  ),
39
41
  idle_timeout: config.fetch(:idle_timeout, FaradayPersistentExcon.idle_timeout)
40
42
  )
@@ -1,3 +1,3 @@
1
1
  module FaradayPersistentExcon
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faraday_persistent_excon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Schlesinger