json_requester 1.0.7 → 1.0.8

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 -2
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: addeed1bc3a006b61e8a3c04cb3f7833fcd6923431e56d8b111cccb17dd0b861
4
- data.tar.gz: b7d4e1a9aa9862044388e9cbc38e1709e5fc8a595b6e7db95807dfca089b6170
3
+ metadata.gz: 8e1df20023411b7a5567297f88b898a79e92732fea4b526cc49b8bc1632dc11f
4
+ data.tar.gz: 5061adce106e50c69bdad3b3867d520d9078151037e9abdbf12861ffba3efae1
5
5
  SHA512:
6
- metadata.gz: d90277243e6c1e3637f72e0d4bc8eb287eb6214a22d5b81e8523366086b65d0241151f2365e654eb4f115fd7b50bc7acb1b1467a1b52e4e9c6e1a9cf27bf182d
7
- data.tar.gz: f3d5c30712b8b739a0a8e6d253f030a017e40ec9f3fb4b8dbd17c773289e69383092ae05e7f6c2cffb5a6c22bf0c3387b9f8fa4b68cc79ea56a6c1940e08796e
6
+ metadata.gz: f951b7f470bfeadce95892e96da335cfb821c435b4cf3697b488ed12a4fd53b5395538c260896168ee159e19caf011ba211452ce088f014fc3ebfffff7f072bd
7
+ data.tar.gz: 109a9ce7779e9a5a91d3debd12ab6199f68ef6a811d53c6aacd5f9938b9f373811047acd4404f289c9ddf969bf4b565f5acba212bacf6a29a74a0210f5afdd39
@@ -4,9 +4,10 @@ require 'json'
4
4
  class JsonRequester
5
5
  attr_reader :host, :conn
6
6
 
7
- def initialize(host, multipart: false)
7
+ def initialize(host, multipart: false, ssl_verify: true)
8
8
  @host = host
9
9
  @multipart = multipart
10
+ @ssl_verify = ssl_verify
10
11
  end
11
12
 
12
13
  def http_send(http_method, path, params={}, headers={})
@@ -69,7 +70,7 @@ class JsonRequester
69
70
  private
70
71
 
71
72
  def init_conn
72
- Faraday.new(url: host) do |faraday|
73
+ Faraday.new(url: host, ssl: { verify: @ssl_verify }) do |faraday|
73
74
  faraday.request :multipart if @multipart # multipart form POST request
74
75
  faraday.request :url_encoded # form-encode POST params
75
76
  faraday.response :logger # log requests to $stdout
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.7
4
+ version: 1.0.8
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-06-20 00:00:00.000000000 Z
11
+ date: 2022-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday