json_requester 1.0.9 → 1.0.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/json_requester.rb +3 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 97dd6e0bf2910e13ec4badfedeed6a2e81d31c728e12e25eab181a1c8cc25ef9
4
- data.tar.gz: f93f5fa627e90339bf734b8e96367bdf6924f18c6f747625bedabd943ba97cba
3
+ metadata.gz: 61edfdc55b1925b3e1907fe89a32298b4baf64e2f63c7f7781bb3b1599801dce
4
+ data.tar.gz: 73be7e54ea0e2523f32c500bd2367caf339207173a1e17ab3d8a0bf5230648a6
5
5
  SHA512:
6
- metadata.gz: 39f4cda3e36460c8f8647513823974c90211a12ac509e495a3c79188381c07eb217f2abc7d874f094d7276b1c3fe5166bf87fc15b0e3d21f4a81e828340cd629
7
- data.tar.gz: fe699ae45d3d99e81d1b15e48e6a0e0219ebf2ca8b75f144a028091664bbe9dbcf473c2a1aa294db2bc2fe3a998e6a90d2f1c0493c6a933ab91ec9a41849c141
6
+ metadata.gz: 8666c62ffea8ed9a5c5f9b5ff46ffdddd2e11ff972508b6d7c13ceeb2f9101f01d84724baf06b0a89ec4a3d563e6dd7e2e786ed93f306595d4c3a0f41ca968a2
7
+ data.tar.gz: 001c495f700f71de07002edc11a92a7e9b7c862c2e9edb5c207ea8496c966753258242f514a69de1133eb7af16e2bab73a27ec77958ddc50da18182bb523dc68
@@ -4,10 +4,11 @@ require 'json'
4
4
  class JsonRequester
5
5
  attr_reader :host, :conn
6
6
 
7
- def initialize(host, multipart: false, ssl_verify: true)
7
+ def initialize(host, multipart: false, ssl_verify: true, timeout: 60)
8
8
  @host = host
9
9
  @multipart = multipart
10
10
  @ssl_verify = ssl_verify
11
+ @timeout = timeout
11
12
  end
12
13
 
13
14
  def http_send(http_method, path, params={}, headers={})
@@ -75,6 +76,7 @@ class JsonRequester
75
76
  faraday.request :url_encoded # form-encode POST params
76
77
  faraday.response :logger # log requests to $stdout
77
78
  faraday.adapter Faraday.default_adapter # make requests with Net::HTTP
79
+ faraday.options.timeout = @timeout
78
80
  end
79
81
  end
80
82
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json_requester
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.9
4
+ version: 1.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - JiaRou Lee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-18 00:00:00.000000000 Z
11
+ date: 2023-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday