mint_http 0.1.6 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 63e31ba9d13e9a4c3b6c4abfd32e1364c58f741ee3c29e0eac4aa4f27e255d53
4
- data.tar.gz: 3c37eb759b431524bfad3752416ea4f0258182fded0e5ca3253d2d923614151c
3
+ metadata.gz: 5928a4bac42cf6e1c6039ddbff011d758d7f0835feab6def492b72b0a3efda14
4
+ data.tar.gz: 0d4aba076e15a19bca4e91dd96f5b6fe63ba52509ca4ad72cef9ac22fe5e0c03
5
5
  SHA512:
6
- metadata.gz: bd7ead92124e1bd73d3ac973bdac60185ed05013ace2a71229b4b4cf5444e141f2deb82cfa5197f93f864f4168f5be855ffb57d840bb30247ae24e6c05315609
7
- data.tar.gz: 4ce792e6a54c19b9935267857889ac923ea8d0ac248999faa1e00863d993639b796615255e9bbf43b24381615416f100e0cf9c88756da7882deac6d2f9eb1d5e
6
+ metadata.gz: 6603a0dde40391ec153b797d1cd5725feef3773f36ea5eb1c45c576cdd1c6b14dffbe2748e089850531b87656c48487e59ef9268a3416166fe5b2a0b57c0b141
7
+ data.tar.gz: 2f7cf463b45f12da07b663b3679781041539b66d56b046be2df8e9d86e812dd610345d48ccd189d8a3918a35f6ba1c0187fd7b14480fb0142900ff7e5f51db4f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mint_http (0.1.5)
4
+ mint_http (0.1.8)
5
5
  base64
6
6
  json
7
7
  net-http
@@ -11,16 +11,14 @@ PATH
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- base64 (0.1.1)
15
- ipaddr (1.2.5)
16
- json (2.6.3)
14
+ base64 (0.2.0)
15
+ json (2.7.2)
17
16
  minitest (5.18.0)
18
- net-http (0.3.2)
17
+ net-http (0.4.1)
19
18
  uri
20
- openssl (2.2.3)
21
- ipaddr
19
+ openssl (3.2.0)
22
20
  rake (13.0.6)
23
- uri (0.12.2)
21
+ uri (0.13.0)
24
22
 
25
23
  PLATFORMS
26
24
  arm64-darwin-22
@@ -31,4 +29,4 @@ DEPENDENCIES
31
29
  rake (~> 13.0)
32
30
 
33
31
  BUNDLED WITH
34
- 2.2.33
32
+ 2.3.16
@@ -283,6 +283,10 @@ module MintHttp
283
283
  net_request.body = @body
284
284
  when :json
285
285
  net_request.body = @body.to_json if @body
286
+
287
+ if String === @body
288
+ net_request.body = @body
289
+ end
286
290
  when :form
287
291
  net_request.body = URI.encode_www_form(@body) if @body
288
292
  when :multipart
@@ -336,7 +340,7 @@ module MintHttp
336
340
  if @pool
337
341
  @pool.release(net_http)
338
342
  else
339
- net_http.finish
343
+ net_http.finish if net_http.started?
340
344
  end
341
345
  end
342
346
  end
@@ -55,7 +55,7 @@ module MintHttp
55
55
  when 400..499
56
56
  raise ClientError.new('Client Error', self)
57
57
  when 500..599
58
- raise ClientError.new('Server Error', self)
58
+ raise ServerError.new('Server Error', self)
59
59
  else
60
60
  self
61
61
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MintHttp
4
- VERSION = "0.1.6"
4
+ VERSION = "0.1.8"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mint_http
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ali Alhoshaiyan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-10-16 00:00:00.000000000 Z
11
+ date: 2024-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-http