json_requester 1.0.8 → 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 +5 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8e1df20023411b7a5567297f88b898a79e92732fea4b526cc49b8bc1632dc11f
4
- data.tar.gz: 5061adce106e50c69bdad3b3867d520d9078151037e9abdbf12861ffba3efae1
3
+ metadata.gz: 61edfdc55b1925b3e1907fe89a32298b4baf64e2f63c7f7781bb3b1599801dce
4
+ data.tar.gz: 73be7e54ea0e2523f32c500bd2367caf339207173a1e17ab3d8a0bf5230648a6
5
5
  SHA512:
6
- metadata.gz: f951b7f470bfeadce95892e96da335cfb821c435b4cf3697b488ed12a4fd53b5395538c260896168ee159e19caf011ba211452ce088f014fc3ebfffff7f072bd
7
- data.tar.gz: 109a9ce7779e9a5a91d3debd12ab6199f68ef6a811d53c6aacd5f9938b9f373811047acd4404f289c9ddf969bf4b565f5acba212bacf6a29a74a0210f5afdd39
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.8
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: 2022-08-04 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
@@ -36,7 +36,9 @@ files:
36
36
  homepage: https://github.com/kdan-mobile-software-ltd/json_requester
37
37
  licenses:
38
38
  - MIT
39
- metadata: {}
39
+ metadata:
40
+ source_code_uri: https://github.com/kdan-mobile-software-ltd/json_requester
41
+ changelog_uri: https://github.com/kdan-mobile-software-ltd/json_requester/blob/master/CHANGELOG.md
40
42
  post_install_message:
41
43
  rdoc_options:
42
44
  - "--charset=UTF-8"